STD Tuning Engine Electronic variable vane control

Electronic variable vane control

Electronic variable vane control

 
  • 1 Vote(s) - 4 Average
 
Tymbrymi
Klatta Klatta

185
09-04-2009, 01:33 PM #68
(09-04-2009, 08:27 AM)winmutt I have some prototype code for the arduino. I spent a few hours last night researching and there is more I need to understand about the different types of PWM. The arduino is capable of the following frequencies :

If I'm reading the datasheet properly, those are the max frequencies when using those specific clock sources. Look at page 120 of the datasheet, and use "Fast PWM mode". You'll use the 16Mhz clock frequency divided by 8 as the clock source to the timer (TCCR1B = xxxxx010). This determines the frequency of the "ticks" (500ns). Since it is a 16-bit counter, you can have up to 65,535 ticks in the period. 7.1ms / 500ns = 14,200 ticks, which will give you the 140Hz frequency. Use the fast PWM mode where you put "top" in ICR1 (WGM13:0 = 14), and load the 14,200 into ICR1. In order to change the duty cycle you will load a number into OCR1x between 0 and 14,200. The percentage of 14,200 you enter will be the duty factor.

Did that make any sense? The datasheet is still pretty confusing to me...

John Robbins
'05 E320 CDI - 118k - Faaaaaast!! Angel
'87 300TD - 317k - Cracked head... but an OM606 is on the way! Undecided
'79 300SD - 295k - Bad engine = project car!
Tymbrymi
09-04-2009, 01:33 PM #68

(09-04-2009, 08:27 AM)winmutt I have some prototype code for the arduino. I spent a few hours last night researching and there is more I need to understand about the different types of PWM. The arduino is capable of the following frequencies :

If I'm reading the datasheet properly, those are the max frequencies when using those specific clock sources. Look at page 120 of the datasheet, and use "Fast PWM mode". You'll use the 16Mhz clock frequency divided by 8 as the clock source to the timer (TCCR1B = xxxxx010). This determines the frequency of the "ticks" (500ns). Since it is a 16-bit counter, you can have up to 65,535 ticks in the period. 7.1ms / 500ns = 14,200 ticks, which will give you the 140Hz frequency. Use the fast PWM mode where you put "top" in ICR1 (WGM13:0 = 14), and load the 14,200 into ICR1. In order to change the duty cycle you will load a number into OCR1x between 0 and 14,200. The percentage of 14,200 you enter will be the duty factor.

Did that make any sense? The datasheet is still pretty confusing to me...


John Robbins
'05 E320 CDI - 118k - Faaaaaast!! Angel
'87 300TD - 317k - Cracked head... but an OM606 is on the way! Undecided
'79 300SD - 295k - Bad engine = project car!

 
  • 1 Vote(s) - 4 Average

Messages In This Thread
Electronic variable vane control - by winmutt - 01-08-2009, 05:47 PM
RE: Electronic doodads - by winmutt - 01-08-2009, 06:13 PM
RE: Electronic doodads - by Gross Polluter - 01-09-2009, 02:22 AM
RE: Electronic doodads - by ForcedInduction - 01-09-2009, 04:03 AM
RE: Electronic doodads - by winmutt - 01-09-2009, 08:10 AM
RE: Electronic doodads - by winmutt - 01-09-2009, 09:11 AM
RE: Electronic doodads - by Gross Polluter - 01-09-2009, 09:41 AM
RE: Electronic doodads - by GREASY_BEAST - 01-09-2009, 10:54 AM
RE: Electronic doodads - by winmutt - 01-09-2009, 11:05 AM
RE: Electronic doodads - by GREASY_BEAST - 01-09-2009, 01:10 PM
RE: Electronic doodads - by winmutt - 01-09-2009, 02:55 PM
RE: Electronic doodads - by oel_brenner - 01-10-2009, 01:02 PM
RE: Electronic doodads - by GREASY_BEAST - 01-11-2009, 12:45 PM
RE: Electronic doodads - by tantank79 - 01-12-2009, 01:21 AM
RE: Electronic doodads - by Telecommbrkr - 01-11-2009, 10:37 PM
RE: Electronic doodads - by winmutt - 01-12-2009, 10:20 AM
RE: Electronic doodads - by ForcedInduction - 01-12-2009, 02:01 AM
RE: Electronic doodads - by oel_brenner - 01-12-2009, 07:56 PM
RE: Electronic doodads - by winmutt - 01-12-2009, 08:49 PM
RE: Electronic doodads - by oel_brenner - 01-12-2009, 09:03 PM
RE: Electronic doodads - by winmutt - 01-12-2009, 09:40 PM
RE: Electronic doodads - by GREASY_BEAST - 01-14-2009, 03:05 PM
RE: Electronic doodads - by oel_brenner - 01-14-2009, 11:41 PM
RE: Electronic doodads - by Gross Polluter - 01-15-2009, 01:57 AM
RE: Electronic doodads - by Tymbrymi - 01-30-2009, 01:54 PM
RE: Electronic doodads - by winmutt - 01-14-2009, 05:21 PM
RE: Electronic doodads - by winmutt - 01-15-2009, 10:06 AM
RE: Electronic doodads - by winmutt - 01-20-2009, 10:29 PM
RE: Electronic doodads - by winmutt - 01-20-2009, 11:16 PM
RE: Electronic doodads - by winmutt - 01-21-2009, 02:55 PM
RE: Electronic doodads - by cannonballSDL - 01-25-2009, 04:02 AM
RE: Electronic doodads - by winmutt - 01-26-2009, 10:37 AM
RE: Electronic doodads - by winmutt - 01-30-2009, 02:08 PM
RE: Electronic doodads - by Tymbrymi - 01-30-2009, 02:47 PM
RE: Electronic doodads - by ForcedInduction - 03-17-2009, 07:25 PM
RE: Electronic doodads - by Tymbrymi - 03-18-2009, 07:51 AM
RE: Electronic doodads - by ForcedInduction - 03-18-2009, 07:59 AM
RE: Electronic doodads - by GREASY_BEAST - 03-18-2009, 09:13 AM
RE: Electronic doodads - by Tymbrymi - 03-19-2009, 08:36 AM
RE: Electronic doodads - by GREASY_BEAST - 03-19-2009, 11:45 AM
RE: Electronic doodads - by GREASY_BEAST - 03-21-2009, 09:54 AM
RE: Electronic doodads - by Tymbrymi - 03-23-2009, 07:40 AM
RE: Electronic doodads - by GREASY_BEAST - 03-23-2009, 10:41 AM
RE: Electronic doodads - by winmutt - 03-17-2009, 07:41 PM
RE: Electronic doodads - by ForcedInduction - 03-17-2009, 07:44 PM
RE: Electronic doodads - by winmutt - 03-17-2009, 07:47 PM
RE: Electronic doodads - by winmutt - 03-18-2009, 03:02 PM
RE: Electronic doodads - by 300SD81 - 03-23-2009, 10:10 AM
RE: Electronic doodads - by Tymbrymi - 03-25-2009, 08:17 AM
RE: Electronic doodads - by 300SD81 - 03-23-2009, 06:45 PM
RE: Electronic doodads - by winmutt - 03-24-2009, 10:08 AM
RE: Electronic doodads - by Gross Polluter - 03-24-2009, 02:54 PM
RE: Electronic doodads - by winmutt - 09-04-2009, 10:31 AM
RE: Electronic doodads - by 300SD81 - 03-29-2009, 11:53 AM
RE: Electronic doodads - by 300SD81 - 04-09-2009, 10:23 AM
RE: Electronic doodads - by oel_brenner - 04-20-2009, 10:54 PM
RE: Electronic doodads - by 300SD81 - 04-20-2009, 11:40 PM
RE: Electronic doodads - by ForcedInduction - 04-21-2009, 05:45 PM
RE: Electronic doodads - by oel_brenner - 04-21-2009, 10:06 PM
RE: Electronic doodads - by oel_brenner - 04-29-2009, 10:41 PM
RE: Electronic doodads - by oel_brenner - 04-30-2009, 10:48 PM
RE: Electronic doodads - by Gross Polluter - 06-05-2009, 03:55 PM
RE: Electronic doodads - by winmutt - 09-03-2009, 01:27 PM
RE: Electronic doodads - by Tymbrymi - 09-03-2009, 01:36 PM
RE: Electronic doodads - by winmutt - 09-03-2009, 02:25 PM
RE: Electronic doodads - by tomnik - 09-04-2009, 06:15 AM
RE: Electronic variable vane control - by winmutt - 09-04-2009, 08:27 AM
RE: Electronic variable vane control - by Tymbrymi - 09-04-2009, 01:33 PM
RE: Electronic variable vane control - by winmutt - 09-04-2009, 03:21 PM
RE: Electronic variable vane control - by winmutt - 01-22-2011, 10:21 PM
RE: Electronic variable vane control - by aaa - 01-22-2011, 10:53 PM
RE: Electronic variable vane control - by winmutt - 01-22-2011, 11:38 PM
RE: Electronic variable vane control - by Spaceraver - 01-23-2011, 12:08 PM
RE: Electronic variable vane control - by winmutt - 01-23-2011, 03:55 PM
RE: Electronic variable vane control - by winmutt - 01-24-2011, 09:25 AM
RE: Electronic variable vane control - by aaa - 01-24-2011, 05:04 PM
RE: Electronic variable vane control - by Spaceraver - 01-25-2011, 04:53 AM
RE: Electronic variable vane control - by winmutt - 01-25-2011, 09:40 AM
RE: Electronic variable vane control - by 300D50 - 01-25-2011, 12:01 PM
RE: Electronic variable vane control - by winmutt - 01-25-2011, 05:45 PM
RE: Electronic variable vane control - by MTUPower - 01-25-2011, 07:15 PM
RE: Electronic variable vane control - by aaa - 01-25-2011, 07:21 PM
RE: Electronic variable vane control - by winmutt - 01-26-2011, 06:28 PM
RE: Electronic variable vane control - by tomnik - 01-27-2011, 12:45 AM
RE: Electronic variable vane control - by Syncro_G - 01-27-2011, 10:17 AM
RE: Electronic variable vane control - by 300D50 - 01-27-2011, 10:43 AM
RE: Electronic variable vane control - by aaa - 02-01-2011, 08:01 PM
RE: Electronic variable vane control - by winmutt - 03-04-2011, 09:38 PM
RE: Electronic variable vane control - by 300D50 - 03-04-2011, 11:45 PM
RE: Electronic variable vane control - by winmutt - 03-07-2011, 10:14 AM
RE: Electronic variable vane control - by 300D50 - 03-07-2011, 02:46 PM
Users browsing this thread:
 4 Guest(s)
Users browsing this thread:
 4 Guest(s)