civic
Posts: 2
Joined: Sat Feb 22, 2014 11:05 pm

How to reverse a motor direction through ESC

Sat Feb 22, 2014 11:24 pm

Hi,

I am using PIGPIO http://abyz.co.uk/rpi/pigpio/ library to control a brushless motor (1/16) with ESC (25A).
I am successful getting the motor to run in one direction with the help of soft PWM signal.

The problem is, I am not sure how to reverse the direction of motor. I don't want to exchange the wires externally. But I want it to reverse its direction by sending a signal.

Is there a way I can send a signal to ESC from Raspbeery Pi to achieve this. (According to manual : My ESC has the capability to reverse. It does not say anything about how to do it.)

Thanks,
Kind Regards.
.

kweenie
Posts: 29
Joined: Mon Dec 23, 2013 4:00 pm

Re: How to reverse a motor direction through ESC

Mon Feb 24, 2014 6:46 pm

it seems there are many different ways to do what you want.
the best way seems to do some reading on H-bridge devices.
i understand very little of electronics but the internet tells all :)
i ordered a Hbridge device and will start some experimenting in march , when i have that working i will let you know .

User avatar
joan
Posts: 14935
Joined: Thu Jul 05, 2012 5:09 pm
Location: UK

Re: How to reverse a motor direction through ESC

Mon Feb 24, 2014 7:24 pm

Do you have a link to the specs of your ESC or the model number?

civic
Posts: 2
Joined: Sat Feb 22, 2014 11:05 pm

Re: How to reverse a motor direction through ESC

Sat Mar 01, 2014 3:42 pm

@kweenie :) thanks a lot. OK I will have a read through H-bridge devices, and If I find something, will let you know and waiting to hear from you.

@ joan, I do not have a link to ESC as such, but I know few spec as below,
Motor: 4800KV Brushless Inrunner (2040)
ESC: 25A Brushless (with Reverse)

It comes with buggy and the link to it,
http://www.hobbyking.com/hobbyking/stor ... ystem.html

If you need more info, I can speak to the customer service there and get the spec of you.

Thanks and Regards

User avatar
GTR2Fan
Posts: 1601
Joined: Sun Feb 23, 2014 9:20 pm
Location: South East UK

Re: How to reverse a motor direction through ESC

Sat Mar 01, 2014 4:04 pm

If ESCs still work on the same principal as when I built mine to run from a standard 27MHz Futaba RC receiver over 20 years ago, it's all in the mark-space ratio with equivalent servo positions of fully ccw=full speed reverse, fully cw=full speed forward, and centre=stop.

Image
Pi2B Mini-PC/Media Centre: ARM=1GHz (+3), Core=500MHz, v3d=500MHz, h264=333MHz, RAM=DDR2-1200 (+6/+4/+4+schmoo). Sandisk Ultra HC-I 32GB microSD card on '50=100' OCed slot (42MB/s read) running Raspbian/KODI16, Seagate 3.5" 1.5TB HDD mass storage.

User avatar
joan
Posts: 14935
Joined: Thu Jul 05, 2012 5:09 pm
Location: UK

Re: How to reverse a motor direction through ESC

Sat Mar 01, 2014 4:15 pm

civic wrote: ...
@ joan, I do not have a link to ESC as such, but I know few spec as below,
Motor: 4800KV Brushless Inrunner (2040)
ESC: 25A Brushless (with Reverse)

It comes with buggy and the link to it,
http://www.hobbyking.com/hobbyking/stor ... ystem.html
...
Try sending different pulse rates from the command line.

sudo pigpiod # start the daemon

pigs servo n 1500 # mid-point

pigs servo n 1000 # counter clockwise?

pigs servo n 2000 # clockwise?

where n is the Broadcom gpio number attached to the servo.

I've seen a similar query. ESCs seem to require a set sequence to reverse direction (safety reasons). Trouble is I think the sequence required varies with model.

Return to “General programming discussion”