Welcome to Robot Dialogs. This is a place where I will record my progress, mistakes, errors, failures, lessons learned and hopefully occasional success in my designs and implementations of robots and other technical endeavors. I will try to make it as educational, informative and entertaining as I can...

Thursday, September 13, 2012

A Twitter hack for the Typo...matic

<update>
Tonight 9/21 I'll have the Typo...matic online searching for tweets with the following #tags:
#ccckc
#linux
#arduino
#selectric
#typomatic

There will also be a google hangout where you can watch it type away live!
</update>

I spent the evening at CCCKC tinkering with TTYtter and some bash scripting and coreutils that were new to me...
The result is the world's worst implementation of a polling Twitter search that can feed new tweets to any other bash command. I'll be hooking this up to the Typo...matic at the next public event I lug it out to...

I have a chunk of c code that talks to the Typo...matic's Arduino and it takes as arguments the serial port and a file of text to print. So the end result of the script below is a text file of recent tweets matching the #ccckc hash tag.

Feel free to gank this script and do dumb things with it. I'm not proud of it from a technical standpoint but for a hack it'll do.

Saturday, June 30, 2012

The Translator...Mini Sumo Bot

A few months before Maker Faire KC a friend started working on a Mini Sumo Bot and in passing I said I could probably get a bot ready for that...well those months slipped away and two weeks prior to the faire I had no bot (and had been constantly hounded by said friend). So I did a grand total of 30 minutes of research on the internets and ordered some parts (not recommended).

I ordered everything from Canada (Fingertech and Solarbotics) so I had to wait almost another week to get started.

Here's the parts list I ended up with:
The first thing I did was construct the BittyBoty 3-Way Object Sensor which is used to find the other robot. This kit is a nice compact proximity sensor, but it's a bit tough to mount (double sided tape...). Building the kit was a challenge because it's a very small board with several tiny surface mount parts to solder...and I didn't have the right kind of tweezers. After melting one of the indicator LEDs and testing the rest of it I deemed it passable and moved on.
My first attempt at getting everything working consisted of using solid core and wire-wrap wire to do point-to-point connections. That was a mistake.
But it did work! I rigged it up to work with a 9 volt battery and let it tear around my desk for a few days like that.
That video shows it moving slow, detecting lines and it does actually detect and turn towards the can. Also in that video you can see the competition ring we made at CCCKC with the help of Craig (Built-to-Spec) who did the vinyl white ring. 

After a few days fighting that solid core wire jumble I got fed up and designed a single sided PCB that I could etch. Unlike my previous etchings, this time I went shopping for some Hydrochloric Acid and Peroxide. This worked AMAZINGLY well compared to Ferric Chloride. I didn't want a top layer or vias so I intentionally left out some of the complex traces so that I could do them with wire-wrap wire instead. This took some time and patience but worked okay in the end... A hint if you do this, use Eagle to keep track of the wires you patched on to the board by adding traces to a layer. Maybe next year I'll mod it by getting the whole board fabbed. In the end I managed to get the board made and only fried one line sensor on power up...crossed the streams...
This PCB design fits the standoffs on the COBRA chassis perfectly and instead of directly soldering the Arduino and motor drivers to this board I soldered on headers to accept those. I also added breakout connections for the motors, proximity board, line sensors, power, and switch. So essentially everything plugs into this one board. I also broke out the serial lines and 5V/GND connections so that I could easily attach a XBee wireless serial board (very helpful for debugging).

After all the solid core wire was replace with either traces on the helper board or stranded wire (stolen from various old USB cables) this setup was MUCH easier to work with. I went to the local hobby shop (which has no website or I'd link it) and picked up the LiPo battery and charger. The battery fits beneath the helper PCB, keeping the center of gravity low.






The result (after another programming session) was excellent.

At the Faire I ended up taking first place. Woo! Granted there was only one other entrant... Next year bring your bots!
  • Total Estimated Cost: $285.69
    • Chassis: $119
    • Proximity Sensor: $30
    • Motor Driver(s): 2 x $8.95 = $17.90
    • Arduino Pro Mini: $18.95
    • Battery & Connector:  $16.99 + $3.25 = 20.24
    • Shipping: $17.98 + $61.62 = $79.60 (ouch!)
  • Total Estimated Hours: 30
  • Final Weight: ~450 grams (I still have room for better sensors :) )
  • Width: 9.9 cm
  • Length: 9.75 cm
  • Height: 7.3 cm
  • Code is on github
Lessons Learned:
  • Don't use solid core wire in tight spaces...I already knew this, I just wasn't clever enough to chop up some useless USB cables for multi colored stranded wire until the second attempt.
  • Buy some good tweezers and fine solder tips for surface mount.
  • Find better paper for toner transfer. I used plain paper this time, but I need to find something better.
  • Procrastinating and then having to pay for 3 day shipping from Canada really raised the price on this thing. It's quite reasonable if you remove shipping from the final cost...
    • I'll just have to get a lot of use out of this bot to recoup the cost.
  • You could also add in $110 for the battery charger...but I got a really good one so I can use it on more projects in the future. You could also throw in $70 for the Dremel drill press, Dremel bit chuck and Dremel drill bits...but I'll used the crap out of those for boards from now on...
    • I don't recommend the drill bits though...get them online, get several of whatever size you need.
  • Cut down copper-clad PCB board to size before running it through the lamitator for toner transfer. I tried this this time and it worked better than sending the whole board through (less jams).
  • Hydrochloric Acid is better and faster than Ferric Chloride for etching PCBs.
Code:
Coming Soon!

Wednesday, June 13, 2012

Typo...matic (Part 3)

My Selectric II project is finally 'done'. Here's a demo video.



Please read the previous posts for more details and try to come visit the KC Maker Faire on June 23/24 if you can.

Edit: Here's a great video explaining the Selectric typerwriter(s) mechanisms:


This was my first attempt at serial via straight C code (gcc) in Linux. Needless to say my code is ugly, full of failed attempts to get POSIX serial communication working and bad coding practices. There's a great guide here by the way... I'll get it cleaned up and added (Arduino and C code) to this post as soon as I can but...

The rest of this week and next week I'll be working on a sumobot for the competition at the faire. I'll post about it too...If you've got a mini sumo bot and you're in the area come and compete (mostly for bragging rights) we don't have enough entries yet!

Friday, May 18, 2012

Typo...matic (Part 2)

I've made quite a bit of progress on the Selectric II project. Since the last post I managed to get a fair amount of the mechanisms necessary to actuate the keys figured out (at least for a first attempt). I made the mechanical additions using a bunch of Erector Set pieces.



For the time being I've used fishing line to tie the Erector Set levers to the solenoids. Initially I had it set up with fishing line going up over a bar above all the key press mechanisms (essentially pulling up on them) but this didn't work and wouldn't have survived the test of time (rubbing against a bar all the time...).

This past week I made my first go at the toner-transfer & ferric chloride etching process to make a Solenoid Driver board. I also did quite a few things in Eagle for the first time. The circuit for the driver board is below, it's a simple power FET (IRL2703) circuit with some blinkin' lights thrown in for good measure. Eagle files below, I used default part libraries and the Sparkfun Eagle Library.

I'm no expert on the toner transfer process, so just Google that if you're interested. I will document the equipment I used (some of which is not the greatest) here in case anyone is looking to buy this stuff for the first time:
  • Laser Printer: Samsung ML-2525W
    • Does an 'okay' job. Toner thickness could be better, and manual paper feed mechanism is wonky. Full sheets of photo paper recommended. 
    • Had a weird issue with linux (had to reboot printer after each print...) that I didn't take time to figure out completely.
  • Laminator: GBC HeatSeal H220 Laminator
    • The RadioShack 0.065 ish boards + 2xPhotopaper stalled a few times in this laminator, but it has a release button (kind of a clutch mechanism) that you can keep pressed down to help big pieces through.
    • Next time I'm just going to get thinner boards from some web store.
  • Ink Jet Glossy Photo Paper: HP 'Everyday' Glossy Photo Paper
    • Not recommended. This doesn't soak up water well and doesn't peel off board easily. But it's Walmart's least expensive option...
    • I also tried plain paper (v0.01 boards were made with plain paper transfer) it does a passable job on big traces.
    • I also tried parchment paper (on it's own too flimsy to make it through printer).
      • I'm going to try this paper again next time, but taped (with something other than scotch tape) to a normal piece of paper. 
  • Copper Clad Board: I used the 4"x6" double-sided sheets you can get at RadioShack because I was in a rush.
  • Ferric Chloride
    • Used the off shelf RadioShack stuff. 
    • It worked 'okay'. I know there are other cheaper chemical options, I might give those a try next.
    • Please look up how to dispose of this stuff (especially after it's infused with copper particles)
      • In a nut shell, take it to a local chemical disposal facility if your in a rush.
      • If you want you can allow copper to settle to a sludge and poor off the reusable ferric chloride.
      • To fully neutralise it you must slowly add Sodium Bicarbonate (Baking Soda) to it until the (obvious bubbly) reaction is stopped.
    • I HIGHLY recommend researching this before attempting.
      • Treat it like a chemistry assignment for school, write down everything ON PAPER that you need to do, from opening the bottle to how you're going to do disposal. That way you don't skip steps or start the process when you don't have everything you need to finish it!
      • Understand the chemistry, maybe not the gory details, but know the chemicals, safety procedures and the gases this stuff puts off when reacting.
  •  Adgitator
    • Not required but proved to be very handy.
    • I MacGyvered together an agitator using Tupperware, CDs, a servo, an Arduino, and Duct Tape...
    • The Arduino commands the servo position with pseudo-random timing.

After etching and soldering on all the components I went to town testing it on the Selectric II. I only attempted to hook it into the seven levers needed for key presses though. I'll post again when it's further along, but I did make a build video:


Solenoid Driver (v0.2) Eagle Files: Solenoid Driver (v0.2).zip
  • This is a board to drive 8 solenoids (at up to 30 V) at a time. It uses:
    •  IRL2703 Power FETs (with 5V compatible gates)
    • [overkill] 6A/1000V fly-back diodes
    • 1kΩ and 10kΩ resistors
    • LEDs 
    • Sparkfun screw terminals (here) 
    • Standard 0.1" spaced headers

Friday, May 4, 2012

Typo...matic (Part 1)

Started working on a Selectric II typewriter project. I used this typewriter last year to make business cards for the KC Maker Faire. This year I'm going to hook a bunch of solenoids up to it and throw in a micro-controller to allow me to control it's output with a PC via serial...

So far I've just got the mechanisms for key presses figured out and the solenoids mounted. Next I've got to get the control circuit board worked out and assembled, along with switches to read the keys when they're pressed. Then it's programming the micro-controller and figuring out what to do with the end result...Zork's been done...maybe epic ASCII art on tractor-feed paper...in any case it'll be KC Maker Faire and it'll be awesome.



I did get one solenoid hooked up in a bread-boarded circuit to make sure I had parts that would work...

Tuesday, March 13, 2012

Drinkin' Cap

I've got an epic St. Patty's Day planned for this Saturday and I thought: wouldn't an LED-ified hat be awesome? Then I thought: "I have to. It's a moral imperative."

A couple days shopping around for a bowler hat and green LEDs and here's the result:


The LEDs were mounted by using a new (sharp) x-acto knife blade to slice a single small slot in each LED position. I pinned a shamrock pattern to the hat first... The circuit was wire wrapped not soldered. Once all the LEDs were poked through the hat I used copious amounts of hot glue to make them permanent. A 10 kO pot is in line with a 9 volt battery to current limit (and provide a brightness control). A Velcro wire management strap was sacrificed and hot glued in the brow to hold the battery in place. The circuit:

Original Image Source: led.linear1.org/led.wiz


The top of my head does touch the top of the hat but there's actually just enough room in the front tip for the battery. It fits quite nicely... "I was thinking of the immortal words of Socrates, who said, "... I drank what?""