05 May 2010

Fired up the soldering iron

Not letting this robot thing fizzle out, I pushed for more progress tonight. The immediate goal is to put the Arduino Duemillanove on the chassis, tie it through the L298N motor driver to the motors, and try to drive it around with tethered controls.

Sounds simple enough, until you try it. Tonight's free time was consumed entirely by trying to get that 'tethered controller' part operational. The result? I do now have two potentiometers, in relatively nice hand-held cases, hooked to the arduino, and the arduino producing two channels of PWM, which currently just operate LEDs. The rest of the post is just the gruesome details.

The controllers started life as Apple 2 paddle controllers, probably dating to about 1978 by the look of them. Just one of those weird sorts things you end up with in your electronics re-purposing bin. Anyway, after no doubt being used for some truly epic Pong sessions back in 1978, then gathering dust for a while, they are now going to be reincarnated as a low-tec robot control input device.

There are two 'paddles', each one having a potentiometer and a momentary switch, and they are Y-cabled to a 16pin DIP header. (Funny what passed for a consumer product connector back in those days.) Some re-wiring was required. Not sure how the Apple2 dealt with them, don't even need to know, just suffice it to say that the wiring in there was strange, some kind of rheostat/270ohm thing. Whatever. I re-wired them to provide a 0 to +Vcc output, and while in there, rigged the switch to be normally open with contact to ground. The DIP connector plugs nicely into a breadboard, too.

So with two analog inputs of the arduino, a quick 'sketch' (honestly, that's what the arduino IDE calls a project) to copy AIN0 to PWM pin 9 and AIN1 to PWM pin 10, and there's a demonstration of a system that should be able to provide PWM to actual motors, just as soon as that L298N can be rigged up.

Here's the arduino, skating around loose on top of the breadboard but jumpered to a pair of LEDs, standing in for the motors, and to the controller input. The 16pin controller input is that large black boxy thing in the bottom center.


and here's the L298N driver board, and the battery for motive power. That tangle of stuff on the left is the L298N, some bypass caps, and you can just make out the TO-220 case of the 7805 and 330uF bulk cap that will provide isolated logic power to the L298. Motors connect on the left side, and that entire right half of the board is six opto-isolators. Told you it was ugly!

Anyway, that chewed up a couple of hours, but tomorrow, that 298 is going to trade electrons with that battery, and with any luck at all, the smoke will stay inside the little plasticky things.

Labels: ,

0 Comments:

Post a Comment

<< Home