View Full Version : Hacking the r124501b ESC pcb for use with an arduino PIC

2010.08.10, 08:04 PM
Hey boys & girls!
You look like you might be able to help me with a project.
I originally posted this as a reply to another thread but i think it might could need a thread itself.

I have an yellow mini z rc monster truck with this r124501b ESC pcb inside.
I want to solder on an ekstra pwm cable from a atmega328p PIC (arduino microcontroller) to be able to control the car both with its original rc remotecontrol but also be able to control it only with the PIC more like a robot. I will run all the pwm through the pic for making programming more fun.

I cant find any schematics of the pcb anywhere so i need some help identifying the components and where to solder.

The way i was going to solve the steering was to run the pwm cable to the steering rc servo from a digital pwm output on the PIC and run a cable from the pwm steering output on the r124501b to an input on the PIC.
This way the microcontroller handles all the info it gets from the remote controller first before it sends it out to the steering servo.

The ESC for the forward / reverse motor i was planning on finding out where the pwm input from the rf circuit enters the ESC component and run a cable from a digital pwm out on the PIC and run the pwm out from the RF circuit into an input on the PIC instead.

I am quite used to playing with rc servos and PIC but this chip kind of got me questioning a couple of things.

Why are there both a green and a yellow cable going into the steering servo with the red and the black wire.
I guess the red are +6v and the black are -6v but i never seen the need for using two wires to send an PWM signal before? Any ideas why its like this?

Where should i solder in the pwm for the ESC?

im adding a picture of the pcb as well.

2010.08.11, 12:05 AM
The steering servo is not a traditional servo. There is no PWM. Two wires are for the servo motor, and the other two goes to a pot that acts like a variable resistor for steering position feedback.

The MOSFET for the motor are on the right side of the board. You can tap into them.
Little more details on them here:

2010.08.11, 07:08 AM
Thanks for the reply benlee :)
That makes it a little different but still a fun challenge to do this.
so they just reverse the current on the mosfets to reverse the motors then.

The pot i can always read through the analog inputs on the PIC. looks like it varies from about 1.85kohm to 3.45kohm on about +2.5volt powersource.

Do you know where on the other side of the pcb the pwm signal from the rf controller gets translated to control the mosfets?

To bad there are no schematics or datasheet on the pcb anywhere.

2010.08.11, 10:49 AM
After reading some more about the pcb and the circuit work it looks like the pwm signals are multiplexed together after the radio reciever so that makes it hard to tap into those signals.

Its almost more tempting to make a new pcb with the stuff i want instead of hacking this one. The thing that sets me back is that i have to create new ESC from start..

To bad its not a normal servo for the steering, otherwise i could just have used some stuff from one of the other rc stuff i have.

this might be interesting for others trying something similar.


2011.09.20, 11:37 AM
Apologies for reviving this dormant thread, but this topic is quite interesting.

Much of the good discussion on board hacking comes from this much older thread (to which subsoniq linked):

If the goal is to have a microcontroller in-line with the Mini Z electronics, it would seem best to reroute the Mini-Z's FET PWM to an input capture pin, then generate a replacement set of PWM that drives the FETs directly from the MCU.
The setup could work as a pass-through mode, in which the MCU reflects on the output PWM what was measured on the input, or it could be an augmented/autonomous mode which modifies the user's TX commands with sensor and guidance feedback.

So, it is just as easy as this? Can we cut/score the traces that normally pass PWM signals to the FETs, feed these into an MCU, then generate replacement FETs? This would seemingly work for the motor, which presumably has no feedback (back EMF?) and just provides a forward/reverse voltage on two lines.

subsoniq, what do you mean that the PWM signals are multiplexed together? Can you find on the board a signal with a 20ms period that contains two high-pulses from the transmitter? If so, do these pulses represent steering and throttle in some obvious way?

If this signal does exist, then it is trivial to get both steering and throttle commands into an MCU with an input capture and some logic to identify which pulse corresponds to each channel.

2011.09.21, 11:46 AM
Pin 4 of the PIC is the PPM output from the radio. This portion is standard RC stuff with a variable length pulse of 1 to 2 milliseconds (1.5ms = center) to determine control position.

This is the best place to interact as you can either generate the pulsetrain with your board when you want control, or pass the original signals when you don't.

I haven't spent much time with this yet, but I did a rough project a few weeks ago with a wifly module and an AVR, driving the car with the tilt sensors on an android phone. You can see it here: http://www.youtube.com/watch?v=Z2JbViUoFFc. The car is the slightly larger one on the track, a CP cup f1 conversion.

Basically, keep the line (pic pin 4) low, then blip a high pulse for 200us, then keep low for 1-2ms for the steering then blip high for 150us, then low 1-2ms for the throttle, followed by another 150us high blip, then low for 18ms and repeat.

At some point soon, I will do a simple interface to get the servo pulses from a cheap 2.4 rx and combine into a pulsetrain to upgrade some AM cars.

2011.09.22, 04:14 PM

Outstanding information, thank you for sharing. This will be much easier than running the FETs directly.

Do you know if the forward-to-reverse timeout issue on the 2.4Ghz systems occurs in the transmitter or in the receiver? My MR-01 can switch rapidly between driving and reverse, but the 2.4GHz MR-02s seem to require a longer transition from forward, to brake, to neutral, to reverse. This has been an annoyance in our office races and we have been looking for a way around it. Of course, I suspect that the 2.4GHz systems don't have a similar PPM, so perhaps they would require a different strategy to modify.

Regarding your interface, are you planning on measuring PWM-level channel data, or use the presumably-digital output of the 2.4 receiver? I have stuck with 75/72/27MHz because of the easy accessibility of the PPM pulse, whereas I do not know of a 2.4GHz equivalent, apart from some serial protocols.

Really nice work getting the phone interface to work so cleanly!

2011.09.22, 09:31 PM
Everything I wrote pertains to AM radio cars.
The 2.4 ASF models are data, not ppm. The link between the processor (pic 16fsomething) and radio chip(Cypress cyrf6936) is SPI. The reverse delays are done in the receiver logic portion.

I am a little stumped by the reverse on my F1 boards. I need to test one with an AM transmitter, but I assumed they would require the reverse-neutral-reverse command to enter reverse. My test car goes directly into reverse without doing so.

I can't find my notes from a few months ago to tell you the exact pins, but from memory, I can tell you the following if you want to interact directly with the board and ditch the on board processor.

The PCB has H bridges for the steering motor and drive motor, each using two pins. One is for direction, the other is PWM to regulate power.
For the steering, there is also a position signal from the steering pot. It appeared to be an RC network, ramping up at a rate which reflected the pot position. I didn't go too far with this as once I found the PPM pin, I had what I needed.

If I was to remove the on board pic to drive the rest myself, I would add the third wire to the pot to read with ADC, then drive the Direction and PWM pins accordingly.

When I upgrade my one MR-02 AM car, I'll measure the steering and throttle pulses from the receiver, then convert to send to the MR02 board. The standard servo signals are positive pulses, again 1-2ms. Assuming the receiver pulses are sequential (as most are) and not simultaneous, it is as simple as:
1. Wait for steering to go high, then drive the PPM pin high for 150us
2. Wait for steering to go back to low, then drive the PPM pin high again until throttle pulse goes high
3. Wait for throttle to return low and pulse PPM high again for 150us
4. Loop back to step one to wait again.

The above assumes the gap between the two pulses from the RX is within the acceptable range of the on board PIC, if not this strategy would need to be modified some.
Since this particular car is an i-Series, we'll get the benefits of digital 2.4, with instant reverse. This is the car my daughter's boyfriend uses and he has frequent problems with glitching and drop-outs.

On the AM cars the 8 pin chip leaves plenty of room for hacking. The 2.4 cars processor has much tighter pin spacing so you will likely want to find other spots on the board to tap into.
There is very little space under the board. I think once some of the taller RF bits are removed from the bottom of the AM board, I'll just be able to put a hobbyking RX with no case and pins removed inside the chassis along with my dead-bugged interface chip. I'll probably lose the switch, along with its retainer, which is also the plastic piece the motor wires screw into, and solder everything directly.

2011.09.22, 10:46 PM
Very cool, I saw something where one of the F-1 teams did the same thing with an actual F-1 and mini-z. I think they powerered it with an I phone.

It would be very cool to have a TX app for smart phones. If you could buy an app for say $29.99 that would work with all the same adjustments as a Kopro po radio and be just as competitive the hobby would be much more affordable for people looking to get started.

Looks difficult to manipulate though. Probably easy for people already accustomed to gaming on smart devices.

Anyway very cool and above my pay grade.

On a different topic are you able to repair I-lap transponders?