Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Circuit design for LED dimming

Status
Not open for further replies.

jp7189

New Member
I'm looking for help designing a circuit for dimming LEDs on a fish tank in reaction to ambient light. In this case I want to make the LEDs brighter when there is more ambient light, and this seems to be opposite of the circuit designs I have found online.

I'm a hobbyist, and no EE. I can use a soldering iron alright, but am baffled by component selection and the calculation of correct values.

Based on the LED driver's documentation, it seems like I could just connect an LDR photocell with resistance from 10K-100K Ohms, but that somehow seems too simple. For one thing, I have no way to know if the ambient light will match up with the range of the LDR.

The driver I'm using is a Mean Well HLG-100H-36B, and here's what the docuementation says about dimming (I've also attached a PDF file with the same specs in case the below text is hard to read):



Dimming Operation:

HLG-100H-36B

DIM+(Blue) DIM-(White)

-V(Black)
+V(Red)


Built-in 3 in 1 dimming function, IP67 rated. Output constant current level can be adjusted through output cable by connecting a resistance or
1 ~ 10Vdc or 10V PWM signal between DIM+ and DIM-. Please DO NOT connect "DIM-" to "-V".
Reference resistance value for output current adjustment (Typical)

Resistance value 10K 20K 30K 40K 50K 60K 70K 80K 90K 100K OPEN
Percentage of rated current 10% 20% 30% 40% 50% 60% 70% 80% 90% 100% 102%~108%
1 ~ 10V dimming function for output current adjustment (Typical)

Dimming value 1V 2V 3V 4V 5V 6V 7V 8V 9V 10V OPEN
Percentage of rated current 10% 20% 30% 40% 50% 60% 70% 80% 90% 100% 102%~108%
10V PWM signal for output current adjustment (Typical): Frequency range :100HZ ~ 3KHz

Duty value 10% 20% 30% 40% 50% 60% 70% 80% 90% 100% OPEN
Percentage of rated current 10% 20% 30% 40% 50% 60% 70% 80% 90% 100% 102%~108%

Using the built-in dimming function on B-type model can't turn the lighting fixture totally dark. Please refer to the connection method below to achieve 0% brightness of the lighting fixture connecting to the LED power supply unit.


Thank you in advance for your help.

-Jon
 
Hi,

What kind of power in the LED's are you working with. Do you have a lot of high power LED's or just a few small ones or what? I ask because you might be able to build your own controller that is simply a PWM circuit.

The control scheme for this would be a little tricky. There are several issues. I'll name a few...
1. The light from the LED's cant affect the sensors too much or they will just keep getting brighter and brighter.
2. Probably need more than one sensor, pointing in various directions.
3. The sensors positions and directions and the lighting sources in the room will affect the control law, so lighting sources probably have to be fixed in position and if directional their direction fixed also.
4. You'd have to establish a min and max threshold for the ambient lighting, then work from there. The controller would have to be adjustable so you can adjust what the min and max are.

So a typical scenario might go like this...
You install one or more sensors in a fixed location that you believe will sense the ambient light that will be representative of the usual room lighting. You then measure the resistances of all the sensors at the min and max ambient light that is to be expected. You then drive the LED's with a PWM signal that is adjustable, and decide on the min and max LED current level you need for the min and max ambient lighting. You then use the min and max resistance in a PWM circuit that will adjust the current to the LED's, and hope that any non linearity is not noticed too much. If it is noticed too much you'd have to create a non linear slope for the control signal.

So there would be a couple steps to getting this right, which include a test set to be performed with results carefully logged.

You'd also want to think about how the system should react to people standing between the main lighting source in the room and the sensors, or the windows and the sensors during a bright day.

So there is a little bit to it im afraid. Success might be hard to measure with all the variables that can come into play.
 
I agree with Mr Al. An LDR alone won't cope with all those factors because it offers no possibility of setting the range and threshold of the control required. But a circuit including one or more LDRs is possible. Presumably you won't want to dim the lights to 0%. What brightness range do you envisage?
 
I'd simply do the design with two NE555 timers.

1st timer will configure as an astable timer & the 2nd one as a monostable with voltage control feature.

1st timer will generate clock (with a very low duty cycle) to the 2nd oneshot timer.

LDR is placed with a resistor across Vdd & Vss as a voltage divider.The voltage out from the resistor network is feeded to the control voltage pin of the 2nd timer.

The final output will vary according to the voltage out by the LDR/Resistor network.
 
Hi,

What kind of power in the LED's are you working with. Do you have a lot of high power LED's or just a few small ones or what? I ask because you might be able to build your own controller that is simply a PWM circuit.

The control scheme for this would be a little tricky. There are several issues. I'll name a few...
1. The light from the LED's cant affect the sensors too much or they will just keep getting brighter and brighter.
2. Probably need more than one sensor, pointing in various directions.
3. The sensors positions and directions and the lighting sources in the room will affect the control law, so lighting sources probably have to be fixed in position and if directional their direction fixed also.
4. You'd have to establish a min and max threshold for the ambient lighting, then work from there. The controller would have to be adjustable so you can adjust what the min and max are.

So a typical scenario might go like this...
You install one or more sensors in a fixed location that you believe will sense the ambient light that will be representative of the usual room lighting. You then measure the resistances of all the sensors at the min and max ambient light that is to be expected. You then drive the LED's with a PWM signal that is adjustable, and decide on the min and max LED current level you need for the min and max ambient lighting. You then use the min and max resistance in a PWM circuit that will adjust the current to the LED's, and hope that any non linearity is not noticed too much. If it is noticed too much you'd have to create a non linear slope for the control signal.

So there would be a couple steps to getting this right, which include a test set to be performed with results carefully logged.

You'd also want to think about how the system should react to people standing between the main lighting source in the room and the sensors, or the windows and the sensors during a bright day.

So there is a little bit to it im afraid. Success might be hard to measure with all the variables that can come into play.

Thank you for the thorough reply. To answer your questions, I have only 2 high power LEDs. They are Editar 100 Watt / 7000 Lumen LEDs. I believe their primary use is in street lights. Each LED chip is mounted in a lens with integrated heatsink. I already have a very nice driver (one for each LED). Both the LED enclosure and driver are IP65/67 rated for wet locations - a good thing because they are splashed with saltwater 24 hours a day (for the last 6 months).

A: 1. The light is focused downward, and there is roughly 10 feet of open space above to place the photocells.
A: 2. I completely agree
A: 3. The ambient lighting comes from 4 skylights, and intensity varies with time of day, time of year, and weather conditions. It would be possible to mount photocells within each skylight, or at several points within a skylight to improve the precision. The skylights are roughly 10 feet above the LEDs.
A: 4. I would like to provide the finished and tested schematic to my peers so they might benefit as well. To that end, it would be nice to have a wide range of adjustment because their setups will be quite a bit different.

I would not want to replace the existing drivers, but they are quite flexible, and I'm hopeful we can come up with something to control them.

The drivers will accept 3 types of dimming signal:

1. Resistance - 10KOhms = 10% output .... 100KOhms = 100% output .. Open = 102% output -- this is how they are currently running
2. Voltage - 1V = 10% output ... 10V = 100% output
3. PWM = 10% = 10% output ... 100% = 100% output
The full driver specs, including dimmer requirements, are attached to my first post as a PDF.

Would it be possible to put a bunch of LDR's in parallel with a Pot or two for adjustment? Do LDRs exist where resistance goes up with light intensity? The ones I see all go down with more light, and that's the opposite of what I need.
 
I agree with Mr Al. An LDR alone won't cope with all those factors because it offers no possibility of setting the range and threshold of the control required. But a circuit including one or more LDRs is possible. Presumably you won't want to dim the lights to 0%. What brightness range do you envisage?

The mains to these drivers/LEDs are on a timer which turns on just before dawn and just after dusk. The drivers themselves will go as low as 10% output, and I don't need anything below that. Do you suppose I could just pick an LDR, and wire enough of them in parallel to get down under the 10K-100K resistance range, and then fine tune with a pot? Do you know of a LDR part number where resistance goes up with more light? I can't find one.
 
I'd simply do the design with two NE555 timers.

1st timer will configure as an astable timer & the 2nd one as a monostable with voltage control feature.

1st timer will generate clock (with a very low duty cycle) to the 2nd oneshot timer.

LDR is placed with a resistor across Vdd & Vss as a voltage divider.The voltage out from the resistor network is feeded to the control voltage pin of the 2nd timer.

The final output will vary according to the voltage out by the LDR/Resistor network.

I have to say this is over my head. I can sort of get what you're saying, but I couldn't take that with a soldering iron and make something out of it.
 
inverse resistance?

OK, so I've spent time looking for a LDR with resistance that goes up with more light, and I can't find any. It must just be the nature of the beast. What is the easiest way to flip that around so that when the resistance of the LDR side of the circuit goes up, the resistance I show to the driver goes down?
 
If the ambient light is only via skylights a single LDR positioned close to and facing one skylight would clearly not be affected by passing pedestrians etc and should be ok as the sensor. It could be connected to the input of an opamp having an adjustable gain and offset, to give the control signal you require.
Something like this, perhaps?
Pot1 controls the offset and Pot2 controls the gain. The graph shows output voltage v LDR resistance.
 
Last edited:
If the ambient light is only via skylights a single LDR positioned close to and facing one skylight would clearly not be affected by passing pedestrians etc and should be ok as the sensor. It could be connected to the input of an opamp having an adjustable gain and offset, to give the control signal you require.
Something like this, perhaps?
Pot1 controls the offset and Pot2 controls the gain. The graph shows output voltage v LDR resistance.

This is just what I need! Thanks! I'll build and test it and let you know how it goes.
 
Status
Not open for further replies.

Latest threads

Back
Top