DIY – [protofusion] http://protofusion.org/wordpress Open Hardware and Software Thu, 29 Nov 2018 18:19:57 +0000 en-US hourly 1 https://wordpress.org/?v=5.6.13 11753368 New Product: CANable Pro – Isolated USB to CAN Adapter http://protofusion.org/wordpress/2018/11/new-product-canable-pro-isolated-usb-to-can-adapter/ http://protofusion.org/wordpress/2018/11/new-product-canable-pro-isolated-usb-to-can-adapter/#respond Thu, 29 Nov 2018 18:19:08 +0000 http://protofusion.org/wordpress/?p=2975 ]]> CANable Pro Isolated USB to CAN Adapter

The CANable Pro is a low-cost fully isolated USB to CAN adapter. Connect to any CAN2.0A/B network without worrying about common mode offset, ground noise, or damaging your computer! The CANable Pro is open-source hardware that is manufactured in the USA.

The CANable Pro provides the same serial-line CAN interface on Windows, Linux, and Mac as the original CANable but also features breakaway mounting holes, enhanced ESD protection on both CAN and USB, and full galvanic isolation.

Just like the original CANable, the CANable Pro supports the alternative candlelight firmware which enumerates as a native CAN interface on Linux for ease of integration into embedded systems and works with the cangaroo software on Windows and Linux for easy viewing and transmitting of CAN packets.

CANable Pro is now in stock at the Protofusion Labs store

Features

  • Supports CAN2.0A and B, baud rates up to 1M
  • Full galvanic isolation
  • Breakaway mounting points
  • Additional ESD/transient protection on CAN and USB interfaces
  • Serial-line can (slcan) interface for Mac, Windows, and Linux
  • Native Linux and enhanced Windows support with candlelight firmware
  • 3-pin screw terminal with CANH, CANL, and GND
  • Button for entering the bootloader
  • Jumper to enable/disable termination
  • Made in the USA!
]]>
http://protofusion.org/wordpress/2018/11/new-product-canable-pro-isolated-usb-to-can-adapter/feed/ 0 2975
HydroBot: Prototyping New Modules http://protofusion.org/wordpress/2017/07/hydrobot-prototyping-new-modules/ http://protofusion.org/wordpress/2017/07/hydrobot-prototyping-new-modules/#respond Sat, 22 Jul 2017 23:00:30 +0000 http://protofusion.org/wordpress/?p=2597 ]]>

ProtoModule is a HydroBot module designed to easily develop and test new monitoring or control functions that may someday go into a HydroBot module. It has 11 GPIO pins and the power rails broken out on a 0.1” pin header for easy breadboarding or interfacing with ribbon cables. The provided pins give access to a variety of digital and analog I/O, as well as digital communication peripherals, to allow for many flexible design options.

ProtoModule Features:
  • STM32F0 microcontroller
  • 11 GPIO Pins
  • 0.1″ Pin Header Breakout
  • 3 LEDs to indicate device status
  • 6-30V input works with 12V and 24V systems
  • JST-PA series connectors
  • Parallel bus connections for daisy-chaining
  • Protofusion pogo programming interface
  • Open source design

Since it is intended to be used as a development board, this module has no predefined behavior. The 11 GPIO pins were selected to provide a broad range of functionality and can be used as analog, digital, or frequency inputs, digital, or pwm outputs, SPI, I2C, or UART communication ports, timer/counter channels, and more. This flexibility enables interfacing with a variety of sensors and actuators, which will be useful in testing out new HydroBot features before integrating them into dedicated modules.

All source can be found in the HydroBot repository, including firmware source code and hardware files. The BOM and generated gerber files are also included for easy replication.

]]>
http://protofusion.org/wordpress/2017/07/hydrobot-prototyping-new-modules/feed/ 0 2597
HydroBot: Connecting the Modules http://protofusion.org/wordpress/2017/02/hydrobot-connecting-the-modules/ http://protofusion.org/wordpress/2017/02/hydrobot-connecting-the-modules/#respond Sun, 05 Feb 2017 23:54:37 +0000 http://protofusion.org/wordpress/?p=2595 ]]>

HydroHub is a HydroBot module designed to connect together HydroBot modules in a star topology. The hub provides power and CAN connectivity to a total of eight channels. It has a DC barrel jack for connecting an external power supply, as well as selectable termination for the CAN bus.

HydroHub Features:
  • 8 channels for connecting HydroBot modules
  • 5.5mm DC barrel jack for power input
  • 6-30V input works with 12V and 24V systems
  • Selectable 120Ω CAN bus termination resistor
  • Power indication LED
  • JST-PA series connectors
  • Open source design

JST-PA Series Connectors

This design introduces the switch to JST-PA series connectors for HydroBot modules. These connectors, although somewhat bigger and more expensive than the JST-ZH connectors used previously, will allow for lower gauge wiring and much higher currents than before. The new connectors support 22-28 gauge wiring and up to 3A per pin. All new module designs going forward will use JST-PA connectors and existing modules will be updated as part of the next revision cycle. The first module that has been updated to include the new connectors is the AirSense module, which has also added a light sensing feature. Other HydroHub features to note include a constant current driver for the power indication LED to keep brightness consistent over the entire input voltage range, and a CAN bus termination resistor that can be selected using a simple jumper to accommodate the needs of various network topologies.

All source can be found in the HydroBot repository. The BOM and generated gerber files are also included for easy replication.

]]>
http://protofusion.org/wordpress/2017/02/hydrobot-connecting-the-modules/feed/ 0 2595
HydroBot: Switches and Relays http://protofusion.org/wordpress/2016/09/hydrobot-switches-and-relays/ http://protofusion.org/wordpress/2016/09/hydrobot-switches-and-relays/#respond Wed, 14 Sep 2016 22:00:32 +0000 http://protofusion.org/wordpress/?p=2493 ]]>

RelayDrive is a HydroBot module designed to drive relays and other electro-mechanical devices. It consists of 4 low-side outputs, each rated for 1A continuous current, as well as 4 digital inputs, and is controlled over CAN. This module is intended to drive mechanical relays, solid state relays, and solenoids for controlling devices such as lights, pumps, heaters, fans, and valves in a HydroBot hydroponic system. 

RelayDrive Features:
  • STM32F0 microcontroller
  • 4 low-side 1A outputs
  • 4 opto-isolated digital inputs
  • 3 LEDs to indicate device status
  • 6-30V input works with 12V and 24V systems
  • JST-ZH series connectors
  • Parallel bus connections for daisy-chaining
  • Protofusion pogo programming interface
  • Open source design

Each of the outputs of the RelayDrive module can be controlled as discrete on/off switches, or can be configured as PWM outputs. Each of the inputs can also be independently configured as digital inputs or frequency inputs. Frequency inputs are measured in Hz and can currently read input signals up to 1KHz. The default firmware uses a CAN baud rate of 500K. It sends out status messages on ID 0x204, with digital or frequency input readings, and receives command messages on 0x203 to control outputs and set input and output configuration.
IMG_2503

Because many devices in a hydroponic system run on mains power and require relays for control, I packaged up 4 solid state relays in a 2 gang electrical box. This keeps all the relays together without exposing any hot wires, and the 4 controlled outlets match up nicely with a single RelayDrive module.

All source can be found in the HydroBot repository, including firmware source code and hardware files. The BOM and generated gerber files are also included for easy replication.

]]>
http://protofusion.org/wordpress/2016/09/hydrobot-switches-and-relays/feed/ 0 2493
HydroBot: Measuring Atmospheric Conditions http://protofusion.org/wordpress/2016/07/hydrobot-measuring-atmospheric-conditions/ http://protofusion.org/wordpress/2016/07/hydrobot-measuring-atmospheric-conditions/#respond Fri, 15 Jul 2016 23:00:59 +0000 http://protofusion.org/wordpress/?p=2467 ]]> AirSense

AirSense is a HydroBot module designed to measure air temperature, relative humidity, and barometric pressure. It uses the Bosch BME280 atmospheric sensor to take measurements and sends the results out over CAN. The module can measure temperatures from 0 to +65°C with ±1°C accuracy, humidity from 0 to 100% with ±3% accuracy, and pressure from 300 to 1100 hPa with ±1 hPa accuracy. Three LEDs indicate device status, CAN activity, and error states.

AirSense Features:
  • STM32F0 microcontroller
  • Bosch BME280 atmospheric sensor
  • 6-30V input works with 12V and 24V systems
  • JST-ZH series connectors
  • Parallel bus connections for daisy-chaining
  • Protofusion pogo programming interface
  • Open source design

The default firmware uses a CAN baud rate of 500K and sends out messages on ID 0x201. Temperature is recorded with 0.01°C resolution, and is sent in bytes 3 and 4 of the CAN message data. Humidity is recorded with 0.01% resolution and is sent in bytes 5 and 6. Pressure is recorded with 0.1 hPa resolution and sent in bytes 7 and 8. By default, sensors readings are taken every 100ms, and a message containing averaged measurement data is sent out once every second. Future firmware work will add module configuration over CAN with settings including CAN baud rate, CAN id, data frequency, sensor calibration, and more.

All source can be found in the HydroBot repository, including firmware source code and hardware files. The BOM and generated gerber files are also included for easy replication.

]]>
http://protofusion.org/wordpress/2016/07/hydrobot-measuring-atmospheric-conditions/feed/ 0 2467
HydroBot http://protofusion.org/wordpress/2016/07/hydrobot/ http://protofusion.org/wordpress/2016/07/hydrobot/#respond Fri, 01 Jul 2016 23:00:39 +0000 http://protofusion.org/wordpress/?p=2424 ]]> HydroBot

HydroBot is a modular control system for automating hydroponic gardens. This system is designed with three objectives in mind. First, it will facilitate optimal growing techniques by using scheduling and feedback control loops to maintain state and adapt to changing conditions. Second, it will simplify controls interfaces, making setup and use easier for less tech-savvy gardeners. Finally, the components will be designed in a modular way to increase flexibility and support every imaginable garden configuration. HydroBot aims to bring sensors and actuators together through automation, which will allow hobby growers to focus on growing and not on constantly monitoring and adjusting the environment to keep their garden stable.

Why hydroponics?

NFT Hydroponic System

NFT Hydroponic System

As the world population continues to grow and become increasingly connected, more attention is being focused on the disparity in living conditions across the globe. The further technology advances, the harder it is to believe that people in many parts of the world still struggle with attaining basic human necessities such as access to clean water and sustainable nutrition, and yet these issues remain unresolved. Addressing these problems will require collaboration from the global community, and I believe that hydroponics has the potential to be at least one part of the solution. Let’s look at the reasons why hydroponic gardening is superior to traditional agricultural methods.

  • Hydroponics requires less space than traditional gardens when taking advantage of vertical space by stacking growing systems on top of each other.
  • By tweaking the environment and nutrients given to the plants in real-time, hydroponics can speed up the process of growing plants by as much as 50% [1].
  • Because the system is closed-loop, hydroponics can also use up to 90% less water than traditional farming methods [2].
  • Plants can be grown year-round, increasing space utilization in the winter months.
  • The absence of dirt means produce is cleaner, and the clean environment means less bugs to damage the crop and no weeds to worry about.
  • With greater control over the nutrients being fed to the plants, they can be grown to contain more vitamins and minerals as well as improved taste.

The biggest downside to hydroponic gardening is the cost and complexity of the system required to support it – and that’s where HydroBot comes in.

The HydroBot Vision

HydroBot looks to solve the problem of controlling a complex hydroponic system through automation, simple interfaces, and flexible design. Automation will be accomplished through the use of an embedded computer that will handle all the feedback control loops and scheduled tasks. The embedded computer will communicate with a server to provide data logging and an easily accessible remote interface. The server will also host a webpage with data graphs and user controls, and have to ability to send out critical system alerts. To make the system flexible, a modular architecture will be used for all functions that interact with the physical world, such as sensors and actuators. Each function will have a corresponding module to carry out that specific task and report back to the embedded computer, which will act as a central hub for these modules. A multi-drop communication network will be used to connect the modules to each other and to the central hub. A block diagram of this system architecture can be found below.

HydroBot Block Diagram

HydroBot Block Diagram

Implementation Details

Although each module will be developed separately as the need arises, there are some high level system design decisions that will dictate the requirements for the modules. CAN has been chosen as the primary communication network for HydroBot, because it meets the multi-drop requirement, works well over relatively long distances, is very robust to environmental noise, handles errors gracefully, and has built-in arbitration and message priority. Support for additional communication protocols may be added in the future as needed – for instance, if an application requires wireless communication. To make the system as flexible as possible in a variety of applications, both 12V and 24V power will be supported. Modules will also be daisy-chain-able and allow up to 1A of pass-through current. To keep connectors consistent, JST ZH series has been chosen for module connections when possible. To keep a consistent code base and shared libraries across modules, STM32 microcontrollers will be used as the standard for module processing.

Several key modules have been identified to fulfill the basic functions required in most hydroponic systems:

  • Environmental sensor to monitor air temperature, humidity, and pressure
  • Water reservoir sensor to monitor water level and temperature
  • Relay driver to control pumps, lights, heaters, etc.
  • Dosing pump driver to control nutrient mixing
  • Nutrient sensor to monitor salinity and pH
  • Light sensor to monitor grow-light output

The possibilities for module development are endless, and additional modules will be developed as they are needed.

Summary

Deep Water Culture Hydroponic System

Deep Water Culture Hydroponic System

Hydroponics may be a good solution to many of the world’s food-related problems, but the barrier to entry is still very high for most people. HydroBot hopes to solve that by creating an automated control system that is easy to use and flexible enough for any garden setup.

 

 

Sources:

  1. https://www.hydroponics.net/learn/hydroponic_gardening_for_beginners.php
  2. http://swes.cals.arizona.edu/environmental_writing/stories/2011/merrill.html
]]>
http://protofusion.org/wordpress/2016/07/hydrobot/feed/ 0 2424
Crazyflie 2.0 Review http://protofusion.org/wordpress/2015/03/crazyflie-2-0-review/ http://protofusion.org/wordpress/2015/03/crazyflie-2-0-review/#comments Sat, 14 Mar 2015 03:37:45 +0000 http://protofusion.org/wordpress/?p=2108 ]]>

Crazyflie 2.0

The Crazyflie 2.0 is a second generation nano quadcopter created by Bitcraze as part of their open-source flying development platform. Available for $180 from Seeed Studio, this developer-friendly kit seemed like the perfect way to dip my toes into the increasingly popular world of hobbyist drones. I went for the developer combo package, which included the Crazyflie kit, Crazyradio, JTAG debugger, and a couple breakout/prototyping boards for $215. I also purchased a few spare batteries to extend my flight time, a decision I definitely haven’t regretted.

Crazyflie Packaging

Crazyflie Packaging

When I received my Crazyflie 2.0, I was greatly impressed by the packaging. I guess I should have expected something nice given the amount I paid for it, but anything coming from China automatically starts with low expectations in my book. The pcb and parts were all organized and bagged separately and appeared to be of decent quality. Assembly was a breeze, with plenty of instructions and tips to be found on their web page, although no printed material was included in the box. After I assembled the copter, I noticed that the motor mounts (which also function as legs) felt a bit flimsy, and I was concerned that they would not withstand the abuse to which they could soon be subjected.

Getting the Crazyflie out of the box and into the air using the Android app over Bluetooth was a piece of cake. Keeping it in the air, however, wasn’t quite so easy. It took me a while to get used to the controls, and using touchscreen joysticks certainly didn’t help. Fortunately, hooking up a PS4 controller significantly improved the experience. The Android app has a number of limitations, and needs some more development work, so I quickly switched over to the PC client using the Crazyradio and PS4 controller. The PC client is more complete, and includes features such as sensor feedback, data logging, and hover mode. When placed in hover mode, the Crazyflie attempts to maintain a constant altitude using its built-in altimeter and IMU. This feature is still under development according to the Crazyflie wiki, and it shows, but it is usually better than trying to hold altitude manually. With an ever-expanding feature set, I’m sure the PC client will only get better with time.

Crazyflie PC Client

Crazyflie PC Client

I was very impressed with the durability of the Crazyflie, especially considering my initial misgivings. I suppose the feather-light weight of the quadcopter helps to minimize damage, but I certainly did a good number of terrible things that could have easily destroyed it. I ended up breaking off several of the legs over the course of a few days, but since each mount has two legs, it can carry on just fine without a few of them. Thankfully, a few extra motor mount/legs are included in the kit.

Because the Crazyflie was designed with developers in mind, the creators have gone to great lengths to ensure that development is accessible to everyone. They have detailed instructions on the Crazyflie wiki page on how to set up development environments for each of the components, and have even created a virtual machine image with all of the development tools pre-loaded. Better yet, they added wireless flashing on the quadcopter, so new firmware can be uploaded on the fly. These features, paired with their development “decks” (add-on breakout/prototyping expansion boards), open up endless development possibilities. Anyone who has dabbled in coding should be able to dive in and add something new.

All-in-all, the Crazyflie is an entertaining toy to play with. It may not be capable of any real work, such as carrying a camera, but it is very fun to fly around and its small size makes it possible to fly indoors. Probably the most attractive aspect of this quadcopter, however, is the development opportunities it opens up. For example, it would be an ideal platform for a flying robot swarm. Or it could be programmed to autonomously navigate using distance sensors. Plus, if you add some cool features, I’m sure the community would appreciate contributions to the source code.

]]>
http://protofusion.org/wordpress/2015/03/crazyflie-2-0-review/feed/ 2 2108
Low Cost DIY Photobooth http://protofusion.org/wordpress/2015/02/low-cost-diy-photobooth/ http://protofusion.org/wordpress/2015/02/low-cost-diy-photobooth/#comments Mon, 16 Feb 2015 02:39:34 +0000 http://protofusion.org/wordpress/?p=1971 ]]> Sample Photobooth Photostrips

Sample photobooth photostrips

Photobooths are popular at many types of social events, including weddings, birthday parties, and school dances. However, renting one can easily cost upwards of $1000, making them impractical for many events. So when a friend mentioned wanting one for her wedding, I jumped at the opportunity to build a low-cost DIY photobooth.

To make my photobooth cost-efficient, I decided to use a thermal receipt printer to print out black and white photo strips, which eliminates the need for an expensive photo printer and photo paper/ink. I also added Twitter integration so the photobooth can tweet out every photo strip it takes, and a QR code generator that prints a link to the corresponding Twitter post on each photo strip.

The BeagleBone Black single-board computer seemed like a perfect match to power this project, and I decided to script everything in Python to keep it simple. Gphoto2 provides the camera interface, CUPS handles the printing, and Python libraries take care of everything else.

Lets get into the details of how this thing works.

Electronics

BeagleBone Black

BeagleBone Black

The BeagleBone Black will boot up into a usable state without any setup required. However, I found that some gPhoto2 functions did not work with the Debian install that came preloaded on my BBB. To solve this issue, I switched to Arch Linux ARM. Instructions on installing Arch on the BeagleBone can be found here.

The basic features I wanted the photobooth to have are user input to start a photo sequence, camera control to take pictures, Twitter communication to tweet photos, and support for printing the final product. Thankfully each of these features is relatively easy to implement with Python.

I used Python 3 to allow support for some newer Python libraries. Unfortunately, this eliminated the possibility of using Adafruit’s Python GPIO library, which is only compatible with Python 2. Instead, I used the manual approach of exporting the GPIO pins to files in the /sys/class/gpio/ directory and reading the pin status values from the files. In Python, it looks a little something like this:

import io

# export pin 7
f = open('/sys/class/gpio/export', 'w')
f.write('7')
f.close()

# define pin 7 direction as input
f = open('/sys/class/gpio/gpio7/direction', 'w')
f.write('in')
f.close()

# read pin 7 status
f = open('/sys/class/gpio/gpio7/value', 'r')
status = f.read()
if("1" in status):
    # do something
elif("0" in status):
    # do something else
f.close()

# unexport pin 7
f = open('/sys/class/gpio/unexport', 'w')
f.write('7')
f.close()

The GPIO pins can be used to capture button presses and trigger the photo sequence.

The primary function of a photobooth is to take pictures, so if nothing else we’re going to have a camera in the setup. The Gphoto2 library takes care of camera integration and simplifies it down to just a few commands. The library supports thousands of camera models, so chances are your camera will work. A list of supported cameras can be found here. Since I wanted to take 4 pictures in a row with even spacing and immediately download the pictures, I used the following command and arguments:

gphoto2 --capture-image-and-download --interval=3 --frames=4 --filename /tmp/portrait%n.jpg --force-overwrite

The arguments can be modified to fit various needs—for example, saving the photos on the camera’s internal memory after they have been downloaded.

I wanted to display live view from the camera on a monitor that would allow users to see themselves as they pose for pictures, but I wasn’t able to get this working. Gphoto2 seems to turn off live view on my camera after the first picture is taken, and it won’t come back on until the camera is power-cycled. I will be working to find a solution for this issue in the future, possibly by streaming the live view video to the BBB and displaying it from there, or by replacing the camera with a high-def web cam, but until then I will live without it.

To give the user feedback when each picture is taken (in the absence of live view), I decided to turn on the camera flash, even though using the built in flash is less than optimal. Without this feedback, it is difficult to tell when each picture is being taken and when the set is finished. To minimize the blinding effect a bright flash tends to have, I turned down the flash brightness to around a 16th of its usual strength.

Because a photobooth tends to be fairly dark, and since I wasn’t relying on the flash for full lighting, I added some extra lighting to the setup. I decided to use Protofusion’s Luma lighting system to give me flexible control over the lighting through the BeagleBone Black. This allowed me to easily set the lighting levels and give some additional feedback regarding program state or errors by flashing the lights different colors. Using the Luma LED Strip Driver and an LED strip, I was able to string lighting around the top of the booth and light it with a soft, distributed light. In the absence of such a high tech lighting system, any standard light source could be used. If the light source tends to be direct and harsh, I would recommend some type of diffuser to distribute and soften it out a bit.

DYMO 400 Printer

DYMO 400 Printer

I picked the Dymo 400 Labelwriter to print the photo strips because I could find it on eBay for pretty cheap, and it seemed widely used and supported. To use it with the BBB, I installed the CUPS printing system and found the Dymo driver in the Arch User Repository (I recommend Packer for installing packages from the AUR). Here is a good tutorial on installing and configuring CUPS.

To make the Dymo 400 print the way I wanted, I had to make a few tweaks. When I chose the “Continuous Feed” paper option in CUPS, it would print a large margin at the top of strip, so I tried setting a custom paper size. No matter what custom paper size I set, the printer would always print out the strip, and then print out an equal amount of blank paper. There may be a solution to this, but I was unable to find it. So the work around I used was to manually change the default printing settings for the printer, by going through the printer configuration file and changing the printable area for the “Continuous Feed” paper option. The modified file can be found below.

To format the individual photos into one photo strip, along with some text and a QR code at the bottom, I chose the ImageMagick command line image editing tool. I used the convert -append command to assemble all the photos into one image. The one problem I found here was that the large photos taken by the camera were too large for the program to combine into one with the limited RAM on the BeagleBone. Instead, I resized each of the photos and then assembled the smaller images. Since the Dymo 400 printer has a printable width of 672 pixels, I converted all the images down to that size. Here is the sequence of commands I used to assemble a photo strip:

# resize each of the pictures and add a border to make them go together nicely
convert /tmp/portrait1.jpg -sample 26% -bordercolor '#FFFFFF' -border 2x20 /tmp/portrait1.jpg
convert /tmp/portrait2.jpg -sample 26% -bordercolor '#FFFFFF' -border 2x20 /tmp/portrait2.jpg
convert /tmp/portrait3.jpg -sample 26% -bordercolor '#FFFFFF' -border 2x20 /tmp/portrait3.jpg
convert /tmp/portrait4.jpg -sample 26% -bordercolor '#FFFFFF' -border 2x20 /tmp/portrait4.jpg
# put the pictures all together and add the protofusion logo
# this is the version I tweeted
convert -append /tmp/portrait1.jpg /tmp/portrait2.jpg /tmp/portrait3.jpg /tmp/portrait4.jpg /root/protofusion.jpg /tmp/twitter.jpg
# resize the QR code
convert /tmp/qrcode.jpg -sample x245 /tmp/qrcode.jpg
# add the QR code and some text together horizontally
convert +append /tmp/qrcode.jpg /root/photoboothtext.jpg /tmp/qrblock.jpg
# add the QR code and text to the photo strip
# this is the version I printed
convert -append /tmp/twitter.jpg /tmp/qrblock.jpg /tmp/print.jpg

In order to Tweet photos, the photobooth needs to be connected to the internet. I used a TP-LINK TL-WN722N wifi dongle I had laying around, but any of the adapters on this list as well as many others should work well. The Arch Wiki details the steps for connecting to a wifi network in Arch Linux.

Twitter integration adds a fun twist to the traditional photobooth. I used the twython Python Twitter API wrapper, which simplified many of the steps. The only tricky part is authenticating through Twitter’s three step authentication process.  I haven’t yet added authentication support to my script, so I just manually hard-coded in the generated keys needed. I hope to add Twitter authentication to the next iteration, and will write about that when I finish it.

To give users an easy way to find their tweeted photos, I used a Python QR code generator called qrcode that generates a QR code with a link to the posted image. The generator takes the link returned by the Twitter API and spits out a QR code which is saved and appended to the photo strip. I also added some custom text next to the QR code to explain what the QR code links to.

You can find my Python code here: photobooth.zip
You can find the cups printer config file I used here: printer_config.zip

Here is a list of the tasks (detailed above) that need to be completed to set up the full system:

  • Install Arch Linux
  • Install Packer
  • Install Python
  • Install Python libraries:
    • twython
    • oauthlib
    • qrcode
    • pyserial
  • Install and configure Cups
  • Install and configure printer drivers
  • Setup wifi connection
  • Install Gphoto2
  • Install ImageMagick

Physical

photobooth_drawing

The physical aspect of the photobooth was the easiest part to build, although my simple design has the potential to be greatly improved. To create the enclosure, I opted for a simple PVC pipe frame that could be quickly disassembled and easily transported. I made the enclosure 6 feet long, 4 feet wide, and 6.5 feet tall. These dimensions can be adjusted based on application, but I wanted plenty of space in mine for several people to stand and pose. So far, up to seven people at a time have successfully fit in it. The length really depends on the type of camera and focal length being used, but 6 feet seems like a good starting place. The height is also highly variable, especially if people will be sitting. But since I designed with standing in mind, I wanted to accommodate some of the taller potential users.

I chose ¾” PVC as a good compromise between cost and strength, and was able to find the elbow pieces I needed to assemble a cube. Here is the design I used for the frame:

Photobooth frame

Photobooth frame made with PVC pipe

 

Once the frame was built, I chose curtains to cover it. Curtains are a slightly more expensive choice than some of the other options (bedsheets, etc.), but they come pre-made in various lengths, with loops in the top that make them perfect for hanging on PVC. I chose black to create a more private feel in the booth, but in hindsight, something lighter may have allowed better contrast in the photographs and prints.

When I was looking to find some sort of button to use to trigger the photo sequence, I came across a round foot pedal from a tattoo machine. This worked especially well because the booth is designed to be used standing up. However, any type of input could be used to trigger the sequence.

Photobooth instructions

Photobooth instructions

The photobooth setup also needs a tripod, or something to hold the camera. I used this tripod and was really happy with it. Lighting is also important in a photobooth, so some sort of fill lighting would be desirable. As mentioned above, I found a fancy solution to this, but any light source should work. I also found that some people tend to be confused no matter how straightforward the interface is. Although it may seem tacky, an instruction sheet can really clear up confusion, and when creatively designed, can blend in seamlessly with the look of the booth.

A photobooth can help create spontaneous and memorable moments at any party or get-together. I hope the details here will inspire someone to build their own, because sometimes it’s more fun to do it yourself!

Materials

Here’s a list of the materials I used to make the photobooth, along with an idea of what they all cost.

  • Beaglebone Black x 1 = $65
  • USB hub x 1 = $15
  • Wifi adapter x 1 = $18
  • Thermal printer x 1 = $30
  • Receipt paper x 4 = $24
  • Foot pedal x 1 = $12
  • Tripod x 1 = $20
  • PVC pipes x 10 = $25
  • PVC connectors x 12 = $12
  • Curtains x 6 = $60

Total = $281

Already had:

  • Camera
  • Lighting

Tools:

  • Hack saw
  • Screw drivers
  • Wire cutters
  • Computer
]]>
http://protofusion.org/wordpress/2015/02/low-cost-diy-photobooth/feed/ 2 1971
DIY Cheap Reservoir Irrigation http://protofusion.org/wordpress/2011/09/diy-cheap-reservoir-irrigation/ http://protofusion.org/wordpress/2011/09/diy-cheap-reservoir-irrigation/#comments Mon, 26 Sep 2011 00:20:07 +0000 http://protofusion.org/wordpress/?p=1016 ]]>

When you’re trying to grow a bunch of plants in a field where a water source is lacking, things can be a bit tough. Hauling water on-site is a very arduous process, even with a tractor/trailer full of buckets. After hauling 5-gallon buckets to water blueberry bushes for months, we began to work on a better reservoir irrigation system that was cheap and easy to automate with expandable capacity.

To store water, we decided to use a 55-gallon drum. The drum provides enough water for just over a week of watering every other day. We plan on adding another barrel with a siphon hose connecting it to the main barrel for additional capacity.

After deciding that a gravity-fed system would be inadequate, we purchased a very inexpensive 1250 GPH bilge pump. As cheap as it is, this pump provides enough pressure to water an entire row of blueberry bushes. If you are planning on a more extensive system, you likely need a more powerful pump (more about this later).

We added garden-hose threaded adapters to both the hose of our bilge pump and the intake of our watering line. Having a garden hose adapter for the bilge pump line allows us to use garden hose and sprayer nozzles to water other plants, if needed. Note that an in-line anti-siphon valve is necessary to prevent water from constantly flowing out–we eventually added one after these photos were taken.

We used standard black irrigation tubing and spray nozzles for our watering lines. This hose is incredibly cheap and the spray nozzles are about $.50 apiece. These nozzles are adjustable, allowing them to work with the very low water pressure that the bilge pump provides. Our watering hoses are laid on the ground, however lines can be suspended over plants on stakes if necessary (this help keeps dirt and other particles out of the nozzles).

We terminated the end of our watering line with a garden hose connector as well, mating nicely with the connector on the bilge pump hose.

We laid our tubing along the ground without stakes initially, however we ended up staking down the hose between every nozzle to keep it from moving around.

The setup itself is not incredibly unsightly and does a great job of watering plants in locations that don’t have a source of water close by. If the barrel is topped up every so often, watering is quick and easy.

Future Plans

In the near future (likely next season), I plan on adding automation to the system with a relay, microcontroller, and RTC chip. I am developing this system while at school for my small-scale indoor automated watering solution (documentation to come soon).

In addition, we have purchased an RV pressure-regulated water pump with much greater capacity, allowing us to water more plants and some of our fruit trees next season. If you need greater capacity for your watering system, you can buy one of these pumps for about $50 on eBay. If you need greater water capacity, you can add additional 55-gallon barrels with siphon hoses between them. This is an easy way to increase capacity without making any changes to your existing system.

]]>
http://protofusion.org/wordpress/2011/09/diy-cheap-reservoir-irrigation/feed/ 1 1016
ZonCoffee .2 Released http://protofusion.org/wordpress/2011/01/zoncoffee-2-released/ http://protofusion.org/wordpress/2011/01/zoncoffee-2-released/#comments Tue, 04 Jan 2011 22:54:34 +0000 http://protofusion.org/wordpress/?p=756 ]]>
ZonCoffee is a full-featured PID controller package for Arduino, customized for use with espresso machines. ZonCoffee is written in Processing/Wiring, and includes some code from Tim Hirzel‘s BBCC project.

Skip to Downloads

Features

  • Displays set point and current temperature information on LCD
  • Rotary encoder adjusts temperature targets without a computer
  • Intuitive serial interface, compatible with the BBBC grapher
  • Steam and extraction modes with separate temperature targets
  • Simple configuration in “Options.h”

Supported Hardware (Version .2)

  • 1 rotary encoder with pushbutton (software debounced)
  • 1 SparkFun serial LCD
  • 1 piezo buzzer (beeps when preheated)
  • 1 zero-crossing solid-state relay
  • 1 MAX6675 thermocouple chip (free samples available from Maxim IC)
  • Additional Details

Average Hardware Cost

The entire project can be built for around $40 (not including an Arduino) assuming you acquire a free sample of the MAX6675 chip. ZonCoffee (as of .2) requires an ATMega168 or higher. The sketch is around 14kB compiled.

Plans for future versions:

  • Support for additional thermocouple chips (have defines in options.h to choose which to compile)
  • Support for additional display types. Possibly abstract display output functions.
  • “No LCD” mode (use LED for indication).
  • Release version tailored to PID for popper coffee roasting

Download

]]>
http://protofusion.org/wordpress/2011/01/zoncoffee-2-released/feed/ 4 756