I've been meaning to update the lightscythe design for a while to make it a bit more user-friendly. I saw that Adafruit did a tutorial on using the LED strip with the Raspberry Pi, and I used it as a starting point.
Using the scythe:
- Prepare your images and put them on the USB stick. Any PNG, GIF or JPG that’s 64 pixels tall is fine.
- If you want to shoot multiple files, I’d recommend naming them with numeric prefixes (e.g. 01cat.PNG, 02dog.PNG), etc so the Pi will find them in the order you want.
- Put the USB stick in the Pi and apply power.
- The scythe boots up, displays the current file number (as a flashing green light on that LED from the top) and automatically
- Black button skips to the next file
- Red button scythes the image. Hold down the red button >1.5sec while displaying and it’ll latch the current image.
- Raspberry Pi: http://www.adafruit.com/category/105
- Length of LED strip, either WS2801 or LPD8806. I use a 2m length (64 pixels)
- Qty 2 of BECs. I used 3A versions, but larger ones would be good.
- Two pushbuttons. http://www.jaycar.com.au/productView.asp?ID=SP0656 or similar
- DC socket, 4 pin socket & plug for the strip, and misc wire.
- LiPo battery or similar power source. Max voltage will depend on the BECs you use. I’m using a 3S battery (~11V), but the BECs are very tolerant so I can also power it off a 5V wall adaptor.
- A suitable staff. OpenBeam is perfect for this, and there’s designs for a lasercut bracket set below. http://openbeamusa.com/
- Some elastic to hold the Pi box against the ‘shoe’.
- Cable ties to secure the strip to the staff.
- Download the lasercutter files from thingiverse: http://www.thingiverse.com/thing:117858
- Lasercut the box and assemble it around the Pi, using PVA glue to hold it in place. I keep the lid unglued and held in by friction.
- Glue the two layers of the ‘shoe’ together. When it’s dry
- Assemble the staff, and attach the shoe plate to it.
- Cable tie the strip to the staff, making sure there are no kinks that will look uneven in photos.
- Solder wire to the strip and leave enough cable to get it plugged into the pi.
- 5V & GND from one of the BECs goes to the 5V line on the GPIO header
- The strip gets 5V & GND from the other BEC. Note it will share a common ground with the Pi.
- The strip’s CLOCK and DATA lines go to the SPI-CLOCK and SPI-MOSI lines on the pi.
- Black button goes to GPIO17, Red button goes to GPIO4. Both have 1k pullups to the 3V3 line.
Raspberry Pi setup:
- Set up your raspberry pi as normal. If you haven’t done this before, check out Adafruit’s tutorials here:
- Edit your /etc/rc.local (need root) to launch the software on boot. Add the following lines:
- check for the USB stick, and run off there if possible. (to be added next time I'm in front of the PC)
- Failing that, run the local copy in /home/pi
- You might also want to install things to make it easier to manage the pi when it’s ‘headless’. Ssh, file servers, etc.
The code is based off the excellent Adafruit tutorial here:
which is almost perfect, but I wanted to add a bit more of a user interface. My mods to the code are pretty rough-and-ready, but should work fine. I’ve added compatibility with other types of strip, ability to use pushbuttons to trigger/cance/skip images, and support for putting multiple files on a USB stick and automatically loading them.
Download the button.py file from the bottom of the page.
Room for improvement:
The hardest thing about any project is deciding what to do and what not to do. I toyed with each of these features before deciding to leave them. If I were doing this every day, this’d be on my list of ‘must-haves’:
- Adding an LCD or other interface to the box, so you can get info on image size, hints on exposure times, etc.
- Have an option to switch between scything left-to-right and right-to-left. Most locations you can walk in either direction, but some of them it’s easier to start from one side than the other. We’ve done shots by the water and I’d much rather walk away from the wet than towards it with my big bag of electronics...
- Add some way of controlling the maximum brightness the strip puts out. Shooting by the city you have to compete against the skyline, but in the woods less is more.
- Add a way of controlling the timing. The default 20 ms between columns seems to work fine, but there are times you want to move faster or slower. This could also be tied in with the brightness above, so fast images get more bright automatically and slow images dim