Close

Current Control System

A project log for Robotics for the Rest of Us

A solid robotics platform developed in Viet Nam for under 100$

legionlabsLegionlabs 08/17/2014 at 04:220 Comments

I want the project to be easy to control over the web, so I threw together some web2py stuff and got it working in a few minutes:

It's ugly, high latency, and literally caught on fire the first time I tried it. At least the instructions are clear and optimistic (Press buttons!).

The reason for the fire is interesting! It's due to a signal problem. Basically, small variations in the servo control signal can cause the servomotor to grind back and forth tiny amounts. I'd seen this before, and it didn't really cause any problems before. However, the metal geared servo built up enough heat doing this to melt the plastic case and catch on fire... which is fine, I rarely learn anything without some sort of unplanned combustion taking place.

Of course this was the only servo that I didn't have a spare for. My amusement and lack of amusement were simultaneously noteworthy.

Anyway, the fix is easy. The steering servo is pretty powerful and turns quickly, so it's sufficient to turn off the signal when done sending new positions. It takes a good 2-3 minutes of grinding before spontaneous combustion, so using it normally doesn't cause a problem.

A little bit more about web2py:

I'm using this because it's easy to install in Linux (download and run a single file), and easy to recycle any code back and forth between this and any future control systems (which will also be in Python).

The note about chmod is a reminder that web2py doesn't have permissions to access /dev/ttyUSB0 (it's not running as root or anything), and that I have to SSH into the robot each time and chmod 666 it until I stop being lazy and fix permissions properly.

If anyone asks for the code, I'll put the controller and view code up. It's not exactly super exciting stuff.

Discussions