Tuesday, 4 July 2017

Raspberry Pi Zero - First ever Night Vision Slow motion ScopeCam exploding target

So I've actually done something worth while.

I have managed to take the Raspberry Pi Zero and turn it into a slow motion night vision scope cam.

Just a bit of target shooting but you can see the pellet clearly flying through the air.

https://www.youtube.com/watch?v=Ea6t7xs9J3w

Thursday, 4 May 2017

DIY Night Vision - Raspberry Pi Zero project

I have mentioned before that I had wanted to build a night vision kit using the Raspberry Pi but one of my main reservations was the size of the Raspberry Pi's.

The first, second and third revisions were still to big in my opinion however then came along the Raspberry Pi Zero. A tiny circuit board with the ability to connect a Raspberry Pi Noir camera to it for HD video!!!!

So here is the parts list

1. Raspberry Pi Zero version 2
2. Raspberry Pi NOIR camera V2
3. 2 x 18650 batteries
4. 12v to 5 v voltage dropper
5. 16gb Micro SD card
6. 3d printed case to hold the RPi Zero and camera

The tools required are:

1. Soldering iron
2. Small cross head and flat head screw driver
3. Multimeter

The wiring diagram is simple enough to follow.



WARNING

You must make sure that you have used the multi meter to test the output voltage is 5v. If you fail to do this you run the risk of permanently damaging your Raspberry Pi. You have been warned.


First you must identify the video output for your screen. These are two solder points on the Raspberry Pi zero board. The Yellow wire from your screen should be wired to the 'TV' solder point and the Black cable wired to the solder point to the left, see images below.



The screen cable can now be cut to your desired length by cutting just behind the junction where the three connectors meet. This will expose:

1 Red wire - positive
1 Black wire - negative
1 Yellow wire - video feed
1 White wire - audio (not required)

Tip: it is best to cut back only little amounts at first. Cutting back too much might leave you in a position of having a wire too short.

Using the red cable connector that you have just cut strip back the outer casing. You should find, if your lucky, both a red and black wire. (GM insert picture).

Now solder the red wire to the 5v input pin (GM insert picture) and solder the black wire to the ground pin.

Now take a red wire and solder it to the '+' of the voltage dropper and take a black wire and solder it to the '-' of the input side. Note it is important to get this part correct.

Place your batteries into your battery holder and test with your multi meter for voltage coming out of the wires. The voltage should read around 7.4v. You then need to temporarily connect the postitive and negative wires to the voltage dropper. (GM take picture). You can now test the output voltage on the voltage dropper. You need to use the adjustment screw to reduce the voltage to 5v ideally but slightly over by 0.1v is ok.

You can now solder the '+' and '-' wires from the output on the voltage dropper to the Raspberry Pi Zero the 5v input solder point and ground pin when you are happy with length of you wires.

Taking the remaining red wire from the screen cable and connect this to the other end of the input '+' voltage dropper. You can then either use a spade connector to crimp the cables together to push onto your DC jack or solder it to the specific connector. (GM take picuture)

Take your DC jack and identify the positive and negative points, you can either solder the contacts or use spade connectors

Enter

Sudo raspi-config

Enable the camera
Enable SSH

Then reboot

On reboot type

Sudo nano /etc/rc.local

above the line

exit o

Type "sudo home/pi/cameraboot.sh"

Press ctrl+x and save

Next type

sudo nano

Next type "sudo raspivid -t 0 -o"

Press ctrl+x then type cameraboot.sh as the file name you wish to save.

Next type "sudo chmod +x cameraboot.sh" this will set the file to be executable.

If you have done everything correctly and wired up the PI in the way shown above the next time you power the PI it will show the camera on the screen permanently.

For slow motion footage enter the following instead in your file cameraboot.sh

#!/bin/bash
while true
do
sudo raspivid -w 640 -h 480 -fps 90 -t 180000 -o /home/pi/tester.h264 && sudo mv /home/pi/tester.h264 /home/pi/test_$(date +%d-%m-%Y-%s-%H).h264
done

If you have managed to get it all up and running your footage shall be something like this

Slow Motion Night Vision shooting videos