Skip to content

Instantly share code, notes, and snippets.

View ResoCole2017's full-sized avatar

Omosagba Kole Israel Resonance ResoCole2017

  • Resotronics Nigeria Limited
  • Nigeria
View GitHub Profile
@ollewelin
ollewelin / main.ino
Last active September 29, 2023 13:00
3-phase PWM with deadtime 31.25kHz Arduino UNO. 6 transistors PWM
//This is a code made to run 3-phase PWM drive stage with 6-transistors, in other words 3 half bridge transistors with an Arduino UNO
//This setup is made with User settings of DEAD TIME. So here the the dead time can be adjusted by user. const int dead_time = 10;//10 = 0.625 us
//The PWM work here with fix frequancy of 31.25kHz (Other settings may not work proper when use all 3 TIMERS, if you want more flexibilty use Arduino MEGA 2560 or some other plattform)
//Olle Welin olle_welin@hotmail.com
// TL Transistor Low side of half bridge pair
// TH Transistor High side of half bridge pair
// PWM assignement at Arduino UNO is by following:
//~6 TL, PH0, TMR0, pwm_ph0 data value