Show Posts
Pages: [1] 2
1  Using Arduino / Motors, Mechanics, and Power / Re: Electric Braking a scooter motor... on: September 16, 2014, 12:37:15 pm
It doesn't have any kind of braking attached to the motor. The controller is chines and lacks any kind of details, except the throttle, power motor and poet light cables are labeled! I'm not to worried about capturing any power back at this point....

So when I'm trying to slow the motor...  Should I hit it with the max speed in the opposite directs for short burst or try to figure out the current speed and hit it with an equal amount of power?
2  Using Arduino / Motors, Mechanics, and Power / Electric Braking a scooter motor... on: September 13, 2014, 07:14:01 pm
I have a 24v 500w scooter dc motor. I'm using the scooter controller. It has forward, reverse and throttle control. I'm using a joystick controller connected to an Arduino, controlling the speed and dir of the scooter controller.

I'm trying to use the arduino to do current reverse braking to slow the motor to match the position of the joystick. I don't want it to let the motor cost.

I'm not sure if current reverse braking is the best way to control the speed of the motor.  If it is. How do know how much current to send it so it slows with out damaging the motor...


Thank for any help or ideas! 
3  Using Arduino / Motors, Mechanics, and Power / Re: Stopping a Motor with a Current Sensor... on: November 15, 2013, 12:11:30 pm
I'm using a Board from Pololu http://www.pololu.com/product/1220

The Driver on it is a: Toshiba TB6612FNG
Data Sheet: http://www.pololu.com/file/0J86/TB6612FNG.pdf
4  Using Arduino / Sensors / Re: ACS712 - 30A vs 5A.... on: November 12, 2013, 08:22:19 am
Chagrin, Thanks for the response!
What would be a good sensor to use? Would you have any suggestions?

I was thinking of getting one of these. It looks like it would have other uses in the longterm.
INA219 High Side DC Current Sensor Breakout - 26V ±3.2A Max
http://www.adafruit.com/products/904
5  Using Arduino / Motors, Mechanics, and Power / Re: Stopping a Motor with a Current Sensor... on: November 11, 2013, 06:36:29 pm
Okay, so I think I made a mistake....
I bought an ACS712-30A board. I think I needed to buy a ACS712-5A. My project pulls about 140mA max. When I run a simple analogRead it get the half voltage read of the VCC. as shown on other people project... about 512. Good that's normal.

The stink is I don't see any change on the reading when I run my motor and other parts. I can see the current being pulled on my desktop power supply. But no change on the ACS712-30A.

Do think the reason why is that it's not sensitive enough? the -30a or -5a stands for the max amp it can handle...


Thanks again for all of the help!

link to what I bought:
http://www.amazon.com/Amico-Electrical-Current-Sensor-Module/dp/B00BNQXAIY/

Data Sheet: http://www.allegromicro.com/~/media/Files/Datasheets/ACS712-Datasheet.ashx
6  Using Arduino / Sensors / ACS712 - 30A vs 5A.... on: November 11, 2013, 01:50:19 pm
Can I use a ACS712-30A to read currents from devices that are bellow 1A? I have a 30A version. But I know that what I'm trying to measure around 150mA, and I'm not getting any fluctuation in the read. 

Thanks, Dan!

Code:
int curRead;
void setup() {
  Serial.begin(9600);
}
 
void loop() {
  curRead = analogRead(A0);
   delay(1);
  Serial.println(curRead); 
}
7  Using Arduino / Sensors / Find a Knob's Speed and Direction... Math! on: November 09, 2013, 06:54:27 pm
I'm want to find out he speed and direction a person is turning a simple knob / potentiometer. My knob have the read value from 0 - 1025... So with the user spins the knob, I need to detect the rate at which he is spinning and also the direction... Is there a builtin math function I could use?

Example code would be amazing!!!
thanks for the help!
dan.
8  Using Arduino / Motors, Mechanics, and Power / Re: Stopping a Motor with a Current Sensor... on: November 07, 2013, 04:21:37 pm
I'm only running one motor on my driver. Do you think it would be possible to use a sensor at the voltage into the driver? That way I can watch the current draw no matter the direction of the motor spin?
9  Using Arduino / Motors, Mechanics, and Power / Re: Stopping a Motor with a Current Sensor... on: November 07, 2013, 02:00:08 pm
That's what I'm screaming MrBear! What are you using for the sensor? Would you be willing to share some code, or point me where I can look at other code like it?

Thanks guys for all of the help! Best forum on the internet!
10  Using Arduino / Motors, Mechanics, and Power / Re: Stopping a Motor with a Current Sensor... on: November 07, 2013, 08:47:11 am
But Trum! what about my Ford? Does it use this advanced stalling technique? just kidding.... Thanks for the fast reply! To be honest, I have never seen it done before.. It was one of those late night ideas and didn't know if I was crazy.

Basically my project uses a large wheel and will very on the position, so the end of the move will never be the same. Or I would be all over the switch. I'm ordering a ACS712 today.... hopefully that will work like a champ...
11  Using Arduino / Motors, Mechanics, and Power / Stopping a Motor with a Current Sensor... on: November 07, 2013, 08:31:32 am
I need to stop a motor from turning when it hits the end of it's move. I'm wanting to do it when the motor hits a higher then average torque. I'm wanting to catch it just as it almost hits a stall.

I was thinking of putting a Current Sensor on the power lines, and build a function that would check the current. If it hit an abnormally higher then average current then stop the motor.

Is this a good way to do this? Is there a smarter simpler way of watching for the higher then normal / just about to stall the motor? Is it possible to do this with out a current sensor, and just use one of the io pins on the arduino?

Thanks for any feed back!
dan.
12  Using Arduino / Motors, Mechanics, and Power / Re: DC Motors and the Noise they Make! on: November 04, 2013, 07:22:01 pm
Never Mind!

There is an option in the library for Arduino. For anyone else looking for this later

File Name: OrangutanMotors.cpp

Code:
#ifndef ARDUINO
    // use the system clock/8 (=2.5 MHz) as the timer clock,
// which will produce a PWM frequency of 10 kHz
// Arduino uses Timer0 for timing functions like micros() and delay() so we can't change it
    //TCCR0B = TCCR2B = 0x02;  //<-- Comment Out
#endif

// use the system clock (=20 MHz) as the timer clock,
// which will produce a PWM frequency of 78 kHz.  The Baby Orangutan B
// and 3Pi can support PWM frequencies this high.  The
// Orangutan LV-168 cannot support frequencies above 10 kHz.
    TCCR0B = TCCR2B = 0x01; //<-- Uncomment

13  Using Arduino / Motors, Mechanics, and Power / Re: DC Motors and the Noise they Make! on: November 04, 2013, 07:04:34 pm
So I uncommented TCCR2B = 0x01; and commented TCCR2B = 0x02; in the library provided by pololu.

I still get the whine.. Should I be trying to change the PWM Freq in the motor library of in the setup of the project? Am I going about this all wrong?
14  Using Arduino / Motors, Mechanics, and Power / Re: DC Motors and the Noise they Make! on: November 04, 2013, 01:13:40 pm
Thanks guys for all of the responses!

Just an FYI: The MicroMo motors. When just sending them different voltages, changing the speed from a desktop power supply. They are as quite as a church mouse who just had his nails clipped, running a cross carpet... I'm from the south.....

So would changing the PWM to 16kHz fix the whine? If so, how would I do something like that? I'm open to using other drivers. But it's nice that this is a nice and neat little package.

Here is a link to a data sheet for the driver on the board: https://www.sparkfun.com/datasheets/Robotics/TB6612FNG.pdf

Here are some notes out of the library that I'm using to drive the motor. The library comes from Pololu for that board. After reading them, does this mean I can change the PWM for the arduino and have it talk to the driver at that speed forcing the driver to run at 16kHz? The board I'm using is the "Baby Orangutan B"

Code:
// initialize timers 0 and 2 to generate the proper PWM ouputs
// to the motor drivers
void OrangutanMotors::init2()
{
#ifdef _ORANGUTAN_SVP

// Configure for non-inverted fast PWM output on motor PWM pins:  
    //  Normal port operation, OC2x disconnected (changes later when a non-zero speed is set)
    //  Timer2 counts up from 0 to 255 and then overflows directly to 0.
    TCCR2A = 0x03;
  
    // use the system clock/8 (=2.5 MHz) as the timer clock,
// which will produce a PWM frequency of 10 kHz
    TCCR2B = 0x02;

// use the system clock (=20 MHz) as the timer clock,
// which will produce a PWM frequency of 78 kHz.  The Baby Orangutan B,
// Orangutan SVP, and 3Pi can support PWM frequencies this high.  The
// Orangutan LV-168 cannot support frequencies above 10 kHz.
    //TCCR2B = 0x01;
15  Using Arduino / Motors, Mechanics, and Power / Re: DC Motors and the Noise they Make! on: November 02, 2013, 09:41:20 pm
Here is what I'm using.
http://www.pololu.com/product/1220/

Thanks for the fast response!
Pages: [1] 2