I’ve been working on a home-made set of widgets to convert this locomotive to R/C and battery power. It’s a chance to do some circuit design, soldering and a bit of embedded software engineering for fun. The idea is to completely replace the insides of the locomotive with inexpensive, off the shelf components. I will use those to drive the main motive power- a 15v 3500mah Nimh battery array, and tap off that to provide stereo sound and lighting control.
While the motor controller was easy- I’m using the Pololu 18v7, the sound and R/C switches for the lights and the reversing power relay was where the fun was so I designed my own board. It uses an Atmel Attiny84 microprocessor, two mp3 player cards, a 3A power relay and two power mosfets.
Anyhow, the innards of the Aristocraft RS3 were not impressive. Complicated rats nest if you ask me. I have no interest in track power nor DCC so I just gutted the entire thing down to the leads on the motor trucks. I did save the two small circuit boards that plug into those but everything else with the exception of the 7805 power regulator got tossed.
I have the sound/relay card almost finished, as things progress I’ll post more details. Here it is stripped all the way down:
And a picture of the motor truck, the colored wires are the motor leads, the two black wires go to the track pickups:
Here is everything I’ve been playing with for the past few months in preparation for the RS3 battery conversion project. The hacked up R/C transmitter is in the back, note the pocket for my android tablet. The two buttons will be for sounds, the toggle switch is the reversing switch for the power relay.
The 3D print fellow is in front of that, I have a sitting version of him to replace the out of scale cartoon figure in the cab. The soundcard/relay/mosfet board is to the left and the pololu 18v7 motor controller is on the right in front of the switch harness. The power relay is wired and working off the intercepted servo signal of channel two.
The smoke generator is the black box at the far right, I think it needs its own hack. Sync’d to the motor control would be cool? I’m not sure about this one, not even sure it’s worth it to put it into the model at all. Obviously I need some testing on that first.
The Pololu USB AVR programmer/ttl serialport/sloscope widget is at the front with the red clip connected to the back. This is my ‘scope’ probe. An amazing board for the price! I tell you what, I am absolutely sold on the AVR series of chips and this programmer. The ATTiny84 does not have a serial port, yet I found a nice software uart for free at AVR freaks. I can hook one pin of the micro up to the serial input on the Pololu and that combined with an LED on one of the port pins gives me a decent set of debugging tools. Super cheap too, ATtiny84s are like $3 in singles, way less in qty.
Anyhow, the sound algorithms need to be fleshed out, the mounting of the boards is not right yet and I need to put together a solid battery pack. But I’m getting there 🙂
I’ve been playing with the Atmel series of micro processor chips lately, specifically the ATtiny84 microprocessor. This is a 14 pin DIP chip that despite it’s size is actually quite powerful. You can download the free Atmel Studio 6 and use a low cost programmer like the Pololu AVR usb programmer ($20) and do C code. Quite a lot of fun.
I’ve managed to get a small code set working that uses nothing but the standard libraries included with Atmel Studio. It reads 6 channels of R/C from a generic airplane type radio control and breaks each channel down to an integer between 900 and 2000. I get a micro second resolution using the stock internal 8mhz clock, no external components at all! Very cool.
One thing that I thought was very handy- the Pololu USB AVR programmer has this nifty little application called SLOSCOPE. It turns two pins on the programmer into inputs for a light duty oscilloscope! Works great, I can see the R/C pulses and watch them change widths as I move the joysticks.