Writing directly to the ATmega328 registers circumvents problems caused by the analogWrite() function.
Previous video - Arduino PWM Inversion Issue:
https://youtu.be/fEz-NDCDhT4

By Julian

Youtuber, shed dweller, solar charge controller aficionado

13 thoughts on “Arduino pwm without analogwrite – muppet 2 project”
  1. Avataaar/Circle Created with python_avatars Ali’s Channel says:

    i need to contact you sir regarding my bidirectional converter

  2. Avataaar/Circle Created with python_avatars foxabilo says:

    Watching these vids after the event and I'm waiting for you to discover the joys of synchronous buck-boost shoot through and dead time implementation 😀

  3. Avataaar/Circle Created with python_avatars Teletoon says:

    Please where's the code ?

  4. Avataaar/Circle Created with python_avatars atul says:

    Hello, how would you change the frequency?

  5. Avataaar/Circle Created with python_avatars Christo Strauss says:

    Excellent solution for my problem! Only question how could I change the 2 pwm channels in order to change motor direction?

  6. Avataaar/Circle Created with python_avatars Janne Raatikainen says:

    Hei, fine. Could you kindly release a code for 1kHz and for digital PIN #5 (T1), please. Next how to manage PWM it self.

  7. Avataaar/Circle Created with python_avatars Sigit Permana says:

    Hi julian! does this work for timer 2, what should be changed? Thx

  8. Avataaar/Circle Created with python_avatars Sihle Jako says:

    how do you disable phase correct or how can one get controlled phase shift between pwm signals?

  9. Avataaar/Circle Created with python_avatars Carlos Sorondo says:

    Also how do you set the frequency out ?? I need the 30Khz

  10. Avataaar/Circle Created with python_avatars Carlos Sorondo says:

    what did you do to create the non overlap and create the space between the pulses..?

  11. Avataaar/Circle Created with python_avatars Carlos Sorondo says:

    what pins are you using besides where the pot is .. It may be a dumb question but i am a newbie sorry ..

  12. Avataaar/Circle Created with python_avatars Carlos Sorondo says:

    Julian thank you it is exactly what I was looking for.

  13. Avataaar/Circle Created with python_avatars Hola! Modeller Design says:

    Julian Ilett

    Hello. Can you prompt the issue of arduino pwm controlling the mosfets. It goes from 0 to 4.5 volts on linear mode on voltage. But should it be a step from 0 to 4.5 with pwm without any linearity on a voltage, to controlling the applications?. Sorry for the noob and such a kind of question. I do the DIY motor controller, and if I add a gate driver to mosfet with say 12v of driving voltage, the arduino don't give a damn on a pwm and just ON and OFF full power, no matter what pwm cycle is applied.

    Thanks.

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.