# 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

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?

• 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 – Voltage Spike Aug 5 at 17:05
• @Voltage Spike Oh yes sorry - my thought was to just splice an extension cord or something (basically just straight from a household wall outlet) – Sterling Butters Aug 5 at 17:06
• that's a killer sprinkler system, and not in a good way – jsotola Aug 5 at 17:27