Friday, January 11, 2013

Putting It Together: Part 1

 
Little Johnny has got to have some juice to get his wheels turning. There ain't no 3V-5V mini-motors here. Little Johnny needs to haul some tread.

 
 
Through much research about electricity, Ohms Law, Resistor Tables, Coils, Starters, 12V systems, and how much this stuff was going to cost. I decided to go with the cheapest solution possible. Office Spacing Shit.
 
I had a couple of old printers laying around, and after harvesting some IC2's, wire, connectors, scanner bars, pulleys, springs, gears, spindles, rubber, grommets and desoldering some Voltage Regs, heat sinks and capacitors, I finally got to the motors.

This accomplished two things, it got motors for J5, and a whole bunch of parts that he could use. The best part? Free. I like free.

Now, before you go taking a screwdriver and a butterknife to your printer, make sure that it's broken (hopefully not the motors) because there is no coming back once you open Pandora's box.

The motors pictured above are 27V stepper motors and Johnson 12V and a couple others thrown in. I also found a motor with an encoder attached to an linefollower on a convienent breakout board with 3 pin Molex's (not pictured) that I plan on using for future experiments.

For Motor Controlling and Drivers I went with the MShield piggybacking on UnoR3. The reason for this was cost. I checked out lots of other controllers and hope to one day use the Orangutan X2 to power future projects. I also plan on using a Pro to Servo Board combo for controlled autonomous drone flight but I still have to figure out how I'm going to handle CV (Computer Vision) on the Drone but I may go with Android 2.3 via Wifi for that.

With Mshield, you get 2 Servos and I was running short on PWM's on Uno because of BTSlave(Bluetooth for connecting to voice controller). So this would work, but only if I wanted his head to Servo Sweep and maybe have one arm work or something, So I needed more servos, but didn't want to suck anymore juice out of the R3. So I went to the Pi.

Pi kinda sucks for controlling servos right out of the box, but if you add the break out, you get 16 servos. Problem solved. I don't have pictures of the servos yet because I don't have the board, or the servos yet because of money. So look for more on this in future posts.

Another great thing about Pi? cheap, USB Hosting, Wifi, An OS, Webserver, and some cool boards for future use.

Johnny's 4 Arms Holding his Head for Welding


For servos, I'm thinking about using either 12g Standard, or 9g Mini or a combination of the two to control J5 and using push rods for articulation to keep the servos out of sight for a more lifelike look.
There are other Johnny 5's on the internet that look like a bunch of servos with a J5 head on top, and that's not really what I'm going for, even though, that robot is pretty cool.

Even though I have some stepper motors and really want to use them, I'm not; because they take up too many inputs, (moreeeeee input) and interfere with BTSlave. So, instead I'm going with two straight DC's to spin the custom treads.

To Power the Mshield and motors, I'm using a 7.2 NIMH HCB because I happen to have a charger sitting around from some of my RC stuff. Uno is piggybacked from the Pi (running Occidentialist 0.2) via the USB HOST and will be powered by a 3300mah 5V LiPo that's on the Adafruit's Website found via this link.



This is one of the most expensive parts of the project, as batteries alone cost a whopping $80 dollars.

Here's a current break down so far of Johnny 5, Pricewise:
1. Arms (2X Third Hands @ Harbor Freight for 2.99 a piece) = $6.00
2. RaspberyPi (via Element14 (Shipping Included in Price)=$ 45
3. Arduino Uno R3(via Amazon)=$20
4. Mshield(via Amazon)= $20
5. BTSlave(via SeeeeedStudios)=$23
6. Motors=Free
7. Batteries=$80
8. Sensors=$20
9. Tank Treads=Free
10. Servo board = $15
11. Servos= ?

So without Servos the grand total is $229.

I estimate total price of the this project to be just under $300 making J5 not only Green but Good for Wallet.

What does $300 dollars get you now-a-days?
In the end, Johnny 5 will have the following features and capabilities:
Voice Control via Bluetooth.
Internet Site for Sensor Data including the following types of data:
  • Temp
  • Light
  • Email Notifications
  • Image and Video
  • Twitter Notifications
  • Event Notifications
Full Articulation
Voice
Sound Effects from the movie in response to commands issued via Voice.
Light Effects
Remote Security Monitoring
Autonomous Mode

I hope to add other improvements to this project as my knowledge of the inner workings of some of the more complex systems becomes greater.

Currently it's setup to work with android, Linux and windows. I plan on running an android 2.3 device as the robots screen and placing a giant red arcade button on the bottom to more mimic the actual johnny 5 robot. The Android will still be able to run all the apps that are available for 2.3 and I'm planning on using OpenCV for image processing and handling (but it's a really long book, and I'm only about half way through it).

Hey Laser Lips! You're Momma was a SnowBlower!!!


OpenCV is a computer vision software that is intergreted into the ROS operating system. ROS stands for Robotic Operating Sytem, and is pretty much the system that most industrial robotic systems use. They also use OpenCV in 3D printing which is pretty interesting, but not what Johnny 5 is going to do with it. If you need more input about OpenCv, click here.

The Following Coding Techniques and Skills are used in Johnny 5 (thus far):
  1. C
  2. Ruby
  3. SQL
  4. Apache
  5. HTML5
  6. CSS3
  7. JS
  8. Java
  9. Python
  10. Debian
  11. Android 2.3, 4.0
  12. puTTY
There's more, but that's all I can name off the top of my head. Basically what happens is that all the sensors are read in C, sent to Serial, and interpreted by the computer into python. The 2 servos on the Mshield can be controlled by Bluetooth but are instead sent to the pi to be controlled by the OS. The Pi based servos are attached to IC on the pi and are communicated via a relay system that is mostly derived of a ruby rail system to Python. All the motor controls are written in C, and some of the servo code on the Mshield is also in C. but everything else is pretty much python.

After it receives this information, the OS pushes some of the information to java, so it can be sent to the android app and then scripts up the website using Java, JavaScript, HTML5 and CSS3 using the Sickle and Apache servers. puTTY is used to send serial data to another node on the network for backup purposes, or for a loop through to the printer for data analysis. The Pi runs Debian, so that completes the list (thus far).

No comments:

Post a Comment