controlling ESC with ATmega16

jrm

Joined Oct 11, 2011
38
Another thing to consider... If the speed control cannot be configured for reverse throttle, low throttle will bcome OCR0 = 0 instead of 7. You will need to change that in the 5 second init. Try the 5 second init and then take it to full throttle and back down to zero. If it doesn't initialize then, you are just going to have to isolate as much as possible and figure out one problem at a time. The code he gave you should work fine but you are just going to have to play around with the pulse stream to get the ESC initialized. I still think you would be well served to plug a servo in instead of trying to kill all the birds at one time. These things are unforgiving and can be very frustrating.
You arent trying to power the esc from the AVR pins are you? Run an led or piezo on a spare pin to see if your avr is browning out.
Like Hspalm said, a scope is going to do more for you here than you can imagine. Even one of the free sound card based scopes will at least let you see the timing. (Be careful with those things though, they can fry your sound card easily. There are lots of schematics on the net to show you how to make probes with some protection)
 

Thread Starter

kripanand

Joined Mar 15, 2012
13
okk let me try pulses with led ...I will tell you tomorrow...as my workshop is off now ..and many thnx for your suggestions jrm :)
 

Thread Starter

kripanand

Joined Mar 15, 2012
13
Okk..... I tried with whole day and night.. with my sir ..

and I think there is a still problem with pwm generation require for the motion of bldc...

can you provide any simplest code for this iff possible ...
 
Top