Wednesday, July 10, 2013

The Unpublished


Summary

     Here's some stuff that never got a their own project page.  Anything I have on the projects is posted/shared below (source, images, notes, etc).  Use it, make it your own, etc.  If you want additional information on something or if I've left something out, let me know.

Content Sections

  1. The Movie App - A jQuery Mobile Demo
  2. Staring Competition With a Robot - A Face Following Robot Arm
  3. Styrofoam Thunder - A Drone Plane
  4. The World According to a Robot - A IOIO Rover
  5. Marge the Marbot - a DIY Air Boat

1. The Movie App - A jQuery Mobile Demo

January 2013

     The application was written to do some client-side only practice targeting mobile devices.  The application uses movie research as the subject.  
jQuery mobile.  That should say it all.  Who wouldn't want to write an application that just works. 
In all seriousness though, try the site on your mobile device(s) and on your computer's browser.  The project/site was a quick proof of concept.  

For the source, check out: https://github.com/ergobot/MobileMovieDemo

2. Staring Competition With a Robot - A Face Following Robot Arm

December 2012

     This project was a collision of two projects.  These two projects were being done at the same time.

     The first project was the robot arm, controlled by an Arduino duemillanova with a ladyada motor shield.  I should have made hard limits to the min/max range of the arm but went with soft limits for min/max range of motion.  This resulted in an arm that would be controlled by sending characters to the arduino.  I was happy with that.  

     The second project was messing around with computer vision libraries.  I was working with C# .NET projects.  I dug into an article on emgucv and motion JPEG streaming.  The primary goal was to just recognize the area around where a face was in an image (rough approximation was fine).  I wanted to do more with this later and this was just a start.  The second goal was to get a way to stream video to me on a local network so I could see what was going on in the front desk.  During this time at work, I would be the last person in the office and didn't want to be interrupted by physically checking who was at the door.   

     Both projects were completed close to each other.  It wasn't my intention for the projects to get combined.  Was at the maker space and a cheap webcam ended up taped to the arm (see pictures).  From here, it logically progressed.  The idea is that we will draw a rectangle around the first recognized face.  If  the center of the picture is not in the rectangle, move the arm until the center is in the rectangle.  This resulted in a really funny robot arm that is always looking a people. As a bonus, you can see what it is seeing in a browser (that was the Motion JPEG part).    

     Back at work, we tried it out on ourselves.  We never had the guy watch for visitors.  Admittedly, it is a little strange to know and see that a camera is following me.  It should probably look somewhere else unless it is interacting with me.    

     Why didn't it get published?  There wasn't a good demo to give for the project.  Other than privacy issues, I gave the Arduino used in this project to a friend as a gift.  

Links for stuff used:
Project source: ( 7/13/2013 EDIT: coming soon)

Robot Arm links:
ladyada motor shield v1: http://learn.adafruit.com/adafruit-motor-shield (fyi - v2 is out and is awesome)
Robot Arm - OWI Robotic Arm Edge: http://www.adafruit.com/products/548

Software side links

Project Source:
Github: 

Images:
2.1 - First Side

2.2 - Second Side (1)

2.2 - Second Side (2)


3. Styrofoam Thunder - A Drone Plane

May 2013

     This one is straightforward.  A friend wanted his RC plane to take-off by itself and then take control of the plane when it had reached a certain altitude.  He had the plane and I got a hold of an Ardupilot Mega v2.5.  

     We took what we know and went to the local hobby shop to put it together.  It was probably a little different than anyone was used to.  They have great quadcopter expertise which helped a lot.  In good time, we put it all together then headed out to an open area to try it out.  Plain and simple, it never got airborne.  After all of the setup, during the last double-check (I do a lot of those), a wire had corroded from on of the bullet connectors.  Most people would be bummed out to get that close and not have it go.  This was not the case for me.  We had gotten a lot farther than I thought within a short amount of time.  My only interest was getting the plane to fly itself.  I thought we got really really close to that.  It was a great learning experience for everyone and I'm sure we'll return to it soon.   

Ardupilot Mega: http://store.3drobotics.com/products/apm-2-5-kit
Arduplane project: http://plane.ardupilot.com/


Images:
Figure 3.1 - Belly of the brid

Figure 3.2 - Ardupilot Mega 2.5 (APM)

Figure 3.3 - APM and radio

Figure 3.4 - Bad connection circled in black


4. The World According to a Robot- A IOIO Rover

April 2013

     This project was to demonstrate a use for the short distance algorithm.  The hardware involved was: ioio mint, arduino micro, rover 5 platform, an Android phone, the HMC6352 compass module, and the TB6612FNG 1A Motor Driver, and a sharp ir sensor (with servos to let the ir sensor sweep in an async manner).  The idea was to have rover move forward, while recording its location, until it detected something in front of it.  When there is an obstacle, turn until there isn't an obstacle, and continue moving forward.  

     According to the rover, it always starts itself at "0,0".  While performing basic obstacle avoidance, the rover would take measurements from the compass module (bearing) and record the ticks (quadrature encoder).  Thus, the rover would avoid stuff, and be able to record where it was going (indoor mapping).  Everyone turning point becomes a node and the number of ticks between the nodes becomes the weight.  In this way, the rover could determine the quickest path back to a node or home.  

    As a bonus, the rover would send the information from the ioio mint back to the Android device and the Android would draw its updated path on the screen (surface).

Why didn't it get published?  It was rushed, plain and simple.  I had to find a way to get the ioio mint listen for the quadrature encoding's tick (interrupts without interrupts).  I ended up modifying part of the ioio library to get it working.  The wiring of all components looks unkempt.  All in all it was working after a rough weekend. 

Source:
IOIO tutorial for easy TB6612FNG 1A Motor Driver control:
http://techvalleyprojects.blogspot.com/2013/04/android-ioio-motor-control-tb6612fng.html

IOIO motor driver source:
https://github.com/ergobot/ioioMotorDriver

IOIO tutorial to listen for digital input:
http://techvalleyprojects.blogspot.com/2013/05/android-ioio-listen-for-digital-input.html

IOIOLib modified to listen to quadrature encoder ticks:
https://github.com/ergobot/IOIOLib

Images:
Figure 4.1 - Front view (Hello World)

Figure 4.2 - Top view

5. Marge the Marbot - a DIY Air Boat

August 2012

     This was an usually fun project.  It started with a couple of toy boats.  A friend and I wanted a better boat.  We ended up in the clearance aisle of a large store and bought a couple of flotation devices.  These flotation devices are also called body boards.  We took two of the legs, two of the motors, two of the electronic speed controls, the power distribution board, and the lipo from my quad copter (a diy drones 3dr kit).  We added an Arduino Duemilanove and a radio for the Arduino.  For control, we used a laptop, a radio, and an xbox 360 controller.  We mounted the legs to a plastic box and put all of the electronics inside.  Finally, we secured the box to the flotation device.

     The whole thing worked great and we went through several improvements quickly.  Most of these improvements centered around using a different radio.  The first radio was a regular RC radio that is used for RC planes.  This worked fine but we couldn't change much on it and we wanted to be able to send/receive data from the vehicle.  The next radio we used was a bluetooth (bluesmirf gold).  Yes, obviously our range was limited but everything worked great.  Finally we got a hold of two Xbee Pro Series 1.  We got the vehicle going farther than we could visibly see it.  It was awesome.

     The next logical step would be to change vehicle.  We needed to change where the motors were and how the vehicle was balanced.  The vehicle was making wake on a calm body of water at only about 25% of it's available full throttle.  We only had one mishap that flipped the boat.  The mishap got everything wet (the box filled up with water).  After drying out for a few days, everything worked fine.  After getting it to go far, everyone had enough fun at that point so we stopped.  

     The result was an air boat that could turn in place, travel approximately one mile (maybe less but it would be close), send/receive data approximately one mile, and make wake on a calm body of water. 
The whole thing was controlled by an Xbox 360 controller and a little laptop.

     The pictures below show the project before and during the first run.  We called her Marge or the Marbot.  You'll probably notice in the pictures that the front is rather blunt.  She was pushing the water on the first run.  Later we would shape the board by cutting and covering the entire board in tape.  After the change, she would neatly cut into the water instead of front digging in to push the water.   

Source:
The exact Arduino Sketch used to control the motor/esc's can be found on a previous post:
http://techvalleyprojects.blogspot.com/2012/10/arduino-control-escmotor-arduino-code.html
Images:
      
Figure 5.1

Figure 5.2

Figure 5.3

Figure 5.4