Sequential power supply circuit

Thread Starter

sab201

Joined Nov 18, 2023
129
I have planned to make a circuit to give power supply to 7 separate circuits sequentially one by one and then repeat in a continuous cycle. Circuit 1 gets supply for the first one hour, then it goes OFF, circuit 2 gets power supply and followed by circuit 3 until it reaches circuit 7 then it starts over from circuit 1 again repeating. When one circuit is ON others must be OFF.

I did a research and found that this could be achieved with a cd4016 ic driven by a 555 timer pulse generator (but I know 60 minutes would be long for it). The outputs go to the control pins of 2 cd4066 ics to control its switches which would then supply power to the individual circuits 1 to 7.

My doubt is that can a cd4066 be used for this switching power supply purpose or it is meant only for low level signals. Details of the power supply to be switched to the individual circuits 1 to 7 is 12 Volts, assuming a max current of 150 mA drawn by circuits 1 to 7. Can a 4066 ic be used for this application. I want to avoid mechanical relays since they need minimum current of 1 to 2 Amps flowing through contacts to keep them clean. Or should I use transistors for this application. I suppose the purpose is explained and hence I am not including a circuit. I want to know if this is possible then I will draw a circuit based on that. Series resistance wouldnt be of a problem since it is power supply.

Any suggestions will be helpful.

Thanks.
 

crutschow

Joined Mar 14, 2008
34,855
Yes, a 555 won't work reliably to give an hour time sequence.

You could use a CD4060 binary counter configured as a 1 hour timer.
This would clock a CD4017 decade counter, configured to reset at count 8, to sequentially apply power to the 7 circuits.
The CD4017 can control P-MOSFETs configured as high-side switches (the CD4066 can only switch a few mA).
 
Last edited:

Thread Starter

sab201

Joined Nov 18, 2023
129
You could use a CD4060 binary counter configured as a 1 hour timer.
This would clock a CD4017 decade counter, configured to reset at count 8, to sequentially apply power to the 7 circuits.
The CD4017 can control P-MOSFETs configured as high-side switches (the CD4066 can only switch a few mA).
Thanks, crutschow.
 

Irving

Joined Jan 30, 2016
4,077
Doh... thx.

Yes, P-channel MOSFETS but with source at 12v you'll need o/c driver or some other form of level-shifting to ensure they turn off fully, unless running the CDxxxx at 12v.

Personally I'd use an MCU for the sequencing. More reliable & integral timing, adjustable dead-time between break and make, and potentially 2 less chips.
 

k1ng 1337

Joined Sep 11, 2020
1,038
That's what you would do of course.
That's because you personally know how to program.
I suspect that the TS doesn't.
And the MCU requires a regulated supply, which the CD4xxx circuit doesn't.
To be fair, the program is maybe 20 lines long. Pi Pico is well suited for folks with little to no programming knowledge. I would go for an LM317, 7 FETs and a Pico for a total of around $20 CAD. I particularly like Pico because the program can be run in real time unlike constantly uploading to an Arduino.
 

Thread Starter

sab201

Joined Nov 18, 2023
129
That's what you would do of course.
That's because you personally know how to program.
Crutschow,

Yes you are right. I do not know indepth MCU programming for now. But I am hoping to learn along the run since that would offer more flexibilities and functions.

But right now I will go about with IC chips.
As for the 12 Volt supply output to the circuits 1 to 7, if the output of the CD 4017 is 5 Volts. Then difference Gate Voltage would be -7 Volts using an IRF9540 P Channel MOSFET which should switch it ON on the high side. And when this 5 Volts from CD 4017 is OFF then the gate voltage goes back to zero which should stop any current flowing from source to drain. I hope I am right here.
 

Thread Starter

sab201

Joined Nov 18, 2023
129
To be fair, the program is maybe 20 lines long. Pi Pico is well suited for folks with little to no programming knowledge. I would go for an LM317, 7 FETs and a Pico for a total of around $20 CAD. I particularly like Pico because the program can be run in real time unlike constantly uploading to an Arduino.
Yes I was thinking about using arduino or Rasberry Pi, as you suggest Pi Pico could be suited for this application I would try to incorporate this in a short while after learning programming along the run. I also want to select the individual circuits for example I want to have an option of switching OFF circuits 1 to 4 so that circuits 5 to 7 will cycle around without going to circuit 1. I suppose these options would be available using Pi Pico.
 

sarahMCML

Joined May 11, 2019
425
I think that we're forgetting that the CD4017 outputs will need inverting to drive the P-channel MOSFET's, since we need to pull the gate DOWN to turn ONE on, whereas most are LOW and only ONE goes High at any one time!
 

k1ng 1337

Joined Sep 11, 2020
1,038
Yes I was thinking about using arduino or Rasberry Pi, as you suggest Pi Pico could be suited for this application I would try to incorporate this in a short while after learning programming along the run. I also want to select the individual circuits for example I want to have an option of switching OFF circuits 1 to 4 so that circuits 5 to 7 will cycle around without going to circuit 1. I suppose these options would be available using Pi Pico.
Any microcontroller can carry out your intended functions. I suggest the Pico (RP2040 IC) because it's by far the easiest microcontroller I've worked with. It's current technology and it runs Python which is about a near to a natural language as you can get.

Folks here tend to endorse the "Arduino" platform (ATmega328 or ATtiny85 IC) because it's written in C. From a hardware perspective, you'll learn more but it's also a much older hardware. I don't see any value going the Arduino route aside from more technical support on the web.

In any case, I suggest you try writing your program in pseudocode. If you get that nailed down, I can convert it to a Python 3 program you can run in Thonny IDE. Python 3 runs on a computer not a microcontroller so it will only be a example. If you like it, I can adapt the code for a Pi Pico. This works a bit different because Pico runs Micropython which is a fork of Python made for microcontrollers. It's pretty easy but first your pseudocode needs to make sense. Here is an example to get started and it doesn't have to be in any kind of format, it just has to make sense to all readers.

START Program1
Turn ON Led1
Wait 3 Seconds
Turn OFF Led1
END Program1

Give this a try :)
 

ElectricSpidey

Joined Dec 2, 2017
2,889
I think that we're forgetting that the CD4017 outputs will need inverting to drive the P-channel MOSFET's, since we need to pull the gate DOWN to turn ONE on, whereas most are LOW and only ONE goes High at any one time!
Easly done with a load driver...also solves the voltage problem noted in post #9.

(yes, and some pull resistors)
 

crutschow

Joined Mar 14, 2008
34,855
As for the 12 Volt supply output to the circuits 1 to 7, if the output of the CD 4017 is 5 Volts.
You power the CMOS circuits from the 12V supply so the high output is equal to the supply voltage.
I think that we're forgetting that the CD4017 outputs will need inverting to drive the P-channel MOSFET's,
Yup, forgot about that. :oops:
You could use a CD4049 hex inverter chip to invert the signal.
 
Last edited:

Thread Starter

sab201

Joined Nov 18, 2023
129
You power the CMOS circuits from the 12V supply so the high output equal to the supply voltage.
Yup, forgot about that. :oops:
You could use a CD4049 hex inverter chip to invert the signal.
Ok I will do that, I will use 12 Volt supply to Power the ICs and use a CD4049 hex inverter to invert the signals going to the individual P Channel MOSFETS.
 

Thread Starter

sab201

Joined Nov 18, 2023
129
k1ng 1337,

Thanks for all the information I was doing an intensive research on whether going about with Arduino or Rasberry Pi. I have finally concluded to go with the Pi Pico and learning micropython to program it. I presume that would be much easier.
 

Irving

Joined Jan 30, 2016
4,077
CD4049 hex inverter
You'll need 2 for 7 outputs!


Here's my take on this - looks complex but really isn't, lt's based on something similar I did recently. The DMC4050 are a N-channel & P-channel MOSFET pair, ideal for this type of switch and very cheap at $0.24 each from LCSC in 10s. The p-channel is good for 3A+ if its on a reasonable amount of copper (1" sq). Resistors, capacitors, zener, etc add $0.70, and the ATtiny24 is $1.78 (plus $6 for a programmer from Amazon or eBay). The PCB is $3.50 for 5 (inc free assembly for 1) shipped to US. Total cost <$10!

Oh, forgot to say its programmed from Arduino IDE, but runs in situ, i.e. program & test on the fly...


1718033453632.png
 
Top