The first built camera was installed in a remote place with no Ethernet connection, so it had to be WiFi-connected.
The second camera, however, would replace an existing outdated IP camera, so there was Ethernet connection. Considering this, I decided to power it through Ethernet.
Skills required
For this project the skills required are basic.
Software: you should be able to setup and configure Raspberry Pi.
Hardware: a bit more advanced than for a Wi-Fi camera. You should know how to solder, and use a voltage tester, and of course have the equipment.
Components
For an Ethernet connected camera I’ve used the following components:
- Raspberry Pi 2, which I purchased off eBay for $25;
- A camera for Raspberry Pi, which could be also found on eBay for around $10-15 from China (search for OV5647 if unsure);
- A 32Gb MicroSD card bought in a local store for around $9.
- A camera case to hold the camera. I used this case which cost $7, but you can use any other case which would fit the Pi and the power supply.
- A power supply converting 110V to a minimum 7.5V DC; 9-12V is recommended.
- A DC-DC voltage converter based on LM2596. Make sure you purchase a module, not just a chip. Search ebay for “LM2596 module”, they’re typically around $1 a piece.
- Ethernet power splitter. Search for “ethernet splitter injector” on ebay; Around $2-3 a piece
A bit of background: How POE (Power-Over-Ethernet) works
Ethernet cable CAT-5 has eight wires. All eight are necessary to establish 1Git/sec connection, but for lower speeds (100MBps and 10MBps) only four wires are necessary. The other four wires could be used to carry power.
Standard PoE (Power Over Ethernet) equipment provides 48 volts and only to the devices which support it. Such equipment tends to be expensive, so we’ll be using a less expensive approach which will work with any cheap hub. This approach uses Ethernet splitters.
The way Ethernet splitter works, on the input side it has Ethernet socket and jack, and power socket. On the output side it has Ethernet socket and jack, and power jack. The input and output sides are connected through standard CAT5 Ethernet cable with 8 wires. Which wires are used to carry power and which carry the signal, does not matter in this scheme as long as the splitter does not mess it up.
On this image you can see the Ethernet splitter connected through a small patch cord for testing. The input is at the bottom.
It is possible to power your Raspberry Pi through a 5V power adapter connected to the input side of a splitter. However if your Ethernet cable is long enough (longer than a few feet), its impedance will lead to voltage drop, which will depend on Pi power consumption. This would make running Pi unstable.
To compensate for the voltage drop, you need to provide higher voltage. I suggest 9-12V for most cable lengths. Of course, since Pi would fry if powered by 12V, you need a DC-DC converter which would convert the output voltage (which could be 12V or less because it would drop too) to 5V. The best converters are based on LM2596 chip, and are typically offered in a module form, where you connect the input and output (either solder or through terminals). Some are fixed voltage, but most are adjustable voltage, where you use the potentiometer to set the output voltage.
Preparing Power Supply
Unpack the splitter, and connect its input and output using a temporary patch cord. Make sure your patch cord has eight wires and not four (which is common for patch cords packaged with cheap routers)!
Connect the power supply to the input side, either by using the power jack (if matches), or by cutting it off and soldering the wires directly (if it does not).
Cut the power jack from the splitter output side, and connect it to the LM2596 module “input DC”. Make sure you follow the polarity; use the tester on the output wires if unsure/unknown.
Connect the voltage meter to the “output DC” pins of the LM2596 module, and use a small screwdriver to rotate the potentiometer screw to make sure the output voltage is 5V.
Now you can unplug the power, and solder the LM2596 output to Pi power. You can use either the USB socket, or the 5V and GND connections.
![picture2]()
Preparing Raspberry Pi
Download the Rasbpian, and install it into the MicroSD card. Connect the Pi Camera to Pi, and power it with the power supply you made above.
Perform the initial configuration on the Pi. Make sure you enable the camera in the configuration. Power off the Pi, connect it to WiFi. Then connect the camera, and make sure it works (by using raspistill and raspivid).
After you made sure it works, run the following loop, which will record the video non-stop for 24 hours:
while [ true ]; do raspivid -o test.mp4 -t 3600000; rm test.mp4; done
Keep this loop running for at least 24 hours, and check periodically the temperature of the power supply to make sure it doesn’t overheat, and is capable to carry the load.
Preparing the visor
Disassemble the fake camera case, and disconnect the visor from a camera. Remove the part with LEDs, and throw it away.
Cut the stick-it tape, and stick it to the Pi camera on both sides, level by level, until it levels up with the camera lens top. Then wipe the visor glass with rubbing alcohol, and attach the Pi camera to the visor directly.
Don’t worry if the camera is attached upside down; you will be able to flip it programmatically.
Testing the visor
Connect the camera to Pi and connect the receiving part of the splitter to Pi. Connect the sending part of splitter to network, and plug in the power supply. Pi now should be powered through the Ethernet cable. Test it and make sure it is accessible over network, and that camera works.
![picture3]()
Assembling the camera
Screw the visor to the camera body, insert Pi inside, and check the fit. You might need to trim the Ethernet jack so the camera case would close properly.
When putting Pi back in, remember that the MicroSD card on RPi is spring-powered, so if you push too hard on it against the glass, you’d eject the card from RPi.
![picture4]()
Finishing
Screw the camera back in, and put back the top cover. If water-proofing is needed, cover all the seams with waterproof electrical tape. I also recommend taping the top cover to the camera case as it is not sturdy.
Put back the battery cover, and the top cover. If water-proofing is needed, cover all the seams with waterproof electrical tape. I also recommend taping the top cover to the camera case as it is not sturdy.
Now do the final test, and you’re all set to mount the camera.