0
\$\begingroup\$

Background

I have a RaspberryPi-controlled irrigation sprinkler system that I am working on. I would like the RaspberryPi and the Solenoid Valve (when the Solid State Relay is closed) to pull power from the same source. I would like to verify I have calculated the correct resistance in the diagram that results in a 5V supply to the RaspberryPi (and that all other connections look ok).

Method

  1. The Pi and SSR are in parallel thus both subject to the same 120VAC
  2. A Pi normally draws 2.5A using 5V resulting in an effective resistance of 2.04 Ohms (V=IR)
  3. Treating the Pi loop as a series circuit, I can get the current across the resistor R by obtaining R_eff=R+2.04 and I=V/R_eff
  4. I must then find the voltage drop across the resistor R that results in 5V supplied to the Pi: 5V=120-dV_R which is the same as dV_R=120-5V=115V
  5. I know how have: dV_R=115V and I=120/(R+2.04) and dV_R=I*R

Solving these equations results in R=46.92 Ohms

enter image description here

Did I do all of this correctly?

Components

Another Thought

If the 120VAC power is coming through 12-14AWG wire, what is the best way to "connect" that to the resistor that meets the Pi power supply? That is, on paper these connections look fine to me but in practice, how would you do this?

\$\endgroup\$
  • 1
    \$\begingroup\$ What power supply? What is it? there is no information in the post about a power supply. The diagram suggests that 110V is connected directly to the Pi \$\endgroup\$ – Voltage Spike Aug 5 at 17:05
  • 1
    \$\begingroup\$ @Voltage Spike Oh yes sorry - my thought was to just splice an extension cord or something (basically just straight from a household wall outlet) \$\endgroup\$ – Sterling Butters Aug 5 at 17:06
  • 2
    \$\begingroup\$ that's a killer sprinkler system, and not in a good way \$\endgroup\$ – jsotola Aug 5 at 17:27
2
\$\begingroup\$

The raspberry Pi cannot be connected through a resistor to AC mains. One because it is AC, and the Pi requires DC. Secondly, because it is not safe (AC mains should be isolated). Thirdly, because there is no regulation.

By regulation, the Pi is a variable power load, the 2.5A is a max spec, so sometimes it might need less than 2.5A. Lets say it needs 1A then you would need a 115V/1A = 115Ω resistor (or if you had a fixed resistor of 46Ω then it would only drop 55V and the pi would be exposed to more than 60V which would fry it)

You need a 120V AC to 5V DC power supply

| improve this answer | |
\$\endgroup\$
  • 1
    \$\begingroup\$ Got it, is there any way to make one power connection (to the wall) to power both the Pi and the Valve? \$\endgroup\$ – Sterling Butters Aug 5 at 17:32
  • 1
    \$\begingroup\$ Not with one resistor, you'll need to insert a AC USB 5V AC to DC converter between the PI and AC mains. You could 'roll your own' power supply but it would be big bulky and hard to make and potentially unsafe. At minimum you need a transformer between the Pi and AC mains, then you'd need a regulator. Power supplies provide isolation (for safety) and regulation \$\endgroup\$ – Voltage Spike Aug 5 at 17:35
  • 1
    \$\begingroup\$ Awesome, can you refer me to some compents to achieve this? \$\endgroup\$ – Sterling Butters Aug 5 at 17:36
  • 1
    \$\begingroup\$ Yep, there is a recommended charger in the Rasp Pi store. \$\endgroup\$ – Voltage Spike Aug 5 at 17:39
  • 1
    \$\begingroup\$ like this? amazon.com/OSMW2-5V-Power-Supply-0-3A-120VAC/dp/B009IRD9YA and just replace the resistor with it in the P&ID? \$\endgroup\$ – Sterling Butters Aug 5 at 19:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.