2 power sources in one circuit.

Thread Starter

SirFico

Joined Nov 12, 2016
3
I'm just starting to learn about electronics, a real beginner, so whilst not homework as such, its a question I set myself that I don't understand the answer to.

The problem is what happens if 2 power supply sources are mixed in a circuit. I have an Raspberry Pi and a DHT22 temperature sensor that I wired up to the PI. Vin, Ground, and to a data pin. A resistor goes between the Vin and the data pin. This all works nicely and I get temperature readings.

My next trick is to put the DHT22 on to a breadboard for further tinkering. My Breadboard has its own power supply (the same voltage as the Rpi) and I was going to use this to power the DHT22. But then I though, not so fast, I will be wiring the VIn and Ground on the DHT22 from the breadboard power supply, but the data line goes to a RPi pin. A resistor goes between the Vin and the data line.

I don't know if this is OK or not or if I will fry my RPi or DHT22. I feel its a bit iffy but my electronics knowledge is very limited and I'm part way through the excellent tutorial on DC circuits found on this site with much more to learn so any advice would be appreciated.

Thanks
 

ericgibbs

Joined Jan 29, 2010
18,848
hi SirF,
The Pi operates on a 5V power voltage as does the DHT22.
Why not power the Pi and DHT from the same voltage, the resistor should be a pull up to 5v
E
 

Thread Starter

SirFico

Joined Nov 12, 2016
3
I see what you mean, I suppose that would make it all just one circuit. I could do that but I was trying to get an understating of any problems if I should wire it up with two power sources. But thinking about it a bit more, if I just connected the ground on the RPi to the ground on the BB power supply I'm thinking that two positive supply voltages on one circuit would work OK. I think so..... I should probably boldly go and see what happens, I hope its not a fried pi :(
 

Thread Starter

SirFico

Joined Nov 12, 2016
3
I attach a jpeg of my circuit. The batteries shown as the power to the breadboard is in fact a wired power supply of 5V (can be switched to 3.3 volts). The arduino is in fact a Rpi and it is separately powered. The sensor on the breadboard has a Vin, data, and ground pins. The resistor is put between the Vin and Data pins (just following instructions on this). The data pin goes to a pin on the Rpi to read the data. I understand it also sends a signal to the sensor to trigger the data being returned. As said, if the sensor is powered directly from the 5v and Ground pins on the RPi then all is OK and I can get temperature readings.

I thought I would transfer the sensor to a breadboard to tinker some more, starting with powering some additional but different sensors to see if I get the same reading by triggering them all at the same time (each sensor being wired to a different data pin on the RPi) Anyway the enclosed circuit was what I was contemplating which gave me pause for thought. I'd be using 2 different power supplies, one to the breadboard and one to the Rpi. Of course I can simply do away with the power supply to the breadboard and take it from the RPi, but I was looking for an understanding if the circuit with 2 power supplies was OK. Further thoughts were that if I link the ground of the BB power supply to a ground pin on the Rpi then all could be OK. But any advice or comments would be welcome.
 

Attachments

ericgibbs

Joined Jan 29, 2010
18,848
hi SirF,
Look at this marked up image.
Confirm that the socket is coded as +5v and Gnd and use them to power the DHT22.
Drop the battery, it would only give you 3v anyway.
E

BTW: if the DHT22 wires to Pi are long, add a 1uF cap to to the project power rails for decoupling.
 

Attachments

Last edited:
Top