ESC woes

I’m controlling an ESC using PWM which is mostly working except it tends to get stuck at full throttle occasionally… The ESC has a battery elimination circuit (BEC) so I only have the ground and PWM wires going into the input for the ESC since there is voltage coming out of the red wire on the control plug. This I learned when my Panda turned on the first time I plugged into the control cable and surprisingly didn’t toast anything.

I’m guessing the throttle sticking is something electrical and not code based because when it happens even the switch on the ESC doesn’t work, I have to unplug the battery to get it to stop. I’m further guessing it is because there are two grounds in play and an ESC with a BEC will probably not have any isolation to protect against that. Can anyone provide some details of how they have their ESC hooked up especially if it has the BEC “feature”?

GND -> GND on everything
BEC output -> Vin OR if it’s 5V regulated, 5V header
PWM -> A PWM port.

Are you using my library to control the ESC or are you trying to control the ESC by changing the duty cycle? You need to specifically define the period and duration.

I’m using your library - I would rather not power the Fez from the same battery as the ESC so that I can maintain guidance control and radio beacons once the juice for the motor is all gone which tends to happen pretty quickly.

I also wouldn’t recommend using the same battery as the ESC, unless you have a filtering board in between the FEZ and battery.

Additionally, power from an ESC is rarely 5v, it’s usually 5.3-5.6v, and sometimes as high as 6.5v :slight_smile: This can make a lot of 5v devices very unhappy.

Yeah, the FEZ will not play nice being connected right to the same powrer as the ESC. In fact, on some FEZ, there is an MCP130 which pulls RESET# low to reset in the event of unclean power.

Can you put the FEZ and ESC on separate power domains to test?

That is my original setup is that I am using two different power sources and I have the issue with the ESC sticking in the on position where even the off/on switch fails working (and unplugging the Fez doesn’t work either)… Only unplugging the ESC battery stops it.

What esc is this? Can you verify the signal is correct by oscope?

Not sure I would know exactly what to look for - I was hoping to just learn how others were wiring theirs up. Sounds like you have been using a single power source for everything thus far?

If I were to put two voltage source into the vin on a fez (in parallel) would that effectively use both while the ESC had power and then use the backup once the ESC was empty?

I wire my FEZ up to a SMPS which is hooked up to seperate power from a Lipo battery. Both the ESC and the FEZ are grounded together.

Electricity doesn’t quite work that way… It depends a lot of the power supplies used. I would suggest that you power the logic off a small lipo battery. Just remember to use a voltage monitor to make sure you don’t drain it too far.

What ESC model are you using?

As for what you’d be looking for in the signal, you’d want a 20ms total time (including a 1-2ms high pulse at the end).

Also, have you calibrated the ESC?

Sounds like your ESC doesn’t have a BEC on it which is another avenue I’m considering - just getting a different one. The package says “Dart Racing, Air 20A ESC with BEC”.

Not sure what you mean by calibrating, but I was changing around the range values to be closer than the default 1000 and 2000 in your speed controller class. Mine has a much smaller range, somewhere in the neighborhood of 1400-1800. It does successfully vary motor speed when I am adjusting the throttle but eventually just sticks and won’t turn off.

All my ESCs have BECs, I just choose not to use them. There is nothing wrong with simply leaving that pin floating.

Went and got a different ESC (Wattage IC-550, $25), works famously with all the default settings. I have the power pin unconnected in the ESC connector with a separate batteries for the Fez and the motor/ESC.

Glad to hear it’s working. If I had to guess, I’d say the other esc is defective.