In need of direction, with a small project

Thread Starter

Alln3w2m3

Joined Jun 20, 2023
57
I started with eagleCAD and brute force digging through datasheets and beating my own skull learning. I should have started with reference designs to fully UNDERSTAND what I was getting from the datasheets. https://www.digikey.com/reference-designs/en/lighting/led-drivers-dc-in/270 Digikey, Texas Instruments, and Analog all have reference design sections. I'm sure Newark or whatever you use to get parts would have a reference design section too.
Once you get the components figured out to do what you want them to do, you still don't necessarily have to design a pcb yet. You can get parts you can breadboard, or carrier pcbs made to solder fine pitch components to so they will breadboard and mock it all up before paying for a pcb to be made. Thats a recomendation I think anyone here at AAC can get behind.
Now that eagle was bought by autodesk its a bit different, but autodesk has a bunch of tutorials for learning how to operate the software.
Another option you can do is look on amazon/ali-express/alibaba for a cheapo already functioning pcb. I've done that with bluetooth speakers and such. Order the pcb that does almost what I want and figure out how it does it. It already functions and, if not schematics, than you can poke and prod with the meter to figure out whats going on.
This is too big for your application, but this one is an example of what I'm talking about.
That pre-built driver is very interesting. I may have scrolled past it but I didn't see the specific dimensions for it. Excuse my ignorance, but what other items are needed for this besides the LED and power supply?
 

Thread Starter

Alln3w2m3

Joined Jun 20, 2023
57
Would a relay of some form be an acceptable way to create the time delay? I had been reading about micro relays and I found one that seems to be the right size, but wasn't sure if this was the best way or just more complicated. The relay I'm referring to is here.
 

Audioguru again

Joined Oct 21, 2019
6,789
All the LEDs that have typical to maximum forward voltage needed at 700mA will not work with that little 2.5V battery.
The 12V/200mA relay timer also will not work with that 2.5V battery.
 

Thread Starter

Alln3w2m3

Joined Jun 20, 2023
57
All the LEDs that have typical to maximum forward voltage needed at 700mA will not work with that little 2.5V battery.
The 12V/200mA relay timer also will not work with that 2.5V battery.
Great, thanks for the input. I'm aware of a whole h
All the LEDs that have typical to maximum forward voltage needed at 700mA will not work with that little 2.5V battery.
The 12V/200mA relay timer also will not work with that 2.5V battery.
Again, I and many others have flashlights that run off these batteries with no problem and are producing well above the output id like for a decent run time. So either they are using some sort of wizardry or it can work with the right components.
 

Thread Starter

Alln3w2m3

Joined Jun 20, 2023
57
Would it be a good idea to settle on an LED that produces the output I want, finalize how I'd want a few of them configured together, and work my way backwards through the circuit? Like LED's, drivers, batteries, switch (I assume I'm missing some components).

Do resistors come into play here or are they integrated into the LED or drivers somehow?
 

Audioguru again

Joined Oct 21, 2019
6,789
Again, I and many others have flashlights that run off these batteries with no problem and are producing well above the output id like for a decent run time. So either they are using some sort of wizardry or it can work with the right components.
In post #7 you said the flashlights use two of these little batteries then the LED has up to double the voltage and 4 times the power of your losing idea with only one battery.
 

Thread Starter

Alln3w2m3

Joined Jun 20, 2023
57
In post #7 you said the flashlights use two of these little batteries then the LED has up to double the voltage and 4 times the power of your losing idea with only one battery.
Exactly, I never said it needed to be only one battery. I even specifically said later it could be any configuration needed as long as I could use that battery type. I used the example of the flashlights as a proof of sorts that in some way, it was possible. So now that we are back where we started, is there anything useful left?
 

jiggermole

Joined Jul 29, 2016
161
The boards I linked to are meant to be mounted in a tube on top of 18650 cells so they're just over 20mm in diameter. On that board is all the circuitry to drive the LED.
You have the right of it, pick an LED that has the characteristics you need and then dive into the driving circuitry. I think I put a link to a digikey search that includes LED drivers. The characteristics of the led you want to drive will narrow the search for which driver you want to use. Almost all of them have the link to the manufacturers datasheet, its the small pdf symbol on digikey and I think newark as well.
Most of the led drivers you will find are constant current boost dc-dc converters. They take the incoming and boost the voltage to whatever the forward voltage is to get the led to conduct and then limit the current through the led as a constant current source. You can find ones that will drive a 60v led array with a 5v input. You shouldn't design a system to do that, but they will. A watt is a watt is a watt. If you have a 3w led its going to draw 3w. 1.5v battery will need to source 2A and thats more than the allowed on the battery. And if the forward voltage on the led is 2.5V you will only see 1.2A through the led. So using a couple batteries in series is the way to go, as you said already.
And like I said earlier, the premade modules are cheap enough you can release the magic smoke guilt free.
The datasheet of the led driver you choose will definitely have at least one reference schematic to give you a place to start figuring out the extra components you'd need to make it run. I know Analog usually has several.
And as far as controls for the light, I would look at the led driver chips and specifically the enable pin. I know some of them you can use a capacitor with that enable pin to have a delayed start. You just need to select the right size capacitor to delay the enable pin going high to give you your delay. Use a slide switch or whatever to control incoming power to the led driver and let the capacitor charging give you the delay.
Just as an example, not a deep dive, This chip, if you pull up the data sheet and go to the electrical characteristics section, it gives you the voltage high and voltage low for the enable pin. So the chip will not turn on if the voltage at the pin doesn't reach 1.5v. https://www.electronics-tutorials.ws/rc/rc_1.html You'd make a circuit where you're time constant puts the voltage at the enable pin above 1.5v after your desired amount of delay. T=RxC R is resistance, C is capacitance in farad, T is time in seconds. 3second delay and pick a common capacitor. 2.2 uF I think is pretty common. 1.3Mohm for R? If I'm wrong, please correct me.
*Edit* Just doing the time constant by itself probably won't be enough. You'll probably need a discharge resistor for the capacitor so it doesn't try and discharge through the enable pin. Its a rough idea, needs more detail, sorry.
 
Last edited:

Thread Starter

Alln3w2m3

Joined Jun 20, 2023
57
The boards I linked to are meant to be mounted in a tube on top of 18650 cells so they're just over 20mm in diameter. On that board is all the circuitry to drive the LED.
You have the right of it, pick an LED that has the characteristics you need and then dive into the driving circuitry. I think I put a link to a digikey search that includes LED drivers. The characteristics of the led you want to drive will narrow the search for which driver you want to use. Almost all of them have the link to the manufacturers datasheet, its the small pdf symbol on digikey and I think newark as well.
Most of the led drivers you will find are constant current boost dc-dc converters. They take the incoming and boost the voltage to whatever the forward voltage is to get the led to conduct and then limit the current through the led as a constant current source. You can find ones that will drive a 60v led array with a 5v input. You shouldn't design a system to do that, but they will. A watt is a watt is a watt. If you have a 3w led its going to draw 3w. 1.5v battery will need to source 2A and thats more than the allowed on the battery. And if the forward voltage on the led is 2.5V you will only see 1.2A through the led. So using a couple batteries in series is the way to go, as you said already.
And like I said earlier, the premade modules are cheap enough you can release the magic smoke guilt free.
The datasheet of the led driver you choose will definitely have at least one reference schematic to give you a place to start figuring out the extra components you'd need to make it run. I know Analog usually has several.
And as far as controls for the light, I would look at the led driver chips and specifically the enable pin. I know some of them you can use a capacitor with that enable pin to have a delayed start. You just need to select the right size capacitor to delay the enable pin going high to give you your delay. Use a slide switch or whatever to control incoming power to the led driver and let the capacitor charging give you the delay.
Just as an example, not a deep dive, This chip, if you pull up the data sheet and go to the electrical characteristics section, it gives you the voltage high and voltage low for the enable pin. So the chip will not turn on if the voltage at the pin doesn't reach 1.5v. https://www.electronics-tutorials.ws/rc/rc_1.html You'd make a circuit where you're time constant puts the voltage at the enable pin above 1.5v after your desired amount of delay. T=RxC R is resistance, C is capacitance in farad, T is time in seconds. 3second delay and pick a common capacitor. 2.2 uF I think is pretty common. 1.3Mohm for R? If I'm wrong, please correct me.
*Edit* Just doing the time constant by itself probably won't be enough. You'll probably need a discharge resistor for the capacitor so it doesn't try and discharge through the enable pin. Its a rough idea, needs more detail, sorry.
Someone showed me that battery before and I may need to consider other options. What I was after was a common sized battery that was easy to replace and didn't need to be recharged. So it does seem like the driver replaces all of the normal parts that can be individually installed on a pcb to run the light. I like your idea of the chip. I was wondering if going that route was simpler than trying to use a relay and still be robust enough for what I wanted for the light.
 

jiggermole

Joined Jul 29, 2016
161
If you do go with a relay, you would still need something to trigger the relay at a specific time. You'd need some kind of timer circuitry to drive a relay which is pretty big and why have something with moving parts to fail. The time delay is the killer in this project. If you didn't need that than you could just use the premade pcb boards to do the task.
18650 cells are really really common. In fact almost all modern tool battery packs are just soldered together 18650 cells. I've torn apart bad packs at work and usually there's only one bad cell in the pack. Free 18650s. But using several cr123s in series is fine too. If those are easier for you to come by. There are some smarter fellas than me on here who can verify that I'm not missing something simple with using an rc time delay on an enable pin. And like I said that was only a cursory look. If you do make your own pcb you may select a different chip with different setups that may work better. I think its safe to say you're still in the ' narrow down my options' phase of the project.
 

Audioguru again

Joined Oct 21, 2019
6,789
A time delay relay was linked in post #22. it is powered from 12V (too high) and has a max load of only 200mA (too low).

The old CR123A battery was used in old photo flash units since it lasted for 10 years when not used.
Energizer stopped making the CR123A battery, but stores are still selling old ones. The datasheet from Duracell shows its max continuous current is too low at only 60mA and its voltage drops too low with higher current.
 

Alec_t

Joined Sep 17, 2013
14,430
they are using some sort of wizardry
My guess is that the light in the post #10 link is being pulsed with a low duty cycle to give a peak brightness (the quoted lumens) for brief intervals but which would seem continuous to the human eye. I see from its write-up that it can also be run in a low-light mode for a prolonged period. The write-up confirms a single cell (AA alkaline or CR123 lithium) powers it. Perhaps there's some sort of Joule-thief circuit involved?
 

Thread Starter

Alln3w2m3

Joined Jun 20, 2023
57
The "streamlight" has excellent beam concentrating optics that make its LED produce a very bright narrow beam. Will you use that kind of optics?
Sorry about the delayed response. I was getting notifications but didn't see this one.

I'll use them if needed. I'm wanting more of a flood effect than a single hot beam.
 

Ya’akov

Joined Jan 27, 2019
9,277
Here are a couple of possibilities for you.

This is a COB (Chip on Board) timer module, it's 9mm x 12mm and can be programmed with a resistor for a time between 2 seconds and 1000 hours. I wouldn't count on much accuracy on that hundreds of hours side of things, but for minutes you should be able to calibrate it pretty well. They are about a buck US a piece. (Disclaimer: I have not used these, but I ordered a few to evaluate them because they look useful.)

CleanShot 2023-07-11 at 08.23.40@2x.png
This is an LED driver that can do up to 1.5A. (much more information here) It will handle that LED, but you will probably want to put some kind of heatsink on the chip. I have used these modules and they are very good. Critically, they have a CE (Chip Enable) pin, this turns the driver on and off, so it can be used as an interface to the timer. It runs about a dollar and a half a pop.

1689079168083.png

Your pushbutton switch would have to use some simple circuitry to latch a power supply to the LED and start the timer at the same time. The CE pin is active high which means it turns on the driver when a high logic level voltage is present. The timer is active low which means it connects its output pin to 0V, or logic low, which is close to that.

By connecting the timer's output pin to the CE pin, along with another connection from CE to Vcc (the supply voltage source) through a pull-up resistor, the effect would that the timer would hold CE low until it expired then the connection to Vcc through the resistor would pull It high, turning it one.

The push-on-push-off function would have to be part of your latching circuit, or, you could use separate on and off buttons which would likely be simpler.

Now, all of this said, I would ditch the timer (the driver's a great option, they work well). I am going to make a suggestion that will be greeted with cheers from some and jeers from others, but I am going to make it anyway:

I would use a small MCU (Microcontroller Unit), probably an ATTiny 13A, which is a tiny 8-pin DIP or even an SMD component that can be programmed to do all of the on-off and timing functionality. They are cheap as dirt and easy to program.

Yes, you have to be willing to learn how to do that. But you can use the Arduino IDE (the development environment and framework for Arduino) and a very cheap, readily available programmer to do everything. Once you do learn this stuff, you will be in control of something like magical powers. You will be able to take tiny little chips and bend them to your will, not replying on complicated circuits or other people's ideas of what you might need.

If you are at all inclined to try this route, I strongly encourage you to do it. It's really, really useful; it's fun; and it's a start in a whole new world of microcontroller wonder.
 

Thread Starter

Alln3w2m3

Joined Jun 20, 2023
57
Here are a couple of possibilities for you.

This is a COB (Chip on Board) timer module, it's 9mm x 12mm and can be programmed with a resistor for a time between 2 seconds and 1000 hours. I wouldn't count on much accuracy on that hundreds of hours side of things, but for minutes you should be able to calibrate it pretty well. They are about a buck US a piece. (Disclaimer: I have not used these, but I ordered a few to evaluate them because they look useful.)

This is an LED driver that can do up to 1.5A. (much more information here) It will handle that LED, but you will probably want to put some kind of heatsink on the chip. I have used these modules and they are very good. Critically, they have a CE (Chip Enable) pin, this turns the driver on and off, so it can be used as an interface to the timer. It runs about a dollar and a half a pop.


Your pushbutton switch would have to use some simple circuitry to latch a power supply to the LED and start the timer at the same time. The CE pin is active high which means it turns on the driver when a high logic level voltage is present. The timer is active low which means it connects its output pin to 0V, or logic low, which is close to that.

By connecting the timer's output pin to the CE pin, along with another connection from CE to Vcc (the supply voltage source) through a pull-up resistor, the effect would that the timer would hold CE low until it expired then the connection to Vcc through the resistor would pull It high, turning it one.

The push-on-push-off function would have to be part of your latching circuit, or, you could use separate on and off buttons which would likely be simpler.

Now, all of this said, I would ditch the timer (the driver's a great option, they work well). I am going to make a suggestion that will be greeted with cheers from some and jeers from others, but I am going to make it anyway:

I would use a small MCU (Microcontroller Unit), probably an ATTiny 13A, which is a tiny 8-pin DIP or even an SMD component that can be programmed to do all of the on-off and timing functionality. They are cheap as dirt and easy to program.

Yes, you have to be willing to learn how to do that. But you can use the Arduino IDE (the development environment and framework for Arduino) and a very cheap, readily available programmer to do everything. Once you do learn this stuff, you will be in control of something like magical powers. You will be able to take tiny little chips and bend them to your will, not replying on complicated circuits or other people's ideas of what you might need.

If you are at all inclined to try this route, I strongly encourage you to do it. It's really, really useful; it's fun; and it's a start in a whole new world of microcontroller wonder.
Thank you for all that information. As long as I can delay the light from turning on, I don't care how I accomplish it, so long as it's reasonably repeatable and accurate.
 

Ya’akov

Joined Jan 27, 2019
9,277
Thank you for all that information. As long as I can delay the light from turning on, I don't care how I accomplish it, so long as it's reasonably repeatable and accurate.
There is a possibility that my suggested method could cause a flash when the button is pressed. I have no way to tell without testing it. If that was the case, it could probably be suppressed in the latching circuit you need to make it work anyway.
 
Top