DIY- XESC Adapter [ATtiny Version]

6.0K3016

Intro: DIY- XESC Adapter [ATtiny Version]

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've already detailed on what the adapter is and how it works or even why it is needed, check out the Ver.1 instructables.

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).

Last week I fried that adapter that was using the ATmega8 and so I decided optimize it by replacing the Mega8 with an ATtiny45. It's a pretty straight forward switch from the Mega to Tiny, the only difference is in the code, It uses the Servo8Bit library for the Tiny45.

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.

STEP 1: Schematic

STEP 2: Etch-free PCB for SoIC Package

I used an 8-pin SoIC package, so I needed a PCB. DIPs should be easier to solder and not need a PCB.

This article on how to soldering SoIC devices by hand should get you started.

STEP 3: Programming the ATtiny45

Temporarily tack on wires to the SPI pins (MOSI, MISO, SCL, RST, GND, VCC) so you can program it.

I used a USBasp programmer to upload the code to the Tiny45. You can also use an Uno or Mega to program it, here's how.

Before you burn the code, select ATtiny45 (Internal 8MHz clock) from Tools > Boards

It's important that you select the 8MHz clock, because the Serv8Bit library is limited work at to 8MHz.

Download Arduino code.

STEP 4: Soldering the Servo Connectors

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!

Double check connections after you're done, test it and wrap it in heat shrink insulation tube.

Visit my blog for the extra bit of story behind this DIY!

Good luck, DIYers!

12 Comments

Hello I've tried to verify the code and it's giving an error.... oddly it's not including the servo8bit.h file and instead it's running the code (servo8bit.h) in another tab???? Please help.

Did you ever get that sorted?

No I gave up on this project cause I was planning to modify it for some other use (which i realised it is a futile attempt at doing it). I believe the code is for a different IDE (not arduino).

I'm also going to use this for something else; electric longboard. I'm almost positive this is for the Arduino IDE, you can even see the Arduino environment running in the second image of step 3.

I've managed to program the ATTiny45 using an Arduino as an ISP with the code he provided. However, when I plug the programmed Tiny45 to my receiver & ESC, it does nothing. I noticed that there is a folder named Rx_signal_values_CODE, so I uploaded that code to my Arduino which I believe is intended to help debug any issues and print the values that the Tiny45 is generating to the serial monitor. The Tiny45 is spitting out random numbers even when my RC transmitter is not connected.

This is as far as I've gotten but have only been working on this for a couple of days now. I'm still looking into how the 8bit library works etc. So any and all input would be great!

I recently made a couple more for a friend.

Those look very good! I just bought some of those small PCB's too! Thank you for making this and sharing!

You will need to set the tiny 45/85's fuse bits to 8MHz. Refer: http://highlowtech.org/?p=1695
Code was originally written using 1.0.3. Although, I was able to compile and upload using the latest 1.0.6 using Arduino ISP.

I've ensured the Arduino IDE is setup for Tiny45 8MHz Internal. I was initially using Arduino V 1.6.4 but I have downgraded to 1.0.6 and succesfully reprogrammed the Tiny45 But I still have no luck in getting it to work with my ESC.

I plugged my RC receiver into the Arduino and used the RX_signal_values.ino that you included, and I am able to get a reading on my Transmitter's signal via serial monitor. The values are as follow:

999 when applying full brake (trigger is pushed forward all the way)

1500 when in middle position (trigger is in resting position)

2000 when full throttle (trigger is pulled all the way back)

Now that I have a reading on the input side of the Tiny45, how can I get a reading on the output side on Pin 6?

If I remember correctly, the Arduino code folder will contain the .ino file and two other hex files along with it, without which the sketch will not compile.

I believe the Step 1 Schematic image is incorrect; it shows the positive and negative leads of the ESC both going to the same power rail, essentially shorting out.

Yup, sorry about that. I will edit it ASAP.