RadioLocman.com Electronics ru
Advanced Search +
  
Go Back   RadioLocman Forum > Electronics and ... > Microcontrollers (MCU)

Microcontrollers (MCU) Application and programming of MCUs, Evaluation Kits and Demonstration Boards, Programmers.

Reply
 
Thread Tools Search this Thread
Old 02-20-2016, 08:34 PM   #1
ricperes
Junior Member
 
Join Date: Feb 2016
Posts: 5
ricperes is on a distinguished road
Default IR2110 driver + arduino

Hello , I have tried to control a full-bridge inverter. So i made my SPWM signals through Arduino like this code! I want to use a IR2110 driver, but I have seen many schematics to do this, I already use this : http://tahmidmc.blogspot.pt/2013/01/...2110-with.html , I used exactly the same values of C and R. In sum , you can give me a feedback , if this Schematic is good, or if my code is correct please? Thanks
Code:
void loop() {

  for (t = 0; t < 10; t = t + 0.001) {

    Uref = sin(2 * PI * 50 * t); // sin reference
    
    notref = -1 * sin(2 * PI * 50 * t); // negative sin reference
    
    carrier = ((2 / PI) * asin(sin(2 * PI * 3000 * t))); //triangular wave


    if (Uref >= carrier) {

      analogWrite(10, 0);
      delayMicroseconds(25);
      analogWrite(11, 255);
    } else {

      analogWrite(11, 0);
      delayMicroseconds(25);
      analogWrite(10, 255);
    }

    //********************************************//
    if (notref >= carrier) {
      analogWrite(3, 0);
      delayMicroseconds(25);
      analogWrite(9, 255);
    } else {
      analogWrite(9, 0);
      delayMicroseconds(25);
      analogWrite(3, 255);
    }
  }
}
ricperes is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Use of IR2110 for three phase Full bridge IGBT driving jean12 Projects and Advices 3 01-10-2016 07:09 PM

All times are GMT. The time now is 01:50 PM.




Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Slices ↓
Radiolocman facebook Radiolocman twitter Radiolocman google plus