Mini-Z, Kyosho Mini-Z Racer, MR-03, MR-02, MA-010, Forums, News, Pictures, Parts, and Shop - Mini-ZRacer.com
Forums, Mini-Z, MiniZ, Kyosho Mini-Z, Kyosho MiniZ, Kyosho Mini-Z Racer
Mini-Z Hop-Ups, Mini-Z Parts, MiniZ Hop-Ups, MiniZ Parts, Kyosho Mini-Z Hop-Ups, Kyosho Mini-Z Parts, Kyosho MiniZ Hop-Ups, Kyosho MiniZ Parts, Kyosho Mini-Z Racer Hop-Ups, Racer Kyosho Mini-Z Parts
Old 2010.08.10, 08:04 PM   #1
subsoniq
Registered User
 
Join Date: Aug 2010
Posts: 4
Hacking the r124501b ESC pcb for use with an arduino PIC

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.
Attached Images
File Type: jpg Mobile Photo 11. aug. 2010 02 55 01.jpg (400.9 KB, 53 views)
subsoniq is offline   Reply With Quote
Old 2010.08.11, 12:05 AM   #2
benmlee
Registered User
 
Join Date: May 2006
Location: Los Angeles
Posts: 375
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:
http://mini-z-guide.com/mosfet.htm
benmlee is offline   Reply With Quote
Old 2010.08.11, 07:08 AM   #3
subsoniq
Registered User
 
Join Date: Aug 2010
Posts: 4
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.
subsoniq is offline   Reply With Quote
Old 2010.08.11, 10:49 AM   #4
subsoniq
Registered User
 
Join Date: Aug 2010
Posts: 4
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.

http://mini-zracer.com/forums/showth...t=31136&page=3
subsoniq is offline   Reply With Quote
Old 2011.09.20, 11:37 AM   #5
Project240
Registered User
 
Join Date: Apr 2008
Posts: 6
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):
http://mini-zracer.com/forums/showth...ighlight=31136

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.
Project240 is offline   Reply With Quote
Old 2011.09.21, 11:46 AM   #6
I-Lap
Registered User
 
Join Date: Oct 2004
Location: NW Chicago Burbs
Posts: 104
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.
__________________
I-Lap Timing Systems
Precision Timing for Small Scale Motorsports
www.rclapcounter.com
I-Lap is offline   Reply With Quote
Old 2011.09.22, 04:14 PM   #7
Project240
Registered User
 
Join Date: Apr 2008
Posts: 6
I-Lap,

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!
Project240 is offline   Reply With Quote
Old 2011.09.22, 09:31 PM   #8
I-Lap
Registered User
 
Join Date: Oct 2004
Location: NW Chicago Burbs
Posts: 104
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.
__________________
I-Lap Timing Systems
Precision Timing for Small Scale Motorsports
www.rclapcounter.com
I-Lap is offline   Reply With Quote
Old 2011.09.22, 10:46 PM   #9
cosmicsoul
The Mad Mexican
 
Join Date: Dec 2007
Location: Greensboro, NC
Posts: 645
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?
__________________
Jay Vasquez
MWG Racing
cosmicsoul is offline   Reply With Quote
Reply

Bookmarks

Tags
arduino 124501b esc

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Are there better and worse ESCs? pukkita Mini-Z Overland MV-01 4 2010.08.10 07:54 PM
How To merge ESC Spinner on PCB 01 or 02 minircw iWaver 8 2008.04.16 09:16 PM


All times are GMT -5. The time now is 10:46 AM.


Powered by vBulletin® Version 3.8.3
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2011 Mini-ZRacer.com
Mini Inferno Sale - Up to $85 Instant Savings!
Micro-T Hop-Ups
RC18R, M18, Micro RS4, Mini-LST, TamTech-Gear, Minizilla, RC18T, RC18B, RC18MT
shop.tinyrc.com Products

more»
Tiny RC Community News
[03/22/17] MZR was on vacation, didn't... : All kidding aside, the host experienced a bit of a server meltdown last week and efforts to restore the site to a new server took longer than anticipated. The current server is temporary until - more»
[11/25/15] Did You Hear? Our Black... : Hey Racers,
We're getting started a bit early with our Black Friday sale this year.  Generally we're not supporters of retailers opening early on Thanksgiving, but in our case, we're - more»
[06/30/15] shop.tinyrc.com: Have You... : Hey All! Just a quick reminder to everyone that we post all of our shop.tinyrc.com Newletters here on the MZR Forum. If for some reason you miss them in your email inbox, you can always see the - more»
Mini-Z, Mini-Z Racer, MR-02, MA-010
M18, M18T, RC18T, Mini-LST, Mini-T, Micro RS4, XRay, 1/18, 18th scale
XMODS, XMOD, Micro Flight, ZipZaps, ZipZaps SE, Bit Char-G, MicroSizers, TTTT, Plantraco Desktop Rover, SuperSlicks, Digi Q
Mini Inferno, Mini Inferno ST, half EIGHT, 1/16, 16th scale
Epoch, Indoor Racer, 1/43, 43rd scale
E-Savage, eSavage, eZilla, e-Zilla, HPI
Robots, Bots, Bipeds, Wheeled, Manoi, Roomba, NXT, Lego, Hacking
Crawling, Crawlers, Micro, RC, Losi Mini-Rock Crawler, Duratrax Cliff Climber
Kyosho Minium, Caliber 120, Minium Forums
Mini-Z Hop-Ups, Mini-Z Parts, Mini Inferno Hop-Ups, Mini Inferno Parts, M18 Hop-Ups, M18 Parts