Offline
Jr. Member
Karma: 0
Posts: 53
|
 |
« on: February 22, 2013, 11:42:08 am » |
Hello all,
So, long story short, I made an autonomous robot.
2 Problems: Wont drive when put on the ground and everything shuts down when not using CPU power.
My robot works perfectly when not put on any surface, the wheels are spinning very well, then the first time I tried it on a surface it worked for 10 seconds only, then after that every-time I put the robot on any floor surface it can't drive, then I lift it it works fine, and so on. My robot all together only weighs 4lbs. Using a 7.2V rechargeable Battery Motors: Motor Ratings (at 7.2 VDC): No-load Current: 0.27 A @ 310 RPM Stall Current: 4.8 A Max Torque: 4.6 lb-inch (5.3 kg-cm)
Motor Driver: Operating voltage: 5-28 V Maximum PWM frequency: 10 kHz Current sense: 0.59 V/A Time to overheat at 5 A*: 2 s Time to overheat at 4 A*: 21 s Time to overheat at 3 A*: 165 s Current for infinite run time*: 2.5 A
What seems to be the problem, wrong motor driver, motors too weak?
|
|
|
|
« Last Edit: February 22, 2013, 12:14:34 pm by husein06 »
|
Logged
|
|
|
|
|
Queens, New York
Offline
Edison Member
Karma: 29
Posts: 1586
"Of all the things I've ever lost, I miss my mind the most" -Ozzy Osbourne
|
 |
« Reply #1 on: February 22, 2013, 11:57:27 am » |
What you using to power it on the ground?
|
|
|
|
|
Logged
|
UNO, MEGA, NANO, 4x4 keypad, micro servos, RF transceivers, bluetooth, ultrasonic sensor, 20x4 I2C LCD, 3.2 TFT touch screen, L298N Dual motor driver, Voice Recognition 15W, Gameduino
Arduino Tutorials, coming soon.
"If your doing nothing, it does not mean your lazy, it just means your open for anything that suits you" - Unknown
|
|
|
|
Offline
Jr. Member
Karma: 0
Posts: 53
|
 |
« Reply #2 on: February 22, 2013, 12:15:55 pm » |
What you using to power it on the ground?
Using a 7.2V rechargeable Battery for the motors, and arduino 9v and laptop cord for the rest of the project, but the main problem is the motors spin perfectly when not on the ground.
|
|
|
|
|
Logged
|
|
|
|
|
Johannesburg UTC+2
Offline
Edison Member
Karma: 34
Posts: 1705
|
 |
« Reply #3 on: February 22, 2013, 12:27:23 pm » |
It might be a simple mechanical problem to do with (lack of) gearing.
Have you got a motor driver chip in the mix somewhere though?- if you have say a 298 in there you'll be losing volts at the best of times but even more if the current is high with a motor trying to get the robot started. What's the voltage at the motors?
|
|
|
|
|
Logged
|
IT Crowd: Roy... "Have you tried turning it off and on again?" Moss.. "Have you tried forcing an unexpected reboot?"
|
|
|
|
Queens, New York
Offline
Edison Member
Karma: 29
Posts: 1586
"Of all the things I've ever lost, I miss my mind the most" -Ozzy Osbourne
|
 |
« Reply #4 on: February 22, 2013, 12:40:02 pm » |
Your motors probably dont have enough torque, in which case you will some kind of gear system.
|
|
|
|
|
Logged
|
UNO, MEGA, NANO, 4x4 keypad, micro servos, RF transceivers, bluetooth, ultrasonic sensor, 20x4 I2C LCD, 3.2 TFT touch screen, L298N Dual motor driver, Voice Recognition 15W, Gameduino
Arduino Tutorials, coming soon.
"If your doing nothing, it does not mean your lazy, it just means your open for anything that suits you" - Unknown
|
|
|
|
texas
Offline
God Member
Karma: 26
Posts: 841
old, but not dead
|
 |
« Reply #5 on: February 22, 2013, 01:09:57 pm » |
The stall current of the motors is such that they would overheat the controller pretty fast, but I assume that you aren't just turning them on at 100% duty cycle from a stand-still, are you? What PWM frequency are you using, 10kHz is pretty high. Depending upon your motors, they might have too much inductance to actually draw much power at that frequency.
|
|
|
|
|
Logged
|
Experience, it's what you get when you were expecting something else.
|
|
|
|
Offline
Jr. Member
Karma: 0
Posts: 53
|
 |
« Reply #6 on: February 22, 2013, 01:23:03 pm » |
The stall current of the motors is such that they would overheat the controller pretty fast, but I assume that you aren't just turning them on at 100% duty cycle from a stand-still, are you? What PWM frequency are you using, 10kHz is pretty high. Depending upon your motors, they might have too much inductance to actually draw much power at that frequency.
Your motors probably dont have enough torque, in which case you will some kind of gear system.
It might be a simple mechanical problem to do with (lack of) gearing.
Have you got a motor driver chip in the mix somewhere though?- if you have say a 298 in there you'll be losing volts at the best of times but even more if the current is high with a motor trying to get the robot started. What's the voltage at the motors?
I'm using these motors, http://www.parallax.com/StoreSearchResults/tabid/768/List/0/SortField/4/ProductID/587/Default.aspx?txtSearch=motor+wheel+kitand this motor driver http://www.pololu.com/catalog/product/1213
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Jr. Member
Karma: 0
Posts: 53
|
 |
« Reply #7 on: February 22, 2013, 01:25:30 pm » |
The stall current of the motors is such that they would overheat the controller pretty fast, but I assume that you aren't just turning them on at 100% duty cycle from a stand-still, are you? What PWM frequency are you using, 10kHz is pretty high. Depending upon your motors, they might have too much inductance to actually draw much power at that frequency.
I'm not sure what you mean, I'm using the arduino PWM 155/255 so .58 duty ratio.
|
|
|
|
|
Logged
|
|
|
|
|
Johannesburg UTC+2
Offline
Edison Member
Karma: 34
Posts: 1705
|
 |
« Reply #8 on: February 22, 2013, 01:31:06 pm » |
Are you accelerating the motors gradually from standstill? Those look to me like large wheels to run without gearing.... (without doing any calculations that is.)
Edit.... ah, I see those are geared motors, but still might be prudent to accelerate gradually
|
|
|
|
« Last Edit: February 22, 2013, 01:34:54 pm by JimboZA »
|
Logged
|
IT Crowd: Roy... "Have you tried turning it off and on again?" Moss.. "Have you tried forcing an unexpected reboot?"
|
|
|
|
Offline
Jr. Member
Karma: 0
Posts: 53
|
 |
« Reply #9 on: February 22, 2013, 01:35:33 pm » |
Are you accelerating the motors gradually from standstill? Those look to me like large wheels to run without gearing.... (without doing any calculations that is.)
Would accelerating be considered doing PWM? not sure what you mean by accelerating. I'm using an Arduino and just sending a PWM signal.
|
|
|
|
|
Logged
|
|
|
|
|
Johannesburg UTC+2
Offline
Edison Member
Karma: 34
Posts: 1705
|
 |
« Reply #10 on: February 22, 2013, 01:46:23 pm » |
I mean are you sending just one PWM value to set it to 155, or are you looping through a pwm command and increasing the value from 0 to 155 in steps of say 10.
|
|
|
|
|
Logged
|
IT Crowd: Roy... "Have you tried turning it off and on again?" Moss.. "Have you tried forcing an unexpected reboot?"
|
|
|
|
Offline
Jr. Member
Karma: 0
Posts: 53
|
 |
« Reply #11 on: February 22, 2013, 02:01:35 pm » |
I mean are you sending just one PWM value to set it to 155, or are you looping through a pwm command and increasing the value from 0 to 155 in steps of say 10.
This is how I'm doing it. if ( turn == 128 ){ drive_forward(); analogWrite(PWMR, 255);// speed control analogWrite(PWML, 255);// speed control } void drive_forward() { digitalWrite(RFWD,HIGH);// right wheel foward h-bridge digitalWrite(RRVS,LOW); digitalWrite(LFWD,HIGH);//left wheel foward h-bridge digitalWrite(LRVS,LOW); return; }
|
|
|
|
|
Logged
|
|
|
|
|
Johannesburg UTC+2
Offline
Edison Member
Karma: 34
Posts: 1705
|
 |
« Reply #12 on: February 22, 2013, 02:10:38 pm » |
Looks to me that you're blasting it straight to full speed immediately? (You need to post more of the code)
It might be worthwhile to have a speedstep of say 10 and a speed of 0, then loop through a section of code that sets speed = speed + speedstep and pwms it the new value of speed, and do the loop until the speed is the value you want.
|
|
|
|
|
Logged
|
IT Crowd: Roy... "Have you tried turning it off and on again?" Moss.. "Have you tried forcing an unexpected reboot?"
|
|
|
|
Offline
Jr. Member
Karma: 0
Posts: 53
|
 |
« Reply #13 on: February 22, 2013, 02:20:42 pm » |
Looks to me that you're blasting it straight to full speed immediately? (You need to post more of the code)
It might be worthwhile to have a speedstep of say 10 and a speed of 0, then loop through a section of code that sets speed = speed + speedstep and pwms it the new value of speed, and do the loop until the speed is the value you want.
I don't understand how would i include that?. My issue is, the code works perfectly, as long as the car isn't on the ground. I can hold it up in the air, and the drive motor does what it is supposed to, and the turn motor works when it is supposed to. But when I put it down, it works on a nice flat surface for a few seconds. It wont move at all on carpet. if (errorSum < 25) { drive_stop(); } else { if ( Stotal> 2100 ) { drive_stop(); } else { if ( turn == 128 ){ drive_forward(); analogWrite(PWMR, 255);// speed control analogWrite(PWML, 255);// speed control }
if ( turn > 129 ){ drive_right(); analogWrite(PWMR, 255);// speed control } if ( 127 > turn ){ drive_Left(); analogWrite(PWML, 255);// speed control } } } //delay(100); }
void drive_forward() { digitalWrite(RFWD,HIGH);// right wheel foward h-bridge digitalWrite(RRVS,LOW); digitalWrite(LFWD,HIGH);//left wheel foward h-bridge digitalWrite(LRVS,LOW); return; } void drive_Left() { digitalWrite(RFWD,HIGH);// right wheel foward h-bridge digitalWrite(RRVS,LOW); digitalWrite(LFWD,LOW);//left wheel foward h-bridge digitalWrite(LRVS,HIGH); return; } void drive_right() { digitalWrite(RFWD,LOW);// right wheel foward h-bridge digitalWrite(RRVS,HIGH); digitalWrite(LFWD,HIGH);//left wheel foward h-bridge digitalWrite(LRVS,LOW); return; } void drive_stop() { digitalWrite(RFWD,LOW);// right wheel foward h-bridge digitalWrite(RRVS,LOW); digitalWrite(LFWD,LOW);//left wheel foward h-bridge digitalWrite(LRVS,LOW); return; }
|
|
|
|
« Last Edit: February 22, 2013, 02:22:30 pm by husein06 »
|
Logged
|
|
|
|
|
Johannesburg UTC+2
Offline
Edison Member
Karma: 34
Posts: 1705
|
 |
« Reply #14 on: February 22, 2013, 02:26:09 pm » |
Yes the code may works perfectl, but it seems to run the motors at 255 which is full speed. When you try to get the wheels to move the robot at full speed immediately, it stalls. But if you do an analogWrite(pin, 10) followed by a short delay and an analogWrite(pin, 20) etc etc it might start moving.
But instead of hard-coding the 10 and 20 etc into a zillion analogWrites, you would increment a variable called speed and have analogWrite(pin, speed) to get it up to speed gradually.
|
|
|
|
|
Logged
|
IT Crowd: Roy... "Have you tried turning it off and on again?" Moss.. "Have you tried forcing an unexpected reboot?"
|
|
|
|
|