Tuesday, February 24, 2009

Serial Port on the iPhone with Minicom

This will be a little tutorial on how to set up Minicom on your iPhone or iPod Touch to view incoming serial data. I hope to continue this with Python or maybe even Obj-C. Click on (some) pictures to enlarge.

Materials:
Jailbroken iPhone or iPod Touch
Charge Connector (MJS or Sparkfun)
Serial Data Source (Arduino in my case)
Computer/Wifi network
Putty

1.Install Minicom, Terminal OpenSSH, and Toggle SSH from Cydia

This step should be pretty self-explanitory, If you can't do this and can't google, then you probably shouldn't continue on.

2.SSH into your iPhone

Obtain your IP Address from Settings or the SBSettings App.



Start up the SSH Server




Go into Putty, enter the IP, and create a new SSH Session



On the "Potential Security Breach," click Yes

And Login as Root with Password "Alpine"






And Your In!

3.Make a Directory

Do a "CD .." twice, which whould put you in the root of the filesystem at /



Now do "CD usr"

And "MkDir etc"



4.Start up Minicom in configuration mode

Simple: "Minicom -s"



5.Setup iPhone Port

Arrow down 2, to Serial port setup and press enter



First, press A and change "/dev/ttyS1" to "/dev/tty.iap" and press Enter



Then press E and adjust to whatever serial source you are using. I used 19200 8N1 for my Arduino.



6.Save and Exit

Press Enter until you return to the main screen, arrow down to "Save setup as dfl," and press enter.







And press "Exit from Minicom"

You can now close the Putty Session.

7.Hardware Setup

This will vary depending on your Serial input and iPod connector, but here's mine:





In this case, I have the Serial TX from the Arduino connected to the RX of the iPod through a 1K resistor, for 5v to 3.3v. I also have the common ground connected. The Arduino is reading data from a Wii nunchuck through a Wiichuck Board
and sending it out at 19200 Bps. Remember level changing for 5v and 12v sources!!

8.Read the Data

Power on your serial source.

Open up the Terminal on the iPhone, type in "Minicom," and press enter.

You should see serial data streaming in.



And your done!

PS. If anyone has experience with graphical Python on the iPhone, I would love to collaborate on an app. I have tested and the Python serial library will run on the iPhone. Contact Me.

Saturday, February 21, 2009

Research Paper

Well, here is a research paper I wrote for English on Open Source Hardware

Paper


Also- Google Docs sucks for this type of application.

Thursday, February 19, 2009

Great Motor Controller Link

Here is a great link summarizing ESC's for Battlebots. The only downside is that they all take RC Servo signals instead of PWM, which I believe will be more precise in my application. Right now I am mostly considering the RS80D or the IBC.

Battery Technology

So now that I have motors, I will need to purchase batteries to power this thing. I am considering three different battery technologies for this system.

A123 Lithium

These are the batteries used by Daniel Fukuba in his scooter based on Trevor Blackwell's design. Dewalt now sells 36v batteries using this technology, and a matching charger. If I can use these batteries and charger while bypassing the internal current limiting, I should have a fairly simple battery setup with ample current capacity. For the final project I would plan on 3 of these packs in parallel.

Dissecting 36v Dewalt pack
Short video of Daniel Fukuba's


Sealed Lead Acid (SLA)

Although these batteries are large and heavy, they allow for large amounts of current draw and are the least expensive. They are also the cheapest to charge and maintain.

Example Battery

NiMH packs

This system for batteries would be easier to charge than A123 cells and provide ample current. This is also the type of batteries that Trevor Blackwell recommends.

Trevor Blackwell's page

These are the basic options that I am considering, I would love to hear any opinions on this!

Wednesday, February 18, 2009

My Motors Came!!

Received the motors that I purchased off of Ebay Today

Pics:

The Box

The Whole System

Female Motor Connector

The Controller


Now onto the problem. The motors are great, and definitely worth the price. It also came with a motor controller though. This controller has 8 55V 110A IRFP064N HEXFET's. The only thing is that I have no idea how I would go about using this controller. Here is a Rundown:

H8/532 Main IC


4 IR2110S IC's

2 GPS 35DAA010AKG ?

14 pin controller port
Any help would be appreciated in this matter. Not to mention that it would shave ~$300 off of the cost of this project. Thank You!

Tuesday, February 17, 2009

B-B-B-Balancing

So first off, a Segway needs to know at what angle it is to the ground. This can be accomplished surprisingly easily.


Their are basically two types of sensor used for sensing tilt in a robotics application, the Gyro and the Accelerometer. Both have their advantages and disadvantages, and both must be used for reliable tilt data.

Accelerometer - Used in the Nintendo Wiimote and Nunchuck

Pros
  • Doesn't Drift
  • Outputs Acceleration due to gravity
Cons
  • Very prone to vibration
  • Not very precise
  • Also senses the acceleration of the Scooter
Gyro - Used in Helicopters

Pros
  • Very precise
  • Very smooth input
  • Provides angular rate
Cons
  • Drifts - A LOT!
So what do you do?

Combine these two inputs so that you can get a solid, quickly responding signal, that doesn't drift. There are two common ways to accomplish this:

1. Kalman Filter
The Kalman filter is a mathematically complex filter that provides a theoretically ideal combination and smoothing of sensor signals.

Implemented on the Arduino Here
ArduIMU

Might be tried, but not until a working system is created

2. Angle Complementary Filter
Uses a time bias to determine which sensor to trust
Described and implemented in the SegSpecs.zip file here
Easier to implement and cancels out drift and vibration.





Comparision: Complementary Filters vs Kalman Filter vs Extended Kalman Filter

Monday, February 16, 2009

Parts, Parts, Parts


So here we go. Here is a list of parts I'm planning on using for my Segway project.

Processor:
Arduino Variant
Funnel IO

Motors:
Similar to NPC T-64
Bought off of Ebay for $195 + $40 shipping
With included wheels

Gyro:
75 degree/sec 5v
ADXRS401

Accel:
+/- 1.5g 5v
ADXL203CE

Wireless Programming and Debugging:
Xbee pair 1mw chip antenna
Bought off of Ebay for $44 Shipped

Motor Controller:
Dual 50 Amp with Servo inputs
IBC Dual Speed Controller

Batteries:
Unsure of this as of yet, NiMh, SLA, or A123 Lithium

Steering:
Preferably Lean, not yet solidified.

Links:
Scooter Labs
MIT FIRST Team
Trevor Blackwell Scooter 1
Trevor Blackwell Scooter 2
Trevor Blackwell Scooter Build
Open Source Self Balancing Scooter
Meta the Self Balancing Scooter
Clint Rutkas c# Balancing Skateboard

My inspiration for smooth balancing:

Overview

What I'm Doing: Building a Self-Balancing Scooter (Segway) for My Senior Project.

Why: Fun, Challenge, Help get into college

How: Well, I guess you'll have to just wait for that part.