Lighting Project Advice

Thread Starter

teenflon5

Joined Apr 19, 2021
27
Hello,

Im planning to do a very simple project but getting quite confused about where to start as I've done parts of it before but not brought everything together in one piece. Any advice on where to start would be great and I can expand my knowledge.

Project Aims
Simply put a box containing three LED lights (1w max) which can be toggled on and off using push button switches, powered by external power supply.

  1. One slight tricky part is toggling the LEDs through push buttons, I cant change to another type of button so I'm thinking of using an S/R latch IC to toggle whether the light is on. I cant run the 1W power through the IC as it will be too much current for the IC, so maybe a relay or MOSFET to turn the LEDs on and off from the S/R latch signal. Any suggestions on which would be best?
  2. Powering the system - One option I'm familiar with is using an Arduino as a power supply, but 3x 1W LEDs will be too much for the Arduino. Not overly familiar with what alternatives there are as I want the project to be as cheap as possible as I may want to make a few of these.
  3. My current thought is some sort of power supply powering the IC pushbutton system, and powering the LEDs as well. One thing I cant figure out is if all the LEDs are turned off and only the IC button part is powered, how do I manage the current, not sure what resistors would be required and in what configuration, if I have a resistor to lower the current when the lights are off, how do I stop that same resistor limiting current to the LEDs?

I'm sure theres a very simple explination for doing this, but any advice on what I should use and I can go away and do some more research would be great.

Thanks
 

Ya’akov

Joined Jan 27, 2019
9,131
Welcome to AAC!
I am finding your specification hard to follow. A drawing would help, along with some sort of narrative of what happens when you press the button. It would also be very helpful to explain what these will be used for.

And, how did an Arduino get in there?
 

Thread Starter

teenflon5

Joined Apr 19, 2021
27
Welcome to AAC!
I am finding your specification hard to follow. A drawing would help, along with some sort of narrative of what happens when you press the button. It would also be very helpful to explain what these will be used for.

And, how did an Arduino get in there?
Thanks! Lets ignore the arduino :) Was using it as a power supply to test the LEDs but dont want one in the future setup.

I've done an extremely crude drawing of the system, the top is the power input, on the left is the low current system which will run the toggle of the lights. There are four push buttons which in turn control three 1W LEDs and 2 regular LEDs, only one is wired up in the drawing so far. Essentially I'm thinking I will use a S/R Latch IC like the CD4043B CMOS R/S Latch IC which I have used before in other projects, and connect the push button to the Set and Reset pins on one gate, with the Q output going to a relay to turn on and off the LED on the high current side of the system. (the IC in the diagram is not the right one, assume the left two pins are S and R, and the right pin is Q output for that gate)

The part that I'm struggling with is the following;

  1. Should I use a Relay or MOSFET to switch the LEDs on and off? Is there any benefit to each?
  2. How do I power the system? In the diagram I've just connected everything to a power input, but Assume I will need some sort of voltage regulator, resistors etc for the system to control current of the LEDs?
    1. I'm thinking to use a mains plug transformer to give a DC voltage. I can figure out the LED side quite easilly as each LED will just need a resistor in series. On the IC side I assume also just a resistor somewhere like on the VDD to keep the current low, but my electronics knowedge is still quite basic, as it will be plugged in and on 24/7 how do I keep it safe, do I need to add some sort of protection on the power input? This is the part I'm struggling with most.

Any help would be great!

1618824855192.png
 

Ya’akov

Joined Jan 27, 2019
9,131
Well, as far as power supply, the first step is to work out your requirements. You need to figure out what voltages at what currents you will need. Then you can look for some sort of power supply off the shelf, which is a very good approach, and figure out if you will need some conditioning on your own board (probably). That would include regulator(s), possibly filtering, and of course protection isn’t a bad idea.

All these things depend on you characterizing your peak and continuous loads. It doesn’t have to be a high precision thing, just so you know that you can safely supply enough current at the voltage(s) you need.

Take each component and using its datasheet work out these numbers.

What are the voltages you need? What is the current required for each and total?
 

Thread Starter

teenflon5

Joined Apr 19, 2021
27
Well, as far as power supply, the first step is to work out your requirements. You need to figure out what voltages at what currents you will need. Then you can look for some sort of power supply off the shelf, which is a very good approach, and figure out if you will need some conditioning on your own board (probably). That would include regulator(s), possibly filtering, and of course protection isn’t a bad idea.

All these things depend on you characterizing your peak and continuous loads. It doesn’t have to be a high precision thing, just so you know that you can safely supply enough current at the voltage(s) you need.

Take each component and using its datasheet work out these numbers.

What are the voltages you need? What is the current required for each and total?
Thanks, It's starting to make more sense now, I need all the components to be as small as possible, so ideally all on a PCB. Now I have a better Idea of how it will work I'll calculate everything and put another post on if I get stuck. Thanks for the help!
 

Ya’akov

Joined Jan 27, 2019
9,131
Thanks, It's starting to make more sense now, I need all the components to be as small as possible, so ideally all on a PCB. Now I have a better Idea of how it will work I'll calculate everything and put another post on if I get stuck. Thanks for the help!
Make some drawings, both schematics and scaled physical layouts. Come back and ask about it. You might also want to consider using an ATTiny85 instead of the CMOS components. In any case, Make a good plan before you start trying to make the final product, part of that is breadboarding subsystems and testing.
 

MisterBill2

Joined Jan 23, 2018
18,461
Certainly Yaakov is correct, but it would be simpler to use small relays for the power control and latching functions, because relays are much more forgiving of circuit errors and also they consume no power when off. And when a relay is engaged it is fully on and so no concern about adequate biasing. A one watt LED draws enough current to make transistor control require some attention to details of how it is turned on, a relay is far more forgiving in that regard.
 

Ya’akov

Joined Jan 27, 2019
9,131
Certainly Yaakov is correct, but it would be simpler to use small relays for the power control and latching functions, because relays are much more forgiving of circuit errors and also they consume no power when off. And when a relay is engaged it is fully on and so no concern about adequate biasing. A one watt LED draws enough current to make transistor control require some attention to details of how it is turned on, a relay is far more forgiving in that regard.
Relays would certainly be simpler and If the TS doesn’t care about using logic or not then probably better, if he wants to go solid state, tough, I think an ATtiny85 ( be a aisle of Arduino compatibility) and MOSFETs would be better than CMOS logic.

I surmise the TS has some Arduino experience based on using one as a power supply.
 

MisterBill2

Joined Jan 23, 2018
18,461
What folks get from Nuts and Volts is a serious Arduino sales pitch, disguised as technical advice. And most of the time there are other better ways to do whatever it is being done. And by using different names for almost everything they make the information rather confusing to everybody else. Why else call a program listing a "sketch" and call a daughter board a "shield"???
 

Ya’akov

Joined Jan 27, 2019
9,131
What folks get from Nuts and Volts is a serious Arduino sales pitch, disguised as technical advice. And most of the time there are other better ways to do whatever it is being done. And by using different names for almost everything they make the information rather confusing to everybody else. Why else call a program listing a "sketch" and call a daughter board a "shield"???
Well, the Arduino started out as a way to allow neophytes to get involved in embedded programming. The innovation of the Arduino was in the bootloader that made programming MCUs accessible to mere mortals and the IDE which hides all the housekeeping of C++ that bogs down the learner.

I think the terminology was meant to be non-intimidating, to keep people from running away when they saw words they'd try to understand but failed.

Pre-Arduino, a lot of embedded programming was black magic and secret ritual. I really appreciate how east Arduino has made real world application of embedded.

All that said, an Arduino is not always the answer, but more and more the tiny MCUs that cost so little and can be so easily programmed (like the ATTiny series) are a better answer than discrete logic, just as PICs often were for those who could actually apply them.

Nonetheless sometimes an Arduino and a MOSFET is just a ridiculously oversized and overpriced relay.
 

djsfantasi

Joined Apr 11, 2010
9,160
I’ve seen too many projects where an Arduino is used just as a 5V regulated power supply.

That’s ridiculous! But it seems to be common, or at least more common than it should be.
 
Top