HobbyKing.com New Products Flash Sale
Reply
Thread Tools
Old Dec 21, 2010, 01:07 PM
Registered User
Joined Dec 2010
13 Posts
Discussion
ESC PWM Control Help

Hi guys,

So i got all of my esc's and motors in today, but im having a problem. The ESC Im using is the Mystery 40A with built in BEC. The BEC has 3 wires (brown, orange and red). The red one is the 5,5v BEC output. I disabled that as I dont need it.

The orange one has 4,9v, i thought the brown wire was earth. However when I hook up the orange one to my Microcontrollers PWM output (and set a voltage on there), nothing happens. So which one is the correct wire? And if brown is the throttle cable, then why has the orange one got 4,9v on it?

Also I havent heard a Beep or whatever coming from the ESC. What have I done wrong?
Julian90 is offline Find More Posts by Julian90
Last edited by Julian90; Dec 21, 2010 at 01:25 PM.
Reply With Quote
Sign up now
to remove ads between posts
Old Dec 21, 2010, 04:10 PM
Registered User
Joined Dec 2010
13 Posts
I read somewhere that the PWM frequency needs to be about 50hz. is this correct? It wont start up otherwise? (no sounds etc)
Julian90 is offline Find More Posts by Julian90
Reply With Quote
Old Dec 21, 2010, 04:19 PM
Registered User
VA
Joined Nov 2009
2,658 Posts
Middle wire should be 5v. It would be up to the person who soldered it as to what the outside two are connected to. When I use the brown,red,orange ribbon wire, brown is ground and orange is signal with red 5v in middle. You will read a voltage on your meter if you go between signal and ground. The meter will average the PWM signal and give you a voltage reading. The higher the duty cycle (pulse on longer) the higher the voltage reading.
pug398 is offline Find More Posts by pug398
Reply With Quote
Old Dec 21, 2010, 04:33 PM
Registered User
Joined Dec 2010
13 Posts
Thanks for your response pug398,

When deciding on which wires to connect i used the same logic as you did. But the weird thing is the orange wire has 4,9v on it from the ESC aswel. Does this mean the pwm signal works by pulling it lower? I cant wrap my head around this one.

Also, the mystery guide says the PWM signal is either 8khz or 16khz, should i create a 8khz pwm signal then? Or 50hz like i read elsewhere? i really dont know where to go on this.
Julian90 is offline Find More Posts by Julian90
Reply With Quote
Old Dec 21, 2010, 05:45 PM
Registered User
VA
Joined Nov 2009
2,658 Posts
If you are talking about a factory built esc then the signal wire is an input and yes it is at a high level when measured with a high impedance meter with no drive signal. The input signal can be way higher than 50 Hz and if it is controlling a brushless motor can be up to high as 400 Hz. Driving a standard analog servo it would need to be low hertz. Driving digital servo can be higher. You will not hear a beep (motor tone) unless a motor is connected.
pug398 is offline Find More Posts by pug398
Reply With Quote
Old Dec 21, 2010, 05:50 PM
Registered User
Joined Dec 2010
13 Posts
The ESC is a Mystery 40A SBEC.

I have connected the motor (A Hobbyking NTM 35a, 910kv brushless dc). I have tried ranging the PWM output that was connected to the control signal (the orange one thats on high) from 0v to 3v (which should be just more then 60% duty cycle).

Ive tried HZ between 38 and 400hz still nothing. Any suggestions?

I heard a short beep coming from the ESC and the motor spinning for like half a second once but not been able to replicate, pretty strange.
Julian90 is offline Find More Posts by Julian90
Reply With Quote
Old Dec 21, 2010, 06:05 PM
Registered User
VA
Joined Nov 2009
2,658 Posts
A servo or esc control signal does not change amplitude for control. It is at either 0v or 4-6v depending on circuit. The pulse goes positive ever 20ms (for 50 hz) and should stay positive for at least 1ms. This would be a low or off signal condition. Keeping the pulse rate (frame rate) the same, the pulse width is then increased up to 2ms (for full on or high). In other words you are modulating the pulse width to set the amount of drive. You could use a 555 timer chip to simulate a servo controller signal or else you will need to program a microcontroller. Hope this helps.
pug398 is offline Find More Posts by pug398
Reply With Quote
Old Dec 22, 2010, 02:02 AM
That tree again!!!!
thanhTran's Avatar
Germantown, MD, US
Joined Sep 2004
6,642 Posts
The ESC needs the PWM pulses in the range between ~1ms - 2ms to work. When it's out of this range, it might not work. Also the pulses have to be at 1ms or less for some time (couple seconds) when you have power on the ESC before it arms itself. Only after arming is done, the ESC can start running based on the PWM pulses you put in (still has to be between 1ms - 2ms).

Thanh
thanhTran is offline Find More Posts by thanhTran
Reply With Quote
Old Dec 22, 2010, 05:20 AM
Registered User
Joined Dec 2010
13 Posts
Okay, Anybody know where I can do the calculations to get the correct AVR timer settings for 1-2ms? Im using a Pololu SVP 1284 (Atmega 1248p)
Julian90 is offline Find More Posts by Julian90
Reply With Quote
Old Dec 23, 2010, 01:37 PM
Registered User
Joined Dec 2010
13 Posts
bump
Julian90 is offline Find More Posts by Julian90
Reply With Quote
Old Dec 23, 2010, 07:22 PM
Registered User
Aveiro, Portugal
Joined Dec 2010
232 Posts
You need to generate a signal of 50Hz, and then vary the duty cycle, if you go read the source code from all those open source Multi-copters you can see how its done, or you can go to the avrfreaks.net forum which is the official Atmel forum for the Avr chips and do a search about pwm+servo or servo+control, even google will give you good results.
I'm saying you to go to search not because I'm a mean person, but reading 2 or 3 topics ans pages/blogs about this will teach you a lot about the timers.
Some links so you dont have to do the search:
http://smrobots.com/node/22
http://winavr.scienceprog.com/exampl...using-avr.html
http://blog.makezine.com/archive/200...o_control.html
http://extremeelectronics.co.in/avr-...crocontroller/
senso is offline Find More Posts by senso
Reply With Quote
Old Dec 24, 2010, 09:25 AM
Registered User
Kevo500's Avatar
Suffolk County NY , USA
Joined Mar 2009
521 Posts
Quote:
Originally Posted by Julian90 View Post
Also I havent heard a Beep or whatever coming from the ESC. What have I done wrong?
While it may not be helpful to your current problem .. Just wanted to note that the beeps you hear actually come from the motor , not the esc itself.

The esc uses the motor as its "speaker" when beeping.

Just wanted to bring that up .. in case you were listening for beeps whithout a motor attached.
Kevo500 is offline Find More Posts by Kevo500
Reply With Quote
Old Dec 25, 2010, 05:21 AM
Registered User
Joined Dec 2010
13 Posts
Thanks for your replies, first of all Senso, I really didnt know what to search for really.. Did lots of searches on PWM control, Timer HZ etc etc. Didnt really pan out.. Thanks for the keywords and the urls.

Thanks kevo, I did think the sounds came from the ESC, however i still had a motor attached so. This is good to know tho

I will have a go at this, i'll let you know
Julian90 is offline Find More Posts by Julian90
Reply With Quote
Old Dec 25, 2010, 05:24 AM
Registered User
Joined Dec 2010
13 Posts
The problem creating a 50hz PWM frequency was the fact that with the Pololu SVP 1284, I can use timers 0 and 2 (both 8 bit timers), but according to the registries, they dont have a manual 'top' function on ICR, i tried anyway. This got me kinda confused on what to do. Ill have a go later on
Julian90 is offline Find More Posts by Julian90
Reply With Quote
Reply


Thread Tools

Similar Threads
Category Thread Thread Starter Forum Replies Last Post
Build Log Converting TowerPro 25A type 2 ESC's from PWM to TWI/I2C control Arthur P. DIY Electronics 1281 Feb 12, 2014 04:01 PM
Question PWM on 35 and Ice Lite 50 ESC Woody_99 Castle Creations 1 Nov 02, 2010 04:24 PM
Discussion help , need pwm ESC for fwd/rev brush electric car barb wire Car Talk 12 Jan 27, 2010 08:53 PM
Discussion Is it possible to convert TURNIGY Plush 30A ESC's from PWM to TWI/I2C control benbois DIY Electronics 0 Dec 17, 2008 11:56 AM
pwm for winch control? Lifter Thermal 8 Feb 07, 2003 07:10 AM