Relay H-bridge (Relay Motor controller)

For contro a dc motor you needan h-bridge .

It is the only way to drive motor forward ,stop and reverse

The most common way to implement H-bridge is IC L298N

L298N is not easy to use  with 3.3v Gpio of raspberry pi, so I implemented the same logic with a relay board .

A  goodway,to drive dc motor, is use an L9110 like catspberry 2. L9110 can drive 5v and max 800 Ma DC motor.

To drive DC motors with different voltages and currents I designed a h-bridge with a relay board

deviatore_schema_funzionamento

arduino-a-4-canali-5v-relay-modulo-di-scheda-di-espansione_kmunaz1343094573469

This control logic is really smart because a short circuit will never happen, even during a transition state .

Each pin of each motor is connected to a relay and if the logic status is 1 it is connect to  positive power if logical status is 0 it connect to ground.if the motor has a contact connected to the negative pole and one to the positove pole then it  moves, if it has both contacts connected to the same pole is stopped
Then the operating logic for motor 1  is

in 1 -> 0 in2-> 0 stop
in 1 -> 1 in2-> 0 forward
in 1 -> 0 in2> 1 backward
in1 -> 1 in2-> 1 stop

h-bridge-motor-driver1

I projected this logic for a arduino relay board but i remember that i had an old lpt relay board. Generally  the slot gpio is not compatible with  lpt board but in this case thise board  use a  a one-way connection, manages each input bit separately and can operate at 3.3v because the communication state in this circuit is HEF4081BT that can operate at minimum voltage of 3v . .

I buy this board   across an old electronics magazine in ’90 years (the project of thise boars is from old eletronic magazine   “elettronica in” number 1 of 1995 ) but you should use an  arduino relay board (Recommended) ,  and buy it for just few euro on ebay (search for relay  arduino on ebay) or you can build it (it is more expansive)
in the future I could use a relays board for arduino
Thise is the connection diagram for old lpt card

gio lpt

and this is connection diagram for arduino relay board (untested)

gio arduino

Thise is an exsample of a simple bash script to drive motor using wiring pi

motor 1 forward:

#!/bin/bash
gpio mode 0 out
gpio mode 1 out
gpio write 0 1
gpio write 1 0

motor 1 backward:

#!/bin/bash
gpio mode 0 out
gpio mode 1 out
gpio write 0 0
gpio write 1 1

motor  1 Stop:

#!/bin/bash
gpio mode 0 out
gpio mode 1 out
gpio write 0 0
gpio write 1 0

motor 2 forward:

#!/bin/bash
gpio mode 2 out
gpio mode 3 out
gpio write 2 1
gpio write 3 0

motor 2 backward:

#!/bin/bash
gpio mode 2 out
gpio mode 3 out
gpio write 2 0
gpio write 3 1

motor 2 Stop:

#!/bin/bash
gpio mode 2 out
gpio mode 3 out
gpio write 2 0
gpio write 3 0

 

I need some job as junior progarammer,junior system Engineering or ANY KIND OF JOBS this is my curriculum vitae

Rispondi

Inserisci i tuoi dati qui sotto o clicca su un'icona per effettuare l'accesso:

Logo WordPress.com

Stai commentando usando il tuo account WordPress.com. Chiudi sessione / Modifica )

Foto Twitter

Stai commentando usando il tuo account Twitter. Chiudi sessione / Modifica )

Foto di Facebook

Stai commentando usando il tuo account Facebook. Chiudi sessione / Modifica )

Google+ photo

Stai commentando usando il tuo account Google+. Chiudi sessione / Modifica )

Connessione a %s...