The One Day Remote

5 June 2012

In an effort to inhibit sound from a wall-mounted television from propagating through to the adjacent bedroom, I pieced together an amplifier to drive two external speakers down the back of the living room.

With some scrounging around, I found an old RC volume control kitset from an issue of Silicon Chip magazine, so in this went. I also found various old remotes, but alas, not one using the required RC-5 protocol (not to be confused with the similarly named cipher). What was I to do? …hunt around for weeks for such a remote? Perhaps try my luck on an unbranded “universal” jobby? No. Well, actually yes to the latter, but unfortunately Murphy had his way. Go figure.

Soln: Make a crude RC-5 remote to train a professionally designed programmable remote.

With a few hours to spare, some stripboard, and some salvaged parts, I came up with the One Day Remote:

Image

..and it worked first go. Take that, Murphy!

This baby has the grunt of a 32 bit ARM clocked at 48 MHz (LPC1111, ext. 12 MHz crystal). Overkill for a standalone remote, but certainly fit for training something more suitable.

At the risk of getting too technical, I’ve simply linked the self-explanatory source code. You’ll need cr_startup_lpc11.c  (by Code Red) and CMSIS 1.3 libs, both of which are supplied with the LPCXpresso IDE. The LPCXpresso dev. kit should work fine and only costs a few $.

Now to buy a remote 🙂

Awesome bicycling robot

23 April 2012

I got this video link from the Robonz mailing list and thought it was blogworthy:

I think it beats Murata Boy!

*edit. Better video here:

Turns out I had reverted a change I had made earlier that would’ve solved the motor heating issue. The wheel rate feedback calculation was the culprit: program loop too fast to register a sufficient number of increments v.s. relatively inaccurate measurement of ‘time since last update’.

I also discovered the need to improve pendulum rate feedback. The problem with this was that the raw signal, providing 110 °/s sensitivity through a 10 bit A-to-D, didn’t quite cut it. I decided instead to use the 4.5x amplified signal available from the gyro, providing a raw 500 °/s sensitivity and therefore improving the digital resolution. Additional pre-filtering before Kalman filter bias removal improved performance even further.

The graphs below show, from worst to best, the gyro with…

1. 110 °/s sensitivity with no pre-filtering
2. 500 °/s sensitivity with no pre-filtering
3. 500 °/s sensitivity with simple IIR pre-filter, n=4
4. 500 °/s sensitivity with RK4 pre-filter (Ignore the cyclic motion on pendulum rate; I think I changed something else to cause this)

…on pendulum rate as interpreted by the controller:

and subsequent inertia wheel motor duty:

Clearly there is a reduction in the noise seen on motor duty. This is especially desirable about the zero-velocity point where the H-Bridge controller has to constantly change direction of a large amount of current (~12A !).

Here’s a (rather unspectacular) video:

Although I’ve integrated out the pendulum ‘zero’ angle error caused by an off-center balance point, I’ve yet to sort out the non-zero inertial wheel velocity. Also some tuning to do…