go away spammer

Author Topic: Help with programming and using esc's, without a radio.  (Read 5221 times)

0 Members and 1 Guest are viewing this topic.

Offline Daniel ClarkeTopic starter

  • Jr. Member
  • **
  • Posts: 7
  • Helpful? 0
Help with programming and using esc's, without a radio.
« on: November 26, 2008, 06:09:04 AM »
I just received 4 brushless motors and 4 matching esc's off ebay. I couldn't find a post that prohibits posting ebay links, so here is what I got, for reference:

http://cgi.ebay.com.au/3000-Helicopter-Outrunner-Brushless-RC-Motor-30A-ESC-y_W0QQitemZ260320346999QQcmdZViewItemQQptZUK_ToysGames_RadioControlled_JN?hash=item260320346999&_trksid=p3286.m63.l1177

1.
How do I set up this esc the way that I want without using a radio? I have looked on these forums for quad copter posts, but I couldn't find a guide on how to do this. Perhaps they didn't use rc esc's? I'm assuming that the esc is programmed by giving the user beeps to which the user must respond, with a long pulse width pwm? If this is the case I can write some basic push button code to output the required pwm. (I'm using an stk500 and atmega168's by the way). What pulse width should I out put for selection?

2.
The esc has two pwm frequencies to choose from, 8kHz and 16kHz. I have scaled the pwm by 64, effectively reducing it from 8MHz (3. Do you set a fuse when programming to choose frequency? The chip is rated for 0-10MHz) to 12.5kHz. Can I select the 16kHz frequency for this to work, since the esc will have a higher sampling frequency than the pwm? Or do they need to be the same?

4.
The next question is basic but important. The esc has 5 input wires, two are thick with one red and one black which I'm quite certain are obviously for powering the motor. There are 3 other 'logic' input wires which are red black and white. I'm assuming the red/black are power/ground. The esc has written on it "BEC 2A/5V", so the esc chip runs off DC 5V 2A? By process of elimination the white one must be my pwm channel?

5.
Then there are three blue output wires to power the motor. The motor has 3 input wires, red, black and yellow. The output wires from the esc are labeled R, B, C. Am I right in thinking that these are colour co-ordinated, ie, Red, Black, Colour (or in my case yellow)?


***EDIT***

I got it to work! The "power supply" I was using is the power pack I use to power my stk500. I scavenged the one that powers our router and measured a 16V output contrary to its labeled 12V. If anybody is having trouble getting pwm to work with a stock esc you need to generate 50Hz waves. My esc (Mystery 30A) samples the pulse width on start up and sets that to the minimum width. So make sure you have with a thin width when you turn on the motor. My esc also has a range of widths it can sample: 4% was 'on', above that the motor spins. At the moment I can get it up to around 8% before the motor trips (the power supply says 1A, but it also says 12V), so I do not know the maximum width yet. Programming for the esc can be found here: http://www.rcgroups.com/forums/attachment.php?attachmentid=1132098. While I am yet to confirm this is the actual program card (I got a completely different and wrong one with the esc), it is the only one I have found that matches the programming tones.

Thanks for the help ArcMan and madchimp.

« Last Edit: November 30, 2008, 02:06:44 AM by Daniel Clarke »

Offline ArcMan

  • Supreme Robot
  • *****
  • Posts: 519
  • Helpful? 4
  • Mmmm... Plasma
Re: Help with programming and using esc's, without a radio.
« Reply #1 on: November 26, 2008, 09:53:45 AM »
4.
The next question is basic but important. The esc has 5 input wires, two are thick with one red and one black which I'm quite certain are obviously for powering the motor. There are 3 other 'logic' input wires which are red black and white. I'm assuming the red/black are power/ground. The esc has written on it "BEC 2A/5V", so the esc chip runs off DC 5V 2A? By process of elimination the white one must be my pwm channel?

Can't help you with most of this, but from my R/C experience I know that BEC stands for "Battery Eliminator Circuit".  It means that the drive will supply DC 5V @ 2A to run your receiver, small servos, etc. on the red and black wires.  The white wire is indeed for the R/C pulse channel.

Offline Daniel ClarkeTopic starter

  • Jr. Member
  • **
  • Posts: 7
  • Helpful? 0
Re: Help with programming and using esc's, without a radio.
« Reply #2 on: November 26, 2008, 03:43:30 PM »
Tried searching the forums some more and found this: http://www.societyofrobots.com/robotforum/index.php?topic=2641.0 The 13th post pretty much answers number 1. And thanks to arc man, I've got 4. answered.

Offline madchimp

  • Robot Overlord
  • ****
  • Posts: 158
  • Helpful? 2
Re: Help with programming and using esc's, without a radio.
« Reply #3 on: November 27, 2008, 04:07:42 AM »
Quote
2.
The esc has two pwm frequencies to choose from, 8kHz and 16kHz. I have scaled the pwm by 64, effectively reducing it from 8MHz (3. Do you set a fuse when programming to choose frequency? The chip is rated for 0-10MHz) to 12.5kHz. Can I select the 16kHz frequency for this to work, since the esc will have a higher sampling frequency than the pwm? Or do they need to be the same?

If you are asking what pwm frequencies to send the esc from the mcu, I believe you treat it just like a servo after all that's how the receiver in an R/C setup would see it. Instead of an arm moving x number of degrees as with a servo you are setting the speed at which the esc drives the motor. You should be able to run the mcu at any of its rated frequencies.

Quote
4.
The next question is basic but important. The esc has 5 input wires, two are thick with one red and one black which I'm quite certain are obviously for powering the motor. There are 3 other 'logic' input wires which are red black and white. I'm assuming the red/black are power/ground. The esc has written on it "BEC 2A/5V", so the esc chip runs off DC 5V 2A? By process of elimination the white one must be my pwm channel?

ArcMan covered this pretty well but I would like to add a little. The two thick input wires in an R/C setup would normally go straight to the battery which you may or may not want to do being you might want some sort of kill switch to cut power to the esc. The three smaller wires are as Arcman said white is signal, red is power and black is ground. You probably wouldn't want to hook the red wires back to your controller board but the signal and ground are obviously needed. The red wire coming from each esc is basically a regulated 5v supply.


Offline ArcMan

  • Supreme Robot
  • *****
  • Posts: 519
  • Helpful? 4
  • Mmmm... Plasma
Re: Help with programming and using esc's, without a radio.
« Reply #4 on: November 27, 2008, 10:41:29 AM »
I would like to throw in 2 more cents worth.  Others' experience may vary, but you should definitely buy a radio.  For me, it's an indespensible tool for robotics, even if your final robot will not be radio controlled.  It allows you to quickly whip up tests, etc.


Offline Daniel ClarkeTopic starter

  • Jr. Member
  • **
  • Posts: 7
  • Helpful? 0
Re: Help with programming and using esc's, without a radio.
« Reply #5 on: November 27, 2008, 03:14:49 PM »
I do have a radio, alas it's only two channel. But I could use it for setting up the esc's one by one.

Offline ArcMan

  • Supreme Robot
  • *****
  • Posts: 519
  • Helpful? 4
  • Mmmm... Plasma
Re: Help with programming and using esc's, without a radio.
« Reply #6 on: November 27, 2008, 08:10:56 PM »
I just have 2-channel radios as well.  Consider yourself lucky!  You now have an excuse to buy a new radio.

(I'm married so I always have to have an excuse.)

Offline Daniel ClarkeTopic starter

  • Jr. Member
  • **
  • Posts: 7
  • Helpful? 0
Re: Help with programming and using esc's, without a radio.
« Reply #7 on: November 29, 2008, 12:37:09 AM »
I hooked up one of the motors through an esc to the receiver in my 'car'. I haven't tried to use a brushless motor before, and I've spent quite a bit of time on rc groups trying to work out how to use one. I can get it to make beeping noises, but I can't get it to spin. I've also been able to control a servo using pwm, but, the motor gives no response.

EDIT

I discovered why I couldn't drive the motors with the radio: The "power supply" I was using is limited to 1A, so the motor tried to spin, drew too much current and tripped. So I guess I'll put a real power supply on my list.
« Last Edit: November 29, 2008, 08:54:32 PM by Daniel Clarke »

 


Get Your Ad Here

data_list