OK, so what do I need to do to connect an electrical outlet to the web?
- Drive a 5V relay with a 3.3V output (because I don't have any 3.3V relays.)
- Get the Pi working on a WiFi connection
- Write some software for the Raspberry Pi that lets me turn on/off a GPIO pin
- Get a web page connected to the GPIO switch app.
- Wire it up
- Test it
- House it in a pet-proof plastic enclosure
The hardware is the easy part. I need to switch a 5V relay with a 3.3V output on the RPi. I think an NPN transistor, a resistor, a diode and a relay will do the trick.
So, first I'll wire this up and test it with 3.3V input, to simulate the GPIO.
I need 5V for the Raspberry Pi, so I can use the same power supply for the relay. I'll probably hack an existing wall wart to enclose in the box with the RPI and relay circuit.
Next time: Load the RPi with the latest Raspbian and get WiFi working.
No comments:
Post a Comment