Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.
Photo

ESC problem


  • Please log in to reply
7 replies to this topic

#1 EdwardS.

EdwardS.

    Member

  • Members
  • PipPip
  • 14 posts

Posted 02 October 2011 - 09:31 PM

Hi

I have an ESC (Mystery30A BEC Brushless Speed Controller) which does not do a thing. Does not even make beep :(

I don't have any experience with an ESC and perhaps you can help.

the specs of the ESC:Spec.
Amprating: 30A BurstRate (10sec):40A BECOutput : 5.0V/ 3A
Voltage: 7.4-11.1V(2-3 cell Lipo/5-10 NiCd)
Dimensions: 43x23x6mm
Weight: 25g

MainFunctions:
Safetymode: themotor wont start no matter what the position of the control stick iswhen switch on the RC unit. Brakesetting: On/Off(factory default is off)
Lowcurrent protection: Ignore/Reducepower/Shut off Temperatureprotection: Reducepower when temperature reaches 120C PWMfrequency: 8Khz/16Khz Threepoint battery type and low voltage selection.
Softwarereversion of motor turning selection.e



The code I used is based on Chris Seto's http://forums.netdui...driver/">driver

I connected the orange wire from the BEC to D5.


I know I have to calibrate the ESC first. I tried to do this with an range of 0..255.

The steps to calibrate are: power off, netduino on, throttle to 100%, connect power, wait 2s for 2 beeps, throttle to 0% wait for beep.

Problem: it does not beep at all.

Q1 Is it possible to connect the esc to net power supply? I connected it to a net power supply and set on 11.1V to mimick a lipo. max A is 2. The brown and red wires from the bec provides 5.1V.



  // simplified

  esc = new PWM((Cpu.Pin)pin);

  // to the max:
  esc.SetPulse(20000, 255);

  // to the min:
  esc.SetPulse(20000, 0);


The manual states:
PWM frequency: 8Khz/16Khz with a setup default of 8kHz.


Q2. is the period in the SetPulse correct? Should this not be 1/8000 ? >> 0.125 * 1000 * 1000 >> esc.SetPulse(125000, 255);

Anyway, I hope you can help!

#2 Stefan W.

Stefan W.

    Advanced Member

  • Members
  • PipPipPip
  • 153 posts

Posted 02 October 2011 - 10:19 PM

It would be helpful to see a schematic of your wiring. And your PWM code is wrong.
Both arguments of the PWM.SetPulse are in µs, first argument is period, second argument is "on" time.
8khz -> period = 1 / 8000 s = 0.000125 s = 125µs
// full:
esc.SetPulse(125, 125);
// off:
esc.SetPulse(125, 0);

I believe that no discovery of fact, however trivial, can be wholly useless to the race, and that no trumpeting of falsehood, however virtuous in intent, can be anything but vicious.
-- H.L. Mencken, "What I Believe"

#3 EdwardS.

EdwardS.

    Member

  • Members
  • PipPip
  • 14 posts

Posted 03 October 2011 - 09:44 AM

I thought it was nano seconds. Thanks, I changed it but still nothing.

#4 SamL

SamL

    New Member

  • Members
  • Pip
  • 1 posts

Posted 16 October 2011 - 05:46 AM

Hi

I have an ESC (Mystery30A BEC Brushless Speed Controller) which does not do a thing. Does not even make beep :(

I don't have any experience with an ESC and perhaps you can help.


Interfacing microcontrollers with RC stuff is wierd - they are two different worlds. The RC people have their own terminology & standards.

The PWM frequency you quote is the output PWM frequency going to the motor.

RC control signals are based on a 50Hz frequency (20ms period), where the pulse duration ranges from 1ms to 2ms.

So, you would use code like this to drive it:
/// <param name="val">Percentage to drive a servo (-100 to +100)</param>
void SetRCSignal(int val)
{
    if (val >= -100 && val <= 100)
        pwm.SetPulse(20000, 1500+(val*5));
}

Call SetRCSignal(0) to send a neutral position, and negative values to go backwards.

#5 Chris Seto

Chris Seto

    Advanced Member

  • Members
  • PipPipPip
  • 405 posts

Posted 16 October 2011 - 03:21 PM

The code I have should work perfectly out of the box, but you do need to adjust timings so that the ESC arms properly. There should be an adjust in that code where you can say how long to wait to allow it to arm, but that still doesn't explain why it didn't do anything when you calibrated it. Did you hook up both ground and Vsig?

#6 Joel Kunze

Joel Kunze

    New Member

  • Members
  • Pip
  • 8 posts

Posted 16 October 2011 - 04:13 PM

Do you have the ESC connected to a motor? It won't beep without the motor because the motor is used as the transducer/speaker for the beep.

#7 EdwardS.

EdwardS.

    Member

  • Members
  • PipPip
  • 14 posts

Posted 16 October 2011 - 08:00 PM

SOLVED!

The reasons why it did not worked where:


- The last timing setting was totally wrong. Originally I used Chris S. timingsand code (which I stripped because I don't have reverse) this was changed because it did not seemed to work. There was nothing wrong with this timing after all as SamL explained correctly.


- The ground of the BEC was not connected. Somewhere I've read that it was not necessarybut that probably is only when your netduino and the esc has the same power supply. I thought it worked because I heard sometimes something (it was torandom). Chris question about hooking up the ground made me question this again.



After changing my ESC for another one (HiModel, FLY-30A-pro +program card), implementing Sam's code and connected the ground of the bec to the netduino it worked immediately.. A big smile on my face was the result :) a potentio meter connected to the netduino controls the motor speed very nicely.

I don't need Sam's range (1000 to 1500 and 1500 to 2000) because of the one way speed I changed the code back to the mapping code from Chris S (1000 to2000us). I do like his code because of the model encapsulation. I did remove the 'Step the wave up/down' routine though because the new esc seems to handleit smoothly.

Of course after this success I wanted to see if the Mystery30A did work too.Yes it did but not always. It shakes and it stutters most of the time. This is probably because of a wrong timing setting. One day I'll buy the program card for this fellow and solve this one too


Thanks all !!

#8 Chris Seto

Chris Seto

    Advanced Member

  • Members
  • PipPipPip
  • 405 posts

Posted 17 October 2011 - 02:40 AM

The ESC code that you have from me was/is quite old. Most airplane ESCs don't require the signal to be ramped, but it was a required feature for the RC car ESCs I was dealing with at the time.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.