HobbyKing.com New Products Flash Sale
Reply
Thread Tools
Old Mar 05, 2011, 06:00 PM
Registered User
Joined May 2010
25 Posts
Mini-HowTo
HK 30A BlueSeries ESC schematic and I2C/TWI mod

Hello all!

I have done with drawing schematic for HobbyKing 30A BlueSeries Brushless Speed Controller. It's mostly complete, but still can contain some bugs, errors, missing or wrong elements or values (all ceramic caps are 0.1 uF for now, lol) etc. I would be very grateful for any advices, suggestions and corrections.

The target is to re-flash this ESC with opensource firmware, add I2C and/or UART interfaces. In other words, to play with it and to gain some experience with brushless motor controllers

Now I have a couple of questions:
1) Do all of this cheap ESCs have a current sensor? I did not found any...
2) What is the point of measuring voltage at S_PWR?
3) Can't figure out, what the connections PD0-PD2 and PB2-GND are all about
4) Why do we need an middle point connection from BEMF sensors to PD6 (sorry, I'm a noob in ESCs, but I've seen similar connections in other schematics).
5) Is there any well tested C firmware, where I can just modify I/O ports? Or should I write my own?

Thanks in advance for any answer!

Here is the schematic (click for full version: 3200x2400 PNG, 357 kb)


Here are the board photos for reference:

(1637x721 JPG, 354 kb)


(1629x753 JPG, 357 kb)
[TwisteR] is offline Find More Posts by [TwisteR]
Last edited by [TwisteR]; Jun 03, 2011 at 06:44 PM. Reason: changed topic title
Reply With Quote
Sign up now
to remove ads between posts
Old Mar 05, 2011, 06:11 PM
Registered User
United Kingdom, Bristol
Joined Aug 2008
1,774 Posts
Hi

Well this should be a bonus http://www.rcgroups.com/forums/showthread.php?t=1384442
unless you've seen it already

Phil
SadSack is offline Find More Posts by SadSack
Reply With Quote
Old Mar 05, 2011, 10:11 PM
Want heli used electonics
United States, WA, Pasco
Joined Mar 2011
184 Posts
For 2) could it be a brownout detector? The MCP1804 has 800mv dropout, if I recall correctly, so maybe it shuts down or goes to an alternate behavior if the voltage regulator has dropped out and the capacitors are discharging.

Looks like an awesome project. I'm kinda trying to reverse engineer the Syma S107. I have a mostly-complete schematic but to be sure I need to do some destructive testing (stripping the board) to be sure I've got all the circuitry correct, and I don't have a board to sacrifice. boo

Michael
michaelstoops is offline Find More Posts by michaelstoops
Reply With Quote
Old Mar 05, 2011, 10:40 PM
Want heli used electonics
United States, WA, Pasco
Joined Mar 2011
184 Posts
For 3) I might hazard a guess that joining PD0/RXD and PD2/INT0 has something to do with using INT0 to trigger an interrupt when the PPM signal edges come in. Just glancing at the Atmel documentation, I'm seeing that INT0 is the second-highest priority interrupt and will wake it from special power modes.

Grounding pin PB2/SS'/OC1B looks like it would force the chip into SPI slave mode. Perhaps it is setup for in-system programming at the factory?

Just slightly educated guesses.

Michael
michaelstoops is offline Find More Posts by michaelstoops
Last edited by michaelstoops; Mar 05, 2011 at 11:01 PM.
Reply With Quote
Old Mar 06, 2011, 09:28 AM
Registered User
Joined May 2010
25 Posts
Quote:
Originally Posted by SadSack View Post
Hi

Well this should be a bonus http://www.rcgroups.com/forums/showthread.php?t=1384442
unless you've seen it already

Phil
Thanks, will take a look at this thread.

Quote:
Originally Posted by michaelstoops View Post
For 3) I might hazard a guess that joining PD0/RXD and PD2/INT0 has something to do with using INT0 to trigger an interrupt when the PPM signal edges come in. Just glancing at the Atmel documentation, I'm seeing that INT0 is the second-highest priority interrupt and will wake it from special power modes.
Well, I'm totally agree about PD2/INT0, but connection to PD0/RXD does not make any sense...

I have one more question: why do we need to control high and low sides separately? They can be controlled from the same MCU pin, aren't they?
[TwisteR] is offline Find More Posts by [TwisteR]
Last edited by [TwisteR]; Mar 06, 2011 at 10:35 AM.
Reply With Quote
Old Mar 06, 2011, 11:49 AM
"Simplify, then add lightness"
Raleigh,NC
Joined Nov 2000
2,701 Posts
No they can't be controlled with the same pin. At any given time one motor wire is driven high and one is driven low and the third needs to be open circuit(this is where the feedback comes from). You need two pins for each motor wire so you can turn off both high side and low side drivers to open circuit the feedback wire. That is also why you need 4) the middle point connection. The commutation is triggered when the voltage on the open circuit wire crosses the center point between the two driven wires.
jeffs555 is offline Find More Posts by jeffs555
Reply With Quote
Old Mar 06, 2011, 01:36 PM
Registered User
quax's Avatar
NRW, Germany
Joined Apr 2004
711 Posts
Quote:
Originally Posted by [TwisteR] View Post
...
Well, I'm totally agree about PD2/INT0, but connection to PD0/RXD does not make any sense...
...
This INT0 is good to evaluate the PPM pulse and RXD is good to program the ESC with a TTL-serial connection.

But RXD may also be used as a power input, as it is used by some quadrocopters.

cu
quax
quax is offline Find More Posts by quax
Reply With Quote
Old Mar 07, 2011, 12:37 PM
Registered User
Scotland
Joined May 2005
2,109 Posts
For 2, a possibility. Does the ATMEGA8 have a built in ADC?
If not then S_VBAT and S_PWR may be the voltage measuring circuit, checking how long S_VBAT takes to get to S_PWR after being released.
George Shering is offline Find More Posts by George Shering
Reply With Quote
Old Mar 07, 2011, 05:17 PM
Registered User
Solihull, England
Joined Jun 2004
982 Posts
Yes the ATMega8 has an ADC with 8 way multiplexer.

S-VBAT will probably be to give a shutdown when the battery voltage becomes critical. Many ESC's allow you to specify the battery type which with the voltage at startup is used to determine the shutdown threshold. Many ESC's offer a hard or soft shutdown. Not sure about S-PWR but it may be a startup check - to ensure the power is established and correct before allowing the software to start.

Peter


Quote:
Originally Posted by George Shering View Post
For 2, a possibility. Does the ATMEGA8 have a built in ADC?
If not then S_VBAT and S_PWR may be the voltage measuring circuit, checking how long S_VBAT takes to get to S_PWR after being released.
Peter Seddon is offline Find More Posts by Peter Seddon
Reply With Quote
Old Mar 07, 2011, 10:58 PM
Registered User
Joined Jan 2009
59 Posts
Thanks for posting this. I've been reverse engineering the 12A BlueSeries, looks fairly similar (w/ 1 FET per rail instead of 3). I guess the AIN0 circuit acts as an ADC trigger to sample the BEMF?
reph is offline Find More Posts by reph
Reply With Quote
Old Mar 08, 2011, 01:00 AM
"Simplify, then add lightness"
Raleigh,NC
Joined Nov 2000
2,701 Posts
Quote:
I guess the AIN0 circuit acts as an ADC trigger to sample the BEMF?
I think the ADC would be too slow for sensing the BEMF so usually use the analog comparator.

AIN0 is also the positive input to the analog comparator. The negative input to the comparator comes through the ADC mux so it can be connected to one of 8 inputs. The center voltage is connected to AIN0 and the program switches the mux to connect BEMF from the undriven wire to the negative comparator input. When the voltage on the undriven wire crosses the center point between the other two wires the comparator switches which triggers the commutation sequence.

To understand how it works, you can read this very long thread. http://www.rcgroups.com/forums/showthread.php?t=200567
Quax is the guru for BLDC controllers and you can learn a lot by looking at the source code on his site. http://home.versanet.de/~b-konze/
jeffs555 is offline Find More Posts by jeffs555
Reply With Quote
Old Mar 09, 2011, 01:31 AM
Registered User
Joined Jan 2009
59 Posts
Ahh. They're using the ADC's mux, but not the actual ADC?
reph is offline Find More Posts by reph
Reply With Quote
Old Mar 09, 2011, 01:38 PM
Registered User
Dan Baldwin's Avatar
United States, CA, Norwalk
Joined Apr 2004
2,728 Posts
Quote:
Originally Posted by reph View Post
Ahh. They're using the ADC's mux, but not the actual ADC?
A mux is a muliplexer. It's a way of switching the ADC between different analog inputs, so a single ADC can be used for multiple (in this case 8) analog inputs.

Dan
Dan Baldwin is offline Find More Posts by Dan Baldwin
Reply With Quote
Old Mar 09, 2011, 07:38 PM
Registered User
Joined May 2010
25 Posts
Thank you guys for the answers! That make things clearer to me

Dan Baldwin, I think that reph was asking about using ADC's mux for comparator, and not for what "mux" is actually means.
[TwisteR] is offline Find More Posts by [TwisteR]
Reply With Quote
Old Jun 03, 2011, 04:44 PM
Registered User
Joined May 2010
25 Posts
I've successfully converted this controller to I2C/TWI interface. In order to do so, we need to cut two traces (see attachments), add two wires and re-flash it with modified firmware.

The firmware for modified ESC is based on renatopub's code base and is available through svn:
Code:
svn checkout svn://tfsoft.org.ua/esc_firmware/branches/HK_Blueseries_30A_twi/
More details, photos & videos will be added soon
[TwisteR] is offline Find More Posts by [TwisteR]
Last edited by [TwisteR]; Jun 03, 2011 at 06:20 PM. Reason: updated twi mod picture
Reply With Quote
Reply


Thread Tools

Similar Threads
Category Thread Thread Starter Forum Replies Last Post
New Product HK 12A / 40A BlueSeries Brushless controllers CrashingDutchman Power Systems 3 Jan 01, 2011 11:34 PM
Discussion E-flite 30A ESC and general ESC-questions RubenFelix Power Systems 14 Nov 15, 2010 01:06 PM
For Sale E-Flite 30A Pro esc NEW 33 bucks...shipped. misplacedtexan Aircraft - Electric - Power Systems (FS/W) 3 Sep 21, 2010 06:17 PM
Found Looking for 2x NIB Turnigy 25A or 30A ESC's Garret H Aircraft - Electric - Power Systems (FS/W) 2 Sep 06, 2010 05:55 PM
Sold AXI 2217/16 and Jeti 30a ESC dashunde Aircraft - Electric - Power Systems (FS/W) 1 Sep 02, 2010 02:26 PM