This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//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 [email protected] | |
// 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 |