As with every newbie I am in search of some guidance, I have a Mega 2560 and DBH-1A Diver. I have a source code that I am trying to figure out so I can incorporate all my needs.
The project is controlling a Dewalt 18V drill motor to rotate a round peanut butter container for a rock tumbler.
My goals are as follows,
-control motor at 6.5V @ 2-3A for 60 sec on and 10 sec off (this is what i am running at now so the motor stays below 100F)
-display motor current draw on a LCD 1602 Modual, using the CT pin on driver for A motor
-the CT pin currently outputs 1V when tumbling rocks,and 1.5V at start up
-have LED light illuminate when motor is rotating
-have a on/off button that can turn everything on/off so it does's run continuously
This is my first project with the kids and my knowledge is limited. i have listed all the specs for the components and the code i have thus for that i have modified to work so far.
not going to post specs on the mega 2560
DBH-1A DC 5-12v Motor Controller Dual-Channel H Bridge 0A-30A
Rated Voltage: 5-12 V/DC(14.6V Max.)
Quiescent Current: <30mA±5mA
Operation Current: 0A-30A per channel Max.
Internal Resistance (per channel): 12mΩ
Impedance Load: 200kHz
PWM Control Duty Cycle: 0%~98%
Recommended Frequency:
1, Normal motor: 16 KHZ
2, Coreless motor: 80 KHZ
3, Semi-conductor Refrigeration: 500hz~80kHz
Input Voltage Level:
1, Lower Voltage Level:0 to 5V
2, Higher Voltage Level:2.5-13 V (board is compatible with typical 3.3 V, 5 V, 12 V)
Sampled Output Current:
Sampled output power current for single chip micro controllers sampling to do current-limiting processing.
CT Output Voltage(V)=Current(A) x 0.155
Motor is out of a 18V dewalt drill max 22A, (operating a 6.5V @ roughly 2-3A)
What will you do in the summer when it gets over 100F? I would suggest the next step since you have a parts list is to connect them together in a proposed schematic, not a frizzy drawing. During this process you will determine how you are going to drive them. Take a look at the BTS7960 Motor H Bridge it has way more capability then you need but it is inexpensive and easy to mount. Determine your worse case power requirements and pick a power supply with more capacity just to be safe. What is Semi-conductor Refrigeration for, it takes a lot of power and most do not like PWM. You can power with one power supply and use buck (I always use SEPIC) converters to get your lower voltage. I would suggest using 1 to power the arduino with about 8 volts, this gives you the advantage of the on board filters and regulation. Remember A Power Supply the Arduino is NOT. Rework your list as you make changes, not everything in it fits. Have fun with this!
The drill can intermittently go to 140F and hope airconditioning will help with the rest. As for the 3, Semi-conductor Refrigeration: 500hz~80kHz. those were the specs I found online and no idea what that is.
Here is the code so far, I thought it posted with the original.
The power supply is a 0-30v 10A variable for motor controller and wall jack for arduino
with the motor code I don't need the two demos or the accelerate part but if I delete it, the decel doesn't work
the BTS7960 Motor H Bridge is definitely nice
/*
Rock Tumbler
Arduino Mega 2560
DBH_1A Dual Motor Driver
DeWalt 18V Drill
Operate Motor for 60 seconds,
decel over a duration of 30 milliseconds so the Motor doesn't suddenly stop,
hold in the stop position for 10 seconds
*/
// Motor A
int enA = 2;
int in1 = 8;
int in2 = 9;
void setup()
{
// Set all the motor control pins to outputs
pinMode(enA, OUTPUT);
pinMode(in1, OUTPUT);
pinMode(in2, OUTPUT);
}
void demoOne()
{
// This function will run the motors in both directions at a fixed speed
// Turn on motor A
digitalWrite(in1, HIGH);
digitalWrite(in2, LOW);
// Set speed to 200 out of possible range 0~255
analogWrite(enA, 200);
// Now change motor directions
digitalWrite(in1, LOW);
digitalWrite(in2, HIGH);
delay(60000);
// Now turn off motors
digitalWrite(in1, LOW);
digitalWrite(in2, LOW);
}
void demoTwo()
{
// This function will run the motors across the range of possible speeds
// Note that maximum speed is determined by the motor itself and the operating voltage