Cascade Linerar Voltage Regulator not working as expected

Thread Starter

bpcosentini_d_ajeta

Joined Jun 1, 2022
6
Hi everyone, I'm new to this forum and I really need your help.
I'm making a school project, a domotic house, but I've run into a problem. The GPIOs of the Raspberry Pi 4 can output at max 3.3V, which was not enough to power my 5V relay, used to run a water pump. So since the entire project is gonna be powered by a 220VAC - 12VDC transformer, I decided to buy two linear voltage regulators, an LM7805 and an LM3940. I'm sure the regulators work but when I connect them in "cascade" both of them output 3.2V. I'm gonna attach the schematic, hoping you can help me figure this out!Screenshot_2.png
(I know this is a pretty bad circuit but I'm not an engineer, yet)
(No capacitors since I forgot to buy them lol)
 

crutschow

Joined Mar 14, 2008
34,282
What is the purpose of D1?

Shouldn't the 5V go to the relay coil through the transistor.
You show it going to the relay contacts.

What voltage does the pump require?
 

Thread Starter

bpcosentini_d_ajeta

Joined Jun 1, 2022
6
What is the purpose of D1?

Shouldn't the 5V go to the relay coil through the transistor.
You show it going to the relay contacts.

What voltage does the pump require?
I misplaced D1, it was between +12VDC and the LM7805,for reverse voltage protection, even tho I'm realizing that's kinda useless. The pump needs only 5V with like 20mA of current, which is too much for the pi.
 

sagor

Joined Mar 10, 2019
903
I would say forget about the 3V regulator. Measure the current through the relay coil with the proper 3V supply. Then, just use the 5V supply with a resistor is series with the coil. The resistor value is chosen to limit the relay current to the same value as when measured with 3V source. In other words, check the relay coil resistance and put a series resistor (ohms law) to limit the current with a 5V source. If the relay draws a really low current, you may get by with a 1/2W or 1W resistor.
Also, Q1 should be switching on the ground side of the relay, not at the supply end
 

Thread Starter

bpcosentini_d_ajeta

Joined Jun 1, 2022
6
I would say forget about the 3V regulator. Measure the current through the relay coil with the proper 3V supply. Then, just use the 5V supply with a resistor is series with the coil. The resistor value is chosen to limit the relay current to the same value as when measured with 3V source. In other words, check the relay coil resistance and put a series resistor (ohms law) to limit the current with a 5V source. If the relay draws a really low current, you may get by with a 1/2W or 1W resistor.
Also, Q1 should be switching on the ground side of the relay, not at the supply end
Thank you to both of you, in the end, I decided to go with a MOSFET (which I found laying around). I will follow your tips. (I'm in UTC+01, so good night)
 

MisterBill2

Joined Jan 23, 2018
18,170
The circuit as shown can not possibly function because the 3.3 volt signal will not be able to switch on the transistor.

The solution is to use an "open collector" type of circuit. This will have the low side (ground) of the GPIO and the transistor emitter connected in common. The 3.3 volts from the GPIO will be able to switch the transistor on fully, and the relay coil will be connected between the + and the transistor collector. Then only the processor module will need the regulated voltages. The transistor/relay circuit can run on either 5 volts if you have a 5 volt relay or 12 volts if you use 12 volt relays. The whole arrangement will be simpler and work better.
 

Thread Starter

bpcosentini_d_ajeta

Joined Jun 1, 2022
6
The circuit as shown can not possibly function because the 3.3 volt signal will not be able to switch on the transistor.

The solution is to use an "open collector" type of circuit. This will have the low side (ground) of the GPIO and the transistor emitter connected in common. The 3.3 volts from the GPIO will be able to switch the transistor on fully, and the relay coil will be connected between the + and the transistor collector. Then only the processor module will need the regulated voltages. The transistor/relay circuit can run on either 5 volts if you have a 5 volt relay or 12 volts if you use 12 volt relays. The whole arrangement will be simpler and work better.
I wanna thank all of you for the given help, in the end, I went with a 7805 to have 5V (I've got a 12V supply), and I connected the emitter of the transistor to the + of the pump, and the collector to 5V. I'm then switching the transistor with the 3.3V of the GPIO. (All the ground is shared).
I don't know if this is a good config or not, so I'd like to hear from you about it.

But for now, ty all.
 

MisterBill2

Joined Jan 23, 2018
18,170
What you have created is an emitter follower circuit and the emitter voltage will not ever be higher than the base voltage.
Look up emitter-follower and you will see the theory behind what I described. THAT is why I suggested the change.
 

crutschow

Joined Mar 14, 2008
34,282
As MB2 noted, the output of the emitter follower will never be more than the base voltage minus the base-emitter voltage drop of about 0.7V, so the emitter voltage would be about 33V - 0.7V = 2.6V in your circuit.
That's why the relay coil should be place in series with the collector, not the emitter of the transistor.
That way the full 3.3V is applied across the relay coil.
 

MisterBill2

Joined Jan 23, 2018
18,170
Consider the more detailed explanation provided by Crutschow: It is correct. So measure the voltage to the pump motor at the motor side of the control. We both suggest putting the load on the collector side for a valid reason that is well explained.
Unless the negative terminal of the pump motor is permanently tied to the supply negative there is no reason to use an emitter follower scheme. Also, because it is not likely that the transistor is fully switched on, the circuit is less efficient and there is more transistor heating.
 

Thread Starter

bpcosentini_d_ajeta

Joined Jun 1, 2022
6
As MB2 noted, the output of the emitter follower will never be more than the base voltage minus the base-emitter voltage drop of about 0.7V, so the emitter voltage would be about 33V - 0.7V = 2.6V in your circuit.
That's why the relay coil should be place in series with the collector, not the emitter of the transistor.
That way the full 3.3V is applied across the relay coil.
Oh I see, I didn't know about this. Ty y'all for the support
 
Top