Hi guys,
I want to control Brushless motor via ESC I have, I decided to Servo library which can works with motors as well. But no success, well I do no know where is the problem because my ESC doesn't want to arm. So I just cannot identify is it ESC issue or PWM code issues or Servo library can't work on Maple (STM32) without modifications. Any ideas how can I attack the issue?
Tried to use library to control ESC with no success
(9 posts) (4 voices)-
Posted 2 years ago #
-
Measure the output with a scope or logic analyzer.
If you do not have the devices, connect the output to an input of your maple, and write a very simple logic analyzer by yourself. Just check the input for edge changes, store the time by reading micros() and print out the high and low duration of the pulse.
An ESC needs a 1-2ms high pulse and works at 50Hz. Some work up to 400Hz, but start at the low frequency. Depending on the ESC it typically starts the motor around 1.1-1.2ms high time.
An ESC getting no valid pulses usually 'beeps' the motor.
Do not mount a propeller or anything else cutting flesh on the motor while testing and do not use more than a 1.4ms high pulse, as a motor without load spins too fast and can damage the bearings.Posted 2 years ago # -
Try:
Servo.write(30);
Where Servo is the instance of the Servo library. I remember having trouble a couple of years back into getting ESCs to initialise, but increasing the value being 'written' to the ESC made it initialise. Sometimes the ESC if not initialised will not initialise after a while until power has been reset, this will depend on your ESC.
Also ala42's advise about using a motor with no prop or other load is good advice. I used to use a motor with no shaft when doing certain testing.
Posted 2 years ago # -
xchg.ca - Have you tested you ESC with an RC receiver? Did it work okay? Was it easy to 'arm'?
Are you using a 5V signal (or more) to drive the ESC signal pin or 3.3V?
If you are using 3.3V, are you confident that your ESC works with 3.3V.How are you trying to 'arm' the ESC?
I'd try a very 'dumb' program with, say, an analogue input from a potentiometer setting the servo 'angle' so that you can simulate an RC rig. I've seen someone failing to 'arm' the ESC using RC, and it took several minutes of practice for them to get it, so it may be a similar problem with the Maple code.Posted 2 years ago # -
Oh guys, I think I messed up, I suspect my board is in perpetual bootloader mode. LED keeps blinking no matter what I do (but I can upload programs)
So all my tries with ESC control were futile, just because nothing was running at first place, I just didn't realized that :) But thank you for advises, Now I have to figure out what is wrong...
PS. This post explains what I've done to my hardware and what exactly is going on. - http://forums.leaflabs.com/topic.php?id=2643
PPS. ESC taken from working quadcopter, so that is covered! 3.3 Can totally be an issue! So this has to be iether checked experimentally or I don't even know... But I believe there are many STM32 base flight controllers and I don't remember anyone mention that ESC wont work with them.
Posted 2 years ago # -
I have never heard of an ESC that has problems with the outputs of a STM32 CPU running at 3.3V. As I developed the AeroQuad32 flight controller having a STM32F4 CPU, I would have heard about such problems. Also never heard about such problems on the cheap STM32F1 FreeFlight boards and its clones.
Posted 2 years ago # -
ala42, AeroQuad 32 look like great FC! Expensive though....
Anyways, now I have to figure out how can I start my user code and exit perpetual boot mode in my board.
Posted 2 years ago # -
Well, the Canadian manufacturer does not build and test the boards for nothing. For the price you have to pay for a single SPI MPU6000 chip in a 100 quantity you get two I2C MPU6050 boards on ebay, including shipment.
You can get a ATMega2560 flight controller board having almost the same sensors the AQ32 has for $57 from rctimer. You can not beat these prices without producing larger quantities in China and hoping they do not sent you a bunch of dead boards. That is nothing the part time AQ shop can dare.
Compared to the previous Arduino board/shield and overpriced SparkFun sensor boards the AQ32 is still cheap, 10 times faster, having better sensors and more of everything but size and weight.
If you want to have this performance cheap you have to get a $15 Discovery F4 or $25 FEZ Cerb40, a $40 10DOF board and wire your own shield for the ESC and receiver connectors.
The Cerb40 might be interesting for you, see http://www.ghielectronics.com/catalog/product/353Posted 2 years ago # -
ala42, great to know it produced in Canada, proud of it now ! :)
Already have that Discovery board, will be tinkering with it, I love tinkering :)
AQ board looks very professional and future full. I like it alot :) But I still have my QC grounded just because I can't make multiwii properly tuned, which probably not MW fault, my frame and setup are crappy....Posted 2 years ago #
Reply
You must log in to post.