This web page URL is https://sites.google.com/site/deltayeti/home/arduinomotor
A web page showing thumbnails for the Arduino H-Bridge motor controller project is here https://sites.google.com/site/deltayeti/thumbs
All the files for the Arduino H-Bridge motor controller project are here https://sites.google.com/site/deltayeti/home/arduino
The Arduino H-Bridge motor controller project contains a Windows 10 app for controlling a motor using sliders controls, Eagle CAD files for schematics and printing the PCB's and photos of the PCB's.
The Windows 10 app Motor.zip can be downloaded from here https://steve54798.wixsite.com/filecab/motor Unzip the file using 7-Zip or right click it and choose Extract All. The Motor.exe file does not use an installer just double click the file when you want to run the app.
To run the Windows 10 app you will need to have installed the
Visual C++ Redistributable for Visual Studio 2015
It can be downloaded from
https://www.microsoft.com/en-us/download/details.aspx?id=48145
Motor.exe is a 32 bit C++ app and you'll need the x86 version of the C++ Redistributable vc_redist.x86.exe.
You can run Motor.exe on earlier versions of Windows but you might need to install the latest
Microsoft .NET Framework 4.6.1
from
https://www.microsoft.com/en-us/download/details.aspx?id=49982
There is also a Windows XP version of the app MotorXP.zip here
https://steve54798.wixsite.com/filecab/motor
With the XP version you will need to have installed the
Visual C++ Redistributable for Visual Studio 2008
It can be downloaded from here
The Arduino sketch can be downloaded from https://sites.google.com/site/deltayeti/home/arduino/Blink1.ino
The Arduino sketch was originally a blink sample and still contains references to leds.
This file needs tidying up but can be used as it is or as a sample for your own sketch.
The Windows 10 app sends control codes to the Arduino via the USB lead comm port.
Set the comm options the same as in the picture below but with the comm port of your device.
You can use any motor bridge you want but you will need to make sure the Arduino sketch is set up for your motor bridge.
You can buy a ready made h-bridge PCB on eBay for a couple of pound.
When you first run the app on the Options menu go to Comm settings, when you click OK the registry values for the settings will be created.
All the files for this project are in the folder
https://sites.google.com/site/deltayeti/home/arduino
In there you will find a Arduino sketch, Eagle cad files for my home made h-bridge and screen grabs.
My h-bridge was home made and hand cut using mini engraving tools and a modellers drill.
The Eagle board files will probably not be good for sending to a PCB maker.
Eagle can be downloaded and used for free for small PCBs.
I used the Laser and Iron method for making my PCBs (you can search for this on YouTube).
Note:
There appears to be two types of LM311 available. One that matches the datasheet and one that does not.
I bought some off eBay from China and they do not have open connection outputs. I bought some more from another vendor and they were the same. If you have that type you need to use pin 1 as the output instead of pin7 and the input goes to pin 2 and the two resistors to pin 3. You can see the n-channel PCB schematics is done for the non open connection output LM311. It's best to test your LM311s in a breadboard to find out what type you have before using them. See the picture below.
For the P-Channel MOSFET gate resistors using closed connection outputs add the resistors the same as in the picture below. If you look in the files on this website you will see there are two schematics one for the open connection output LM311 and one for the closed connection output LM311. There is no schematic for the open connection output LM311 N-Channel PCB.
I've put plastic sheet under the p-channel MOSFET heatsinks so they do not short out on the surrounding PCB tracks.
It's a good idea to test each MOSFET PCB before connecting the outputs to a motor. You can test each one individually. You must only have only one MOSFET on from any pair of MOSFET's at the same time. I've got a 1 ohm resistor in series with each MOSFET as a little bit of protection in case the wrong pair of MOSFET's get turned on. That would effectively short out your power supply
Some of the components in the Eagle schematics are not the actual ones I used. Because the part I was using was not available in Eagle I substituted another similar part.
I used IRF9540 P-Channel Power MOSFET 23A 100V TO-220 for the p channel and
IRFZ44 N-Channel 49A 55V Transistor MOSFET Component TO-220 for the n channel.
The Sony PQ30RV11 voltage regulators I used came out of a old Sony CRT TV. You'll probably need to use a different type. The KA78RXXC-Series are similar. The voltage regulators are set to output 5.6 volt. You can use a 5 volt regulator if you want.
The diodes should be fast switching schottky diodes. Again I just used some second hand ones from a TV.
The purpose of the LM311 is to allow the input voltage to be customized and to also protect the controlling circuit. When MOSFET's fail they tend to go short and that includes the gate going short too. LM311's are cheap you can buy 10 or 20 for under 2 pound on eBay. I've tested my PCB's and they are reliable with no MOSFET's failures. That might not be the case with the motor you use. I tested with a old HP 720C inkjet motor and 18 volts supply. The diodes and chunky capacitors are important for protecting the MOSFET's from motor feedback.
These PCB's would probably work with power supplies down to 9 volts. If you only want to drive a motor one way you can use just one of the PCB's on it's own.
Have a look at some of the photos to see how I wired the PCB's. Use the ones at the bottom of the thumbs web page. I've added an additional PCB with LED's to make it neater to wire. The LED's are optional but are useful so you can see what it's doing.
The Windows 10 motor.exe program is used to control the motor direction and speed. You can drag the scroll bars or you can type in values in the edit boxes and press enter. When typing in values you are not limited to the values of the scroll bars. You can use the motor.exe app with your own sketches for other purposes. Have a look at my sketch to see how it is used. 100 is added to any value sent by the app. This allows the sketch to expect at least three digits for any value. You can type in higher values with more than three digits and the sketch will read those OK. The exception is the duty cycle value which seems to cause a maths error in the sketch if that is sent as greater than 200 so that is limited.
Last updated 14/05/2016 06:02