I am new to Arduino and have been instructed this project be ran by Arduino so I am scrambling to put something together as I mostly work with only PLC`s , so far I have the motor driver and a Arduino uno R3.
THE PROJECT: 30 Dc 7.2v motors must be ran non stop using PWM @ 100% then dropping to 70% for varying times.
Obviously I can only run 2 motors per H-Bridge which is the Monster Motor Controller Shield For Arduino (14A, 5.5-16V) due to the max amp draw of the motor its self. I have found some code but all of them seem to use a Pot to adjust the PWM, See attached.
How to I go about changing it to just run at two predetermined preset PWM %`s continuously?
You need to look at how many of these H bridge circuits you can drive from an Arduino pin , whether or not you can use multiple digital output pins - within the constraints of what the Arduino can supply.
Software wise you just need to switch between the two PWM values using , say a digital
Input.
If your motors only run in one direction you could just drive multiples of them via a transistor connected to a digital
Output .
The “H” bridge is only needed if you want to reverse a motor.
The Analog outputs from the Arduino are in fact PWM signals , so you only need to do “analog write” with varying levels to give you the PWM signal to drive your circuit.
You wont kill them driving them through the transistor - which is doing the work in controlling the motor curent with a small signal from the Arduino.
A “H” bridge I s essentially 4 transistors in a bridge arrangement that allows the motor to go forwards and backwards , if you don’t need that it’s a waste of cash . Follow my links , look at transistors as a switch for further info .
grumpymp05:
I opted for the H bridges as these motors are high amperage didn't want to kill the Arduino.
That's not a valid reason.
As hammy said, you only use a H-bridge if you also need to reverse the motors.
Wise to post a link to the motor before you order any parts.
And I think a 2-motor shield is a poor solution for 30 motors.
You will likely have connection problems even stacking two shields.
Leo..