DIY – xESC Adapter [Ver2.0 w/ATtiny45]

IMG_20140620_162901

Back in October 2013, I made an Arduino based adapter that allows unidirectional aeroplane ESCs to work with surface/pistol radios for RC cars and boats. I used a ATmega8 microcontroller in that adapter and honestly, that by itself was the size of an average ESC, I couldn’t really put it anywhere conveniently on my car due to space constraints and weight concerns (If I can cut down on 5g, believe me, I will).

Even back then, I was trying to make the code work on an ATtiny45 and I wasn’t sure what was going wrong until, Justblair pointed out in the comments that the Tiny45  doesn’t have 16-bit timers, only 8-bit ones and my code was based on the Arduino servo library which utilized 16-bit timers. He also suggested a solution to get my code working on a Tiny45 and that fix is the Servo8Bit library.

I tried playing with the Servo8Bit library for a few weeks and gave up as I couldn’t get it going and the SoftwareServo wasn’t fast enough for my application, the signal was pulsing with 1 second intervals. At this point I thought the pulseIn function was playing bad with the libraries.

Yesterday, something went wrong with my first prototype which was using the ATmega8, I haven’t tried reprogramming it yet. Rather, I decided to look into the ATtiny45 again and I finally figured out why it wasn’t working for me, I had failed to notice the Servo8Bit library works only at 8MHz!

So I quickly prototype the new setting and it works flawlessly on the Tiny45! Also, I’m using a Tiny45 in SoIC package so the hardware is about 20 times smaller and a whole lot lighter than the previous one. It blends in with the 3-wire servo line and you don’t even know it’s there. You can either use a Tiny45 or a Tiny85.

I ran my car on more than 12 packs over the course of two weeks and I haven’t noticed any problems, no run-away car, nothing. The new adapter works like it should, hassle-free! However, if someone builds one and experiences problems, I’d be happy to help you guys out.

NOTE: The only electronic component  used in the adapter is an ATtiny microcontroller, it’s not supposed to heat up even after hours or continuous usage. If you do feel the adapter dissipating heat, there has to be something wrong with it; please stop using it immediately and double-check all connections. The ATtiny45/85 set to 8MHz clock frequency is rated to run on an optimum 5V (Typical BEC voltage of most ESCs), anything significantly less or more may affect the performance of the microcontroller.

I have a few pictures of how I put together the militaristic hardware and some useful links below,
Schematic
xESC_Schematic
No need for etching a PCB if you have a SoIC package, I just marked a few lined and filed out strips of copper surface to create eight individual sections/pads for the microcontroller leads.
PCB
Temporarily tack on wires to the SPI pins (MOSI, MISO, SCL, RST, GND, VCC) so you can program it.
IMG_20140620_110204
I used a USBasp programmer to upload the code to the Tiny45.
IMG_20140620_110826
Be very careful while soldering the servo connectors, make sure you don’t have any accidental solder bridges between pins, run a sharp blade in between pins just in case. Looks a bit ugly, but it works!
Untitled-1
The connectors I soldered in the previous picture were a bit short So I replaced the connectors with longer wires and wrapped it up in heat shrink insulation tube.
IMG_20140620_140609
I love how small and easy it is to handle on my car.
IMG_20140620_140336
Anjan Babu
anjan.anjan5@gmail.com
Advertisements

Tagged: , , ,

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: