# Help with circuit

Hi All,
I have been a manual machinist all during my working day's and know nothing about circuits. I have a board (5.5.10.5). I want to put a row of 20 led's on one side and 20 on the other side. I want to be able to push on push off each one of them individually ( to my knowledge I will be using 2 9 volt batteries with no more than 3 lights, on at a time each side. I could use a separate switch for each light, but a better way, if possible, is to use one switch to control up to 6 lights. Each time you push the button a light goes on, push again that light goes off, push again, the next light goes on and etc.
Am I nuts or can something like this work. I don't even know if I'm in the right category, if not maybe some one can steer me in the right direction. Hopefully someone can help me, I've tried several other places and no answers. I'm sure you have guessed the led's are 2 to 3 volt 22ma.
Thank you for any help
Randy

Piece of cake. Just need 40 current limiting resistors and 40 switches and a panel to put it on.
To use the push to select approach you need some I/O Expander chips. You would need THREE PCF8575 chips
and the push to select code would be done in the arduino code by reading the momentary buttons and adding
a debounce delay. I am not sure how you want to wire it. If you want one button to control 6 leds, 6 doesn't
divide evenly into 40 but 5 does. Eight buttons , each controlling 5 leds each should work. The arduino has eight
inputs available for the button inputs and the selection would be done in the code. There's a tutorial here on how
the chip works. You would need 40 current limiting resistors (220 ohm, axial, 1/4 W).

What’s this for ?

Two 9V batteries won't last long, they only have 300-400mAH capacity.
I'd go with a D-cell battery pack, just need 2.

I believe these all do what you want, Push-On, then Push-Off.
Some even have LEDs built in that you could wire to go On & Off with the button press.

Might also check how many cycles they are rated for.

https://www.digikey.com/en/products/detail/e-switch/PV8F2T0SS-351/5309025

Do the on/off states have to go anywhere? Or just turn the light On and Off?

if possible, is to use one switch to control up to 6 lights. Each time you push the button a light goes on, push again that light goes off, push again, the next light goes on and etc.

Using the above as the coding guide, it isn't necessary to have push-on push-off momentaries because the OFF function is a function of how many presses there are, as is the selection of the next led.
Coding is not my area of expertise but I am 99% certain the off can be done by counting the presses.

Thank all of you for your quick responce - Raschemmel, A series circuit won’t work? Not enough battery? The PCF 8575 has a few varyations, I’m ready to order but don’t know which one to get. Wire it?? I built a cnc machine getting parts here and there and some how, to my great surprise, I got the electricity/electronics to work. When I get the components I need I will probably be bugging you with questions. At the present, as I understand it, I need the 3 chips and 8 push button switches. LLARRYD I’m engraving letters on the front side of a 5.5x10.5x.750 wooden board. On the backside will be pockets and slots for the components. There will be letters engraved on the front. The lights are to highlight the letters. Crossroads - D cell batteries won’t work, to big. Thanks for the other information. Global Moderator - I’m only turning the lights on and off.
Nuclear Arming Switch NO NO NO not on your or my life.

Global Moderator

isn't a name, it's a forum membership class

randy8:
I’m sure you have guessed the led’s are 2 to 3 volt 22ma.

Absolutely no. People come here with all kinds of LED projects, with different LED types “up the Wazoo”.

"Global Moderator"

If he is participating in a post , he is "Crossroads" (that's his handle)
If he is participating as a Global Moderator, then somebody is in trouble..."

Nuclear Arming Switch NO NO NO not on your or my life.

Given the nature of the circuitry, I think everyone knows that was an attempt at humor....

As a Global Moderator, I mostly ban Spammers, delete duplicate messages, clean up the occasional post, remind people to use code tags, etc.

If you want something microcontroller based, I'd go with a Promini and a MAX7219, and a switching regulator to get 5V to power both. Example https://www.digikey.com/en/products/detail/murata-power-solutions-inc/OKI-78SR-5-1-5-W36H-C/3438675

MAX7219 can contol up to 64 LEDs, has 15 level programmable brightness.
Use super bright LEDs so minimal current will be needed to drive them.
Or the LEDs in one of the buttons I suggested earlier.
42 buttons can be read with the Keypad.h library, wire them up as a 6x7 matrix., using 13 pins.
4 pins more the MAX7219. (ss (D10), MOSI (D11), SCK (D13). D12 kind of committed.
Leaves 2 pins for serial comm's with a PC for download/debug, and 2 pins for other use.

You said no more than 3 leds on at one time and two 9V batteries in parallel ismore than enough current to power 3 x 22mA = 66mA lees.

What I am looking for is an "Electrical Circuit Design Co." Is there any where on the Arduino site where these company's are listed?

I'm sure he can do it. Whether or not he wants to is another story.
And no there isn't.
You can post on Gigs and Collaborations to look for someone to do hire.

Randy8, I sent you a PM.

randy8:
What I am looking for is an "Electrical Circuit Design Co." Is there any where on the Arduino site where these company's are listed?

As it turns out, five such "Co."s have so far been listed in this thread, if you only knew!

Paul__B:
As it turns out, five such "Co."s have so far been listed in this thread, if you only knew!

As well as those just lurking!