element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Power & Energy
  • Technologies
  • More
Power & Energy
Forum Why PWM generate circuit can not adjust the duty cycle to 10%?
  • Blog
  • Forum
  • Quiz
  • Documents
  • Polls
  • Events
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • Replies 13 replies
  • Subscribers 288 subscribers
  • Views 1866 views
  • Users 0 members are here
  • duty
  • pwm
  • led
  • cycle
  • dimming
Related

Why PWM generate circuit can not adjust the duty cycle to 10%?

Jason
Jason over 15 years ago

I have a problem when I am debuging. My PWM generate circuit can not adjust the duty cycle to 10%! It just 46% when I modulate Rp_Potentiometer.SCH.jpg

 

But I have checked the circuit by a software called EWB and the follow images are test result.

 

1 R_potentiometer =100k Ohm  100%

   Duty cycle=10%

image

 

2 R_potentiometer =100k Ohm   50%

   Duty cycle=50%

image

 

3 R_potentiometer =100k Ohm      0%

   Duty cycle=90%

image

 

Why? Can anyone tell me why!

  • Sign in to reply
  • Cancel
Parents
  • WarrenW
    WarrenW over 15 years ago

    You could always try using a PICAXE 08M micro to generate your PWM. These are good for 0% - 100% and are adjustable by simple basic programing.

    image

    Effectively you would put your pot between 0V and +V with the wiper connected to Pin 6 (ADC 1) and use Pin 5 (PWM2) to generate your pulses, this can be isolated via a mosfet if more drive is required. Apart from a 5V regulated supply thats all you need!

     

    Program the micro with the code along the lines of....

     

    ;INPUT PIN 6 (ADC1)
    ;OUTPUT PIN 5 (PWM2)

    SYMBOL ADCVALUE = W1  ;ASSIGN WORD 1

    MAIN:
    READADC10 1,ADCVALUE  ;Reads the Voltage off the pot and assigns a number 0-1024
    PWMOUT 2,150,ADCVALUE  ;The PWM period (150 IN THIS CASE) = (period + 1) x 4 x resonator speed (1/4000000) effectively = the number + 1 in uS
    GOTO MAIN

    ;THE DUTY CYCLE IS DETERMINED BY THE 'ADCVALUE FIGURE' 0 = 0% AND 1024 = 100%
    ;SCALING CAN BE DONE VIA CALCULATION WITHIN THE PROGRAM
    ;E.G LABEL PWMVAL =W2
    ;AFTER READING THE ADCVALUE IT CAN BE MANIPULATED
    ;LET PWMVAL = ADCVALUE/2 (EFFECTIVELY A 0-50% PWM)

     

     

    Picaxe chips, software (free) etc can be obtained from www.picaxe.co.uk

     

    Cheers

    Warren.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Reply
  • WarrenW
    WarrenW over 15 years ago

    You could always try using a PICAXE 08M micro to generate your PWM. These are good for 0% - 100% and are adjustable by simple basic programing.

    image

    Effectively you would put your pot between 0V and +V with the wiper connected to Pin 6 (ADC 1) and use Pin 5 (PWM2) to generate your pulses, this can be isolated via a mosfet if more drive is required. Apart from a 5V regulated supply thats all you need!

     

    Program the micro with the code along the lines of....

     

    ;INPUT PIN 6 (ADC1)
    ;OUTPUT PIN 5 (PWM2)

    SYMBOL ADCVALUE = W1  ;ASSIGN WORD 1

    MAIN:
    READADC10 1,ADCVALUE  ;Reads the Voltage off the pot and assigns a number 0-1024
    PWMOUT 2,150,ADCVALUE  ;The PWM period (150 IN THIS CASE) = (period + 1) x 4 x resonator speed (1/4000000) effectively = the number + 1 in uS
    GOTO MAIN

    ;THE DUTY CYCLE IS DETERMINED BY THE 'ADCVALUE FIGURE' 0 = 0% AND 1024 = 100%
    ;SCALING CAN BE DONE VIA CALCULATION WITHIN THE PROGRAM
    ;E.G LABEL PWMVAL =W2
    ;AFTER READING THE ADCVALUE IT CAN BE MANIPULATED
    ;LET PWMVAL = ADCVALUE/2 (EFFECTIVELY A 0-50% PWM)

     

     

    Picaxe chips, software (free) etc can be obtained from www.picaxe.co.uk

     

    Cheers

    Warren.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Children
No Data
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube