5v to 24v

Status
Not open for further replies.

ibwev

Member
I am creating my first PCB that will use PIC16F690 and be powered by 24 volts. LM7805 will be used to reduce the24 volt supply to 5 volts to power the pic. I need the pic to be able to toggle a 24 V circuit. Should I use a voltage regulator on the input side of the 24V toggled circuit? If so, how do I increase the output from the pic to 24V for the output wire?
 
first of all about LM7805, yes it is a 5V regulator but it is big stretch to drop 19V. should be ok if the expected current draw is really small or this chip will need heatsink. depending on your circuit consumption, consider SMPS regulator, you can get switching version of 7805 which costs $3-5 and it is drop in replacement, no heatsink required and good for 1.5 or so.

PIC cannot drive outputs running at 24V directly, this is where ULN2803 comes in. ULN2803 is used for low side switching, but if you need to switch high side, consider UDN2981 or UDN2982.
 
If so, how do I increase the output from the pic to 24V for the output wire?
it really depends on what you need to control with that 24V..? is it relays? some control signals?
Also how fast you need to switch those signals?
 
If so, how do I increase the output from the pic to 24V for the output wire?

You interface through something like this designed for that purpose. You have not provided any information as to the needed load current? Exactly what are you driving? Next, running the 24 volt supply through a 7805 regulator is not likely the best solution. While it will work for just a low current PIC there are much better DC/DC devices out there depending on your application. All of this comes down to exactly, in detail what you want to do.

Ron
 
Or at lease use cascaded 7815 > 7809 > 7805 if you don't have access to anything better as porposed by Ron and panic mode
 
Last edited:
I really appreciate all the help. I included a wiring schematic of the part of the PCB in question.

I need to control 2 relays (only one will be on at any given time). The signals do not need to switch fast. The maximum expected current draw is 430mA. The datasheet of the LM7805 shows a current output of 1A.

Is 430mA a small enough draw to use a linear voltage regulator (LM7805) and avoid the use of heat sinks or the need of cascading?

View attachment 63447
 
The maximum expected current draw is 430mA. The datasheet of the LM7805 shows a current output of 1A.
As mic5 says, you also need to look at the power dissipation of your LM7805 in your circuit. If you draw 400mA and the voltage across your LM7805 is (24-5 = 19) then the power will be 19*0.4.
if you look at the datasheet you will see that the casing of the regulator have a maximum power dissipation. After that limit you have to use heat sinks.. otherwise, it will go into thermal shutdown (or even worse, it will fry!)

When i told you to use cascaded regulators, it was to limit the voltage drop on each regulator and this limit the power.
 
Last edited:
i felt free to modify your circuit because there are few mistakes. not sure where you get 430mA from what i see, only thing powered by regulator is one IC and my guess is that this does not need so much current (probably few mA at best). note 430mA is 0.430A and power dissipated by regulator is

P=(Vin-Vout)*I

in this case (assuming that huge 0.43A current) we would get:

P=(24-5)*0.43=8.17W

That is quite a lot. One of my soldering irons is 8W...
Not sure where others came up with 10W, that can't be right.
The high current in this circuit does NOT go through regulator, it goes through driver UDN2981.
Also voltage drop across driver output is much smaller than what you see across voltage regulator so dissipated power is much lower.

if high current was expected from voltage regulator:
Linear regulators are good when voltage difference is small (but greater than min. voltage drop which for many regulators is 2.5V). if difference is greater, like in this case (19V), and current is considerable (such as 0.43A), use of switching regulator would be much better idea (same footprint and no heatsink even for max current).
here is example of 7805 substitute that uses switching mode:
https://www.mouser.com/ProductDetai...15-W36-C/?qs=uJpRT2lXVNWg5/3Kq428yerU/ojeO/N1

but... i just notice that this MCU is PIC16F690. this is nanowatt device - it works on ... well, almost air (next to nothing). you definitely don't need heatsink on voltage regulator for load as small as that. good old 7805 will be just fine here.

UDN2981 is powered by 24V. so when MCU output is high, corresponding output will turn on and provide 24V.
for example you can connect load directly to output terminals (3 and 4 for first output, 5 and 6 for second output).
 
Last edited:
. not sure where you get 430mA from what i see, only thing powered by regulator is one IC and my guess is that this does not need so much current (probably few mA at best)

The 430mA come from other unillustrated components not involving the switching mechanism in the schematic. Thank you for correcting the supply current to the UDN2981 driver and giving me an example of a replacement for 7805. The reason for the LM7805 to RB5 and RB7 is to signal the pic when these legs go high. When RB5 or RB7 go high, then the pic will run a series of test to trigger other components.

Thanks again to everyone for helping me work through this problem.
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…