For a charge pump circuit, I need complementary PWM outputs - one going high when the other goes low. This can be achieved by flipping the invert bit in one of the timer registers. But what about non-overlapping pulses? Turns out this is possible too.
Arduino ATmega328P Pin Mapping:
http://arduino.cc/en/Hacking/PinMapping168
Arduino Timer PWM Cheat Sheet:
http://playground.arduino.cc/Main/TimerPWMCheatsheet

By Julian

Youtuber, shed dweller, solar charge controller aficionado

12 thoughts on “Arduino pwm solar charge controller #2 – charge pump”
  1. Avataaar/Circle Created with python_avatars SolventTrap dot com says:

    I'm trying to adapt this to a more reasonable high-voltage version…

  2. Avataaar/Circle Created with python_avatars hojat shojaei says:

    Hi Julian, How can I make this pulse with variable frequency?

  3. Avataaar/Circle Created with python_avatars Soumendra Mishra says:

    how to get 120KHz with 50% duty ratio

  4. Avataaar/Circle Created with python_avatars Efry Rinaldi Kaliky says:

    can you make tutorial for "how to generate 3 phase PWM signal using arduino" with deadtime like this video 👆

  5. Avataaar/Circle Created with python_avatars Dex says:

    Did you update Wikipedia with a little more info?

  6. Avataaar/Circle Created with python_avatars Yasha says:

    Great explanation. It has been very useful for my Cockcroft-Walton multiplier prototype. Thanks a lot.

  7. Avataaar/Circle Created with python_avatars Caleb Hille says:

    bada-ba-bah-ba.. im lovin it

  8. Avataaar/Circle Created with python_avatars Alwin Thomas says:

    Could you please help me to add a pot to change the frequency of signal(both1 & 2 independently) in this same program, Is it works in ATTiny 85 ?,

  9. Avataaar/Circle Created with python_avatars Faisal Ali says:

    Awesome, thank you for your help

  10. Avataaar/Circle Created with python_avatars MCMR says:

    Julian, this has been an absolute gift for me. Thanks for sharing your work.

  11. Avataaar/Circle Created with python_avatars Dr. Oday A. Ahmed says:

    thanks a lot

  12. Avataaar/Circle Created with python_avatars Mihajlo Petković says:

    When you change frequency and after that upload different sketch, does it set PWM frequency to default?

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.