View previous topic :: View next topic |
Author |
Message |
Ruby
Joined: 04 Jul 2014 Posts: 44
|
Simonk ESC & PWM |
Posted: Fri Nov 14, 2014 10:49 am |
|
|
Hi everybody. I need help with pwm. I am using 16f877a. If I am not wrong I need 50hz for esc. |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19520
|
|
Posted: Fri Nov 14, 2014 11:36 am |
|
|
Look in the code library for _servo_ code.
ESC's use the same data format as servos (they are driven by radio controls commonly). |
|
|
Ruby
Joined: 04 Jul 2014 Posts: 44
|
|
Posted: Fri Nov 14, 2014 11:39 am |
|
|
Thanks for reply. What you mean with look in library? |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19520
|
|
Posted: Fri Nov 14, 2014 11:46 am |
|
|
Haven't you actually _looked_ at the layout of this forum?.
It has three sections:
'General CCS Discussion'
'Code Library'
'CCS ICD/Mach X/Load-n-go'
The 'code library' contains hundred (thousands?), of sections of code to help. There are at least three examples there, of code to drive various numbers of servos. |
|
|
Ruby
Joined: 04 Jul 2014 Posts: 44
|
|
Posted: Fri Nov 14, 2014 11:49 am |
|
|
Ok but if I can't find there what I am looking for how can I move the post? |
|
|
temtronic
Joined: 01 Jul 2010 Posts: 9229 Location: Greensville,Ontario
|
|
Posted: Fri Nov 14, 2014 12:09 pm |
|
|
near top of this screen is a button called 'search',click on it and use RS servo or ESC servo', selct 'and' wait a bit...you'll get 300+ hits. It's up to you to scan,read,select which has the code that is applicable.
Presumably ESC means Electronic Speed Control... and yes, refresh rate will be 50Hz UNLESS it's the newer 'digital' RC servos.
hth
jay |
|
|
Ruby
Joined: 04 Jul 2014 Posts: 44
|
|
|
asmboy
Joined: 20 Nov 2007 Posts: 2128 Location: albany ny
|
|
Posted: Fri Nov 14, 2014 12:50 pm |
|
|
Have you started to write the code you need? |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19520
|
|
Posted: Fri Nov 14, 2014 1:10 pm |
|
|
These will accept the 400Hz digital servo signals, (as well as the old 50Hz standard). |
|
|
Ruby
Joined: 04 Jul 2014 Posts: 44
|
|
Posted: Fri Nov 14, 2014 1:14 pm |
|
|
How do you know? I couldn't find any datasheet of them? 400 better right? |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19520
|
|
Posted: Fri Nov 14, 2014 1:26 pm |
|
|
The 'Simonk' in the description, is the firmware in the ESC's. He wrote an improved version to give faster refresh for things like multi-copters, where being able to change the speed more quickly helped give the fine control required.
It'll still accept the slower refresh, if needed.
Whether it is 'better', depends on what you are doing. For things that need very rapidly adjusted speeds, yes, better. However it means that the code feeding it must be very careful to not give incorrect values, since these result in high current spikes, and rough output.
Realistically, you'd get much better response, by switching to one of the more modern PIC's with hardware PWM's that can go to this sort of frequency (some of the motor control ones). Simpler, and easier to update the speeds accurately. |
|
|
|