Archive for Arduino

Projectile Sensor #2

Due to a few request I decided to make some improvements over my original version of this sensor.

The major improvements are a new 3 PCB design, which makes this much more durable than the previous version. The other huge improvement is using the Honeywell SD5600 Optoschmitt Detector which has a fall time of 15 ns. Previously I was using a standard photo transistor which had a response time of 15 us. This new design is 1000x faster! This actually matters on faster bullets since sometimes the old sensor wouldn’t notice a fast small bullet. The SD5600 never misses.

The only downside to this new design is that it’s a little more expensive. Here’s the BOM.

  • Female Header
  • 2x 90 Degree Male Header
  • 2x 3.5mm Jacks
  • 2x IR Emitters
  • 2x Honeywell SD5600
  • 2x 1K Resistor
  • 2x Male/Male 3.5 mm Cable
    • This sensor has two IR sensors spaced exactly two inches apart. The user inputs the distance from the sensor to the desired position of the projectile when the picture is taken. Based on the time it takes the projectile to travel those two inches between the sensors, a velocity for the projectile can be determined. Since bullets and other projectiles basically travel at a constant velocity, it is easy for the microcontroller to calculate the delay in microseconds until the picture is taken.

      PCBs



      Here’s a link to the Eagle files I used to create the PCBs.

      Using the Projectile Sensor with the Camera Axe

      There are 3 PCBs and everything is labeled so it’s supper easy to plug them together. You will need the 3.0.04 or newer version of the Camera Axe software. Turn on the Camera Axe and hit menu until you get to the projectile menu. Set the distance you want the bullet to be from the second gate when the picture is taken and then push the right button until you get to the “Trigger on” menu for the projectile sensor and set this to low. Now hit the set button. If the sensor continuously displays the speed of the projectile that means the sensor boards aren’t lined up correctly. Look at it from the side and bend the boards so the emitter is pointed directly at the detectors. Once it’s sitting there waiting for a projectile put your finger through the two sensors and it will report back to you the speed of your finger. Once you get this it’s working.

      Mounting the Projectile Sensor

      I mounted a projectile sensor to my pellet gun and it is working great. The pellet’s velocity ranges from 985 feet/second to 1060 feet/second. Below are a bunch of pictures of how I did this mounting.



      Results

    Comments (4)

    Photographing Splashing Droplets

    Up until now I’ve been using a photogate sensor and the Camera Axe to take pictures of water and milk droplets. After some research I found manypeopleonline were using solenoid valves to create droplets and take pictures of them. The big advantage to this method is it’s easy to collide drops which is was very difficult and random using my old method. I decided I’d make a new valve sensor (pre-built version available here) for the Camera Axe and document how to make your own since I didn’t find any detailed instructions or part lists on the web.

    Building It

    I knew I wanted to have a way to trigger my camera on a fairly long exposure in a dark room (I use a 1 second exposure). Then make a water droplet. Wait a little while. Make a second water droplet that would collide with the first droplet’s splash. And then wait a little more until the collision before triggering the flash. With this in mind I started making the different pieces I needed and connecting them together.

    The only new circuit I needed was a simple motor driver circuit to drive the solenoid. Below is the one I designed and here are the PCB files I designed in Eagle.

    Valve Sensor Circuit

    Next I had to find and order the parts.

    After assembly here is what it looks like:

    I also made a new version of the Camera Axe software with the valve sensor. You can download this new version (3.0.03) from CameraAxe.com.

    Using it with the Camera Axe

    Plug your camera into Camera/Flash1. Plug your flash (or flashes using a splitter cable) into Camera/Flash2. Plug this new valve sensor into Sensor1. Below is a picture of my setup. It has two flashes, a camera, the Camera Axe, and the valve sensor.

    Go to the valve sensor menu. Set drop1 size to a good starting size like 80. Set drop2 delay and drop2 size to 0 (we will start with only a single drop). Set Flash delay to around 200 ms. Then turn off the lights and press the “Set” button. This will trigger the camera and the flash. Now adjust the flash delay by 10 ms increments until you have a good droplet picture. Below is a video sequence of 20 images stepping through a milk drop splash. The images go from 220 to 420 ms.

    If you want to do colliding drops timing is more complicated. As a starting point I’d suggest a drop1 size of 80, drop2 delay of 40, drop2 size 50, and a flash delay of 200 ms. Then adjust the flash delay until you find the time of collision. Then you can start adjusting other timing parameters to get all sorts of different types of pictures.

    You can find lots of photos (including droplet pictures) on the Camera Axe flickr group. Below are a few of my favorites from yesterday.

    Comments (3)

    Electric Eel Wheel

    The hardware and software for this project are shared under the Creative Commons Attribution 3.0 License.

    The Electric Eel Wheel is a clever electric spinning wheel making it great for easily spinning the fiber of your choice into yarn! You can use a traditional wheel; however, there are many advantages of this electric wheel design. First of all, the Electric Eel Wheel is lighter and smaller than most spinning wheels making it easier to take your spinning with you.

    This electric spinning wheel’s design is based on a Scotch tension design, so it is easy to vary the spin and weight of your yarn. You can easily adjust it to make fine lace yarn as well as softly spun bulky. Another nice feature of the speed control dial is that it can spin the bobbin forward or reverse. Most people in our testing lab appreciated the range of speed that this wheel offers.

    For build guides, Eagle files, bill of materials, source code, and more visit the Electric Eel Wheel’s home page.

    If you’re interested if purchasing a kit or assembled version of this project I sell them in my store.

    Even if you’re not interested in spinning yarn there is nice motor controller design in this project.

    Comments (2)

    Photographing a Speeding Bullet

    I’d like to start with a big thanks going to Chris Callander.  When he saw the Camera Axe project he shared his idea for a new sensor with me.  I took his ideas and developed this new projectile sensor and updated the Camera Axe software to support it.  I doubt I would have ever came up with this new sensor idea without Chris.  The ideas that get shared in the open source community are great!  The hardware and software for this project are shared under the Creative Commons Attribution 3.0 License.

    You can purchase the Camera Axe and this projectile sensor at this store or built it yourself (parts list below).

    This new projectile sensor is designed to help photograph speeding bullets on the Camera Axe platform, but since I used the Arduino development environment, anyone using an Arduino could easily adapt the this hardware and software to their purposes.

    This new sensor has two IR sensors spaced exactly two inches apart.  The user inputs the distance from the sensor to the desired position of the projectile when the picture is taken.  Based on the time it takes the projectile to travel those two inches between the sensors, a velocity for the projectile can be determined.  Since bullets and other projectiles basically travel at a constant velocity, it is easy for the microcontroller to calculate the delay in microseconds until the picture is taken.   I ran into a few gotchas in the software while I was writing it.

    • Needed to use digitalRead() with the sensors and not analogRead() (analog read is too slow at 100 us)
    • Used integer math because floating point math is very slow in Arduino
    • Had to be careful with my order of operations or I would overflow 32 bit unsigned integers in certain cases

    I’m very pleased with the results.  I’ve tested it with an airgun that travels at a relatively slow 500 ft/sec (half the speed of sound), but my calculations show that the Camera Axe’s 16 MHz ATmega168 chip can easily predict the position of a high speed riffle (several times the speed of sound) to within a fraction of an inch.  I had known that this should work, but it was still amazing to see it working perfectly in the real world, considering all the micro fluctuations that I didn’t account for in the calculations.  In the end, things like gravity, air resistance, and quantum forces just didn’t matter :-)

    [Update: Alan Sailer correctly pointed out the IR transistor I'm using only works at 15us, this would limit photos to around 2x the speed of sound, see the comments for options on faster transistor options.]

    Below is a schematic of this new projectile sensor sensor and here are the Eagle files.

    If you’re planning to build your own, then this is my parts list

    Here is a list of updated files:

    • Updated Camera Axe label.  Nothing special here.
    • Updated Camera Axe source code to support this new sensor.  One nice feature of the projectile code is that I print out the feet/sec or the cm/sec that the bullet was traveling.  While this wasn’t needed for photography; it is still fun to see the numbers.
    • Updated user manual to include the software changes.

    Using the Projectile Sensor with the Camera Axe

    First, visually line up the IR LEDs to the IR transistors so that they are pointing at each other. Then just plug the 3.5mm cord from Sensor1 on the Camera Axe to Sensor1 on the projection board. Next do the same for sensor2. Plug a flash into Camera/Flash1 on the Camera Axe. Turn on the Camera Axe and go to the sensor menu. (Optional if you want to change from inches to centimeters press [Menu]+[Set]+[Left] while turning on the Camera Axe to enter the special menu to change from English units to Metric units.) In this menu you can set the distance from the sensor to where the projectile should be on the picture (0->999 cm/inch).

    You can test your the projectile sensor’s set up by putting your finger in front of the first sensor. After one second a message will display saying that the “second trigger failed”. After this message goes away, put your hand in front of the second sensor and then your other hand in front of the first sensor. This will basically simulate an infinitely fast projectile and the Camera Axe will display the speed of a fast projectile (something more than 45 times the speed of sound).

    This sensor should generally be placed at the end of the gun barrel so you don’t need to worry about the bullet hitting the circuit board or sensors.  The bullet/projectile must pass through this sensor before it hits the target.  In my setup I have everything firmly bolted to a table and trigger the gun with a string from a safe distance.

    Pretty Pictures

    Last but not least, here are a few of the pictures I took with this new sensor.  Taking these pictures was possible with the Camera Axe before I had the projectile sensor using a microphone or a laser sensor, but it involved a lot of trial and error.  With the projectile sensor, every picture is what I was shooting for (pun intended).

    First, visually line up the IR LEDs to the IR transistors so that they are pointing at each other. Then just plug the 3.5mm cord from Sensor1 on the Camera Axe to Sensor1 on the projection board. Next do the same for sensor2. Plug a flash into Camera/Flash1 on the Camera Axe. Turn on the Camera Axe and go to the sensor menu. (Optional if you want to change from inches to centimeters press [Menu]+[Set]+[Left] while turning on the Camera Axe to enter the special menu to change from English units to Metric units.) In this menu you can set the distance from the sensor to where the projectile should be on the picture (0->999 cm/inch).

    You can test your the projectile sensor’s set up by putting your finger in front of the first sensor. After one second a message will display saying that the “second trigger failed”. After this message goes away, put your hand in front of the second sensor and then your other hand in front of the first sensor. This will basically simulate an infinitely fast projectile and the Camera Axe will display the speed of a fast projectile (something more than 45 times the speed of sound).

    Comments (37)

    Camera Axe 3.0

    Purchase the Camera Axe at this store.

    I’ve done a lot of refinement since releasing the original version of the Camera Axe.

    The Camera Axe is a tool for photographers to trigger cameras or flashes based on signals from various sensors. In this version there are two ports for sensors such as a microphone, a motion detector, or light sensor; and there are two ports for camera/flash devices. The Camera Axe is useful for stop motion photography where an action happens too quickly for human reflexes (photographing a popping balloon, lightning, or a milk droplet splash). Other uses can be to catch things photographers don’t want to wait around for such as birds flying to a bird feeder or surveillance of people walking down a hallway. The possibilities are endless. The hardware and firmware for this device are all open source under Creative Commons Attribution 3.0 License meaning that it’s possible to adapt this platform for specialized uses.

    Below are a few links important links for this project:

    • Build Guild – Detailed step by step information on how to build your own Camera Axe (includes full BOM and suggested part suppliers).
    • User Manual – Describes how the software menu works, lists sensor/accessors, and gives some example use cases.
    • Image Gallery – Pretty pictures taken with Camera Axe Hardware.
    • Dreaming Robots Store – My online store where I sell Camera Axe kits, sensors, and other accessories.
    • Firmware Source – Source code that controls the Camera Axe (designed to be loaded via Arduino bootloader).
    • Camera Axe PCB Eagle Files – Circuit board source files.

    List of improvements for this version:

    • Decided to use smart sensors. This means instead of having a special port on the Camera Axe for a Microphone that has the amplifier built into the Camera Axe, I’ve decided to put the amplifier on the sensor. This gives maximum flexibility in sensor combination, reduces the number of ports, and makes it simpler to use the Camera Axe.
    • Flash and Cameras use the share 2 ports. This means you could use 2 flashes, 2 cameras, or one of each. In the original version you only had the option to use one of each.
    • Removed the active port LEDs. These didn’t seem too useful and I was running out of pins.
    • Added power transistors to control whether the sensor ports are receiving power. This is useful to turn off things like a laser beam sensor just before taking a photo. A way of controlling this was also added to the software.
    • A reset to factory default and a way to control LCD back light brightness were added to software.
    • Large clean up of software source to make using it and modifying it easier.
    • Left out the remote control option since it was expensive and had little demand.
    • Lots changes to the electrical components used to reduce cost and make assembly easier.
    • Much better documentation (Builders Guide and User Guide).
    • Added a store to sell it because of a demand for this from the original version.

    Feel free to discuss this or other topics at my forum.

    Some of those following this project might be asking what happened to version 2.0. I got to the point of ordering a batch of PCBs and I even built one. I had gone with the mentality that more is better. This monster had 6 ports and each port had a different task. While I was writing the software for this version I decided that it was going to be too confusing to use so I stopped working on 2.0.  A simplified 3.0 version was born which tried to add new functionality while keeping it simple to use.

    Comments (26)

    « Previous entries Next Page » Next Page »