4 step commutation of Mosfet bridge

Hiiii everyone,

I am working on my academic project, what i need to do is just triggering simultaneously bridge of 4 mosfets with different time delays.

Please see the attached file for better understanding of circuit requirements.

Plz help…

Bridge Circuit.doc (93 KB)

Converted to PDF format so everyone can red it.

This forum’s purpose is to help people learn to use Arduino compatible development boards. If you have code that you are having trouble with or need advice on hardware that you are trying to use we will try to help. We, generally, do not design circuits or write code for people.

If you have a hardware question, post a schematic with links to component data sheets (the posted schematic shows no connection to Arduino). For code questions, post the entire sketch and the complete text of any errors that the compiler generates.

Please read the “how to use the forum” stickies to see how to format and post code.

Bridge Circuit.pdf (40.7 KB)

Your circuit does not make sense, it only can burn the transistors. Learn more about building and using a H-bridge, and tell us more about the purpose of your project and circuit.

Please find attached circuitry for entire project ........

Also see the below coding which i have done....but its not working..

int Led = 8;
int pb1 = 7;
void setup() {
// put your setup code here, to run once:
Serial.begin (9600);
pinMode (3, OUTPUT); // give output of +5V to the respective pin
pinMode (4, OUTPUT);
pinMode (5, OUTPUT);
pinMode (6, OUTPUT);
pinMode (pb1, INPUT);
pinMode (Led, OUTPUT);
}

void loop() {
// put your main code here, to run repeatedly:
if (digitalRead (pb1) == HIGH)
{
digitalWrite (Led, HIGH);
}
else
{
digitalWrite (Led, LOW);
}

if (digitalRead (pb1) == HIGH)
{
digitalWrite (3, HIGH);
delay (4);
digitalWrite (3, LOW);
delay (3000);
digitalWrite (4, HIGH);
delay (8);
digitalWrite (4, LOW);
delay (3000);
digitalWrite (5, LOW);
delay (2);
digitalWrite (5, HIGH);
delay (30000);
digitalWrite (6, LOW);
delay (6);
digitalWrite (6,HIGH);
delay (30000);
}
else
{
digitalWrite (3, LOW);
digitalWrite (4, LOW);
digitalWrite (5, LOW);
digitalWrite (6, LOW);
}
}

Please read “How to use this forum”, and post code in code tags </>.

And attach your circuit diagram. Search the forum for hints about posting images, it’s a bit tricky.

Dear DrDiettrich ....thanks for guidance.

Please help me with the below coding.........

int Led = 8;
int pb1 = 7;
void setup() {
  // put your setup code here, to run once:
  Serial.begin (9600);
pinMode (3, OUTPUT); // give output of +5V to the respective pin
pinMode (4, OUTPUT);
pinMode (5, OUTPUT);
pinMode (6, OUTPUT);
pinMode (pb1, INPUT);
pinMode (Led, OUTPUT);
}

void loop() {
  // put your main code here, to run repeatedly:
  if (digitalRead (pb1) == HIGH)
  {
    digitalWrite (Led, HIGH);
  }
else
{
  digitalWrite (Led, LOW);
}

if (digitalRead (pb1) == HIGH)
{
  digitalWrite (3, HIGH);
delay (40000);
digitalWrite (3, LOW);
delay (30000);
digitalWrite (4, HIGH);
delay (80000);
digitalWrite (4, LOW);
delay (3000);
digitalWrite (5, LOW);
delay (20000);
digitalWrite (5, HIGH);
delay (30000);
digitalWrite (6, LOW);
delay (60000);
digitalWrite (6,HIGH);
delay (30000);
}
else 
{
   digitalWrite (3, LOW);
  digitalWrite (4, LOW);
  digitalWrite (5, LOW);
  digitalWrite (6, LOW);
}
}

The code must match the connected circuit. Please show your fixed circuit diagram.

I also doubt that your signal diagram is correct. The end of a cycle must match the begin of the next cycle.

What "academic" background do you have? Ask your teacher whether your approach is okay, so far.

Hi,
Welcome to the forum.

Please read the first post in any forum entitled how to use this forum.
http://forum.arduino.cc/index.php/topic,148850.0.html

I am working on my academic project,

So I hope you can post a complete copy of your circuit, in CAD or a picture of a hand drawn circuit in jpg, png?

Thanks.. Tom... :slight_smile:

here is another program..........

const int mosfet1 = 3;
const int mosfet2 = 4;
const int mosfet3 = 5;
const int mosfet4 = 6;
const int led = 8;
const int pb1 = 9;
const int pb2 = 10;
const int ontime1 = 4000;
const int ontime2 = 8000;
const int offtime1 = 2000;
const int offtime2 = 6000;

byte mosfet1state = LOW;
byte mosfet2state = LOW;
byte mosfet3state = LOW;
byte mosfet4state = LOW;
byte ledstate = LOW;
byte pb1state = LOW;
byte pb2state = LOW;

unsigned long currentmillis = 0;
unsigned long currentmillis1 = 0;
unsigned long currentmillis2 = 0;
unsigned long currentmillis3 = 0;
unsigned long currentmillis4 = 0;
unsigned long prevmosfet1millis = 0;
unsigned long prevmosfet2millis = 0;
unsigned long prevmosfet3millis = 0;
unsigned long prevmosfet4millis = 0;
unsigned long pb1millis = 0;
unsigned long pb2millis = 0;

void setup() {
  // put your setup code here, to run once:
Serial.begin(9600);

pinMode (mosfet1, OUTPUT);
pinMode (mosfet2, OUTPUT);
pinMode (mosfet3, OUTPUT);
pinMode (mosfet4, OUTPUT);
pinMode (led, OUTPUT);
pinMode (pb1, INPUT_PULLUP);
pinMode (pb2, INPUT_PULLUP);
}

//=====================================================================

void loop() {
  // put your main code here, to run repeatedly:

  currentmillis = millis();
  currentmillis1 = millis();
  currentmillis2 = millis();
  currentmillis3 = millis();
  currentmillis4 = millis();
  updatemosfet1state();
  updatemosfet2state();
  updatemosfet3state();
  updatemosfet4state();
  updateledstate();
  
}

//======================================================================

void updatemosfet1state()
{
  if (pb1 == HIGH) 
  {
    mosfet1state == HIGH;
    digitalWrite(mosfet1, mosfet1state);
  }
   else if (currentmillis1 - prevmosfet1millis >= ontime1)
    {
      mosfet1state != mosfet1state;
    }
  else 
   {
    mosfet1state == LOW;
   }
}

//========================================================================

void updatemosfet2state()
{
  if (pb1 == HIGH) 
  {
    mosfet2state == HIGH;
    digitalWrite(mosfet2, mosfet2state);
  }
  else if (currentmillis2 - prevmosfet2millis >= ontime2)
      {
      mosfet2state != mosfet2state;
      }
  else 
   {
    mosfet2state == LOW;
   }
}

//========================================================================

void updatemosfet3state()
{
  if (pb1 == HIGH) 
  {
    mosfet3state == LOW;
    digitalWrite(mosfet3, mosfet3state);
  }
   else if (currentmillis3 - prevmosfet3millis >= offtime1)
    {
      mosfet3state != mosfet3state;
    }
  else 
   {
    mosfet3state == LOW;
   }
}
//=========================================================================

void updatemosfet4state()
{
  if (pb1 == HIGH) 
  {
    mosfet4state == LOW;
    digitalWrite(mosfet4, mosfet4state);
  }
   else if (currentmillis4 - prevmosfet4millis >= offtime2)
    {
      mosfet4state != mosfet4state;
    }
  else 
   {
    mosfet4state == LOW;
   }
}
//==========================================================================

void updateledstate()
{
  if (pb1 == HIGH) 
  {
    ledstate == HIGH;
    digitalWrite(led, ledstate);
  }
  else 
   {
    ledstate == LOW;
   }
}
//

Please learn to read and answer questions :-]

Also learn more about digitalRead(), BlinkWithoutDelay and more basic functions and examples.

Hi,
Can you please post your pictures/diagrams in jpeg format please, its easier for all to read.

Thanks.. Tom..... :slight_smile:

Hi,
OPs diagrams
CircuitSW1.jpg
CircuitSW2.jpg
Tom… :slight_smile:

Hi,
Please note when you are at step 1 and 3, you will have one switch assembly ON in both directions and one ON in one direction.
This one direction will be a short circuit between taps, which can be a very high current.
CircularCurrent.jpg
What voltage and current are you working at?
Can you tell us your electronics, programming, Arduino, hardware experience?

I was once involved in the development of a device like this, 10kW, and switching had to be done at zero crossing and full switching, not half at a time.
We did some test to see what would happen if one of the SCR packs shorted, it resulted in a massive current circulating around two tap circuits, quite a niose and things got hot VERY quickly.

Tom… :slight_smile:

Why not use triacs?

Allan

Hi,

allanhurst:
Why not use triacs?

Allan

Yes a better solution, optocouple the drive circuitry.
(allanhurst, I was editing in the last bit while you were posting..lol.. :))

Tom... :slight_smile: