Show Posts
Pages: 1 [2] 3 4 ... 780
16  Using Arduino / Motors, Mechanics, and Power / Re: Proper battery Freaduino / Servo motors on: July 28, 2014, 06:48:35 am
Servos are typically rated to run at 6 to 7.2V

Arduino Vin requires at least 6.5V, and 7V is preferred.

Therefore a 7.2V NiMH pack is ideal for running servos and the Arduino
together - but only it can supply plenty of current so that the servos
don't pull the voltage down and reset the Arduino.   Also a 2S LiPo pack
is nominally 7.4V which is possible (a little high for the servos, but
I suspect people do this all the time).

Its better if possible to have separate power for the servos, in which
case 6V SLA or NiMH pack for servos, and perhaps a 9V _rechargable_
PP3-sized battery for the Arduino might be reasonable.

17  Using Arduino / Motors, Mechanics, and Power / Re: Pololu step motor with L298N driver on: July 28, 2014, 06:39:52 am
Which battery are you proposing?  Most 9V batteries aren't up to the task.  A large
lantern-type battery (size PP9 or above) is the minimum I'd expect to handle this level
of current.

Seriously consider using rechargable batteries for any motor drive application, its
economic sense.

I'd also ask why you have chosen this size of stepper motor?  How fast are you expecting
to spin it?
18  Using Arduino / Motors, Mechanics, and Power / Re: PWM for stepper motor on: July 28, 2014, 06:33:14 am
If you read the sticky post here about how to post it will explain all about
posting
Code:
// code using the # button
For future visitors to this thread I would suggest its worth fixing your original
posting.


I suggest looking at both the standard Stepper library and the AccelStepper library
that you can download.  AccelStepper handles ramping motor speed automatically.
19  Using Arduino / Motors, Mechanics, and Power / Re: help with motor project on: July 28, 2014, 06:27:36 am
OP said ULN2003, not ULN2803, but they are basically the same except ULN2803 has
8 channels rather than 7, so it can drive two 28byj-48's if you want.

Yes it can handle the current, those motors are very low power unipolar steppers,
5V 0.15A I believe.

Remember to connect the positive motor supply to the COM pin of the ULN2003
so that the freewheel diodes are in the circuit, otherwise you risk blowing the chip.
Freewheel diodes are always required when inductive loads are involved, any relay
solenoid or motor, basically.

The ULN2003 has base resistors already so its inputs are directly logic compatible.
20  Using Arduino / Motors, Mechanics, and Power / Re: 8 kHz power signal with Uno on: July 28, 2014, 06:19:05 am
This code sets up pins 9 and 10 (timer1 on the Uno), in antiphase at 8kHz.
You have to read section 15 of the ATmega328P datasheet to see how the
register values control timer1 in detail

Code:
void setup ()
{
  pinMode (9, OUTPUT) ;
  pinMode (10, OUTPUT) ;
  TCCR1A = 0xE2 ;  // Set up mode 14, fast PWM with TOP=ICR1
  TCCR1B = 0x19 ;   // prescale is divide-by-1, so 2000 cycles = 125us
  ICR1  = 2000-1 ;    // counts from 0..1999 continuously
  OCR1A = 1000-1 ;  // set PWM outputs at midpoints
  OCR1B = 1000-1 ;
  TCNT1 = 0x0000 ;  // counter set to zero
}

void loop ()
{}

21  Using Arduino / Motors, Mechanics, and Power / Re: Switched Reluctance Motor Control using Arduino on: July 28, 2014, 05:59:35 am
Interesting project.   I'd first measure the winding resistance and choose an operating
voltage where the winding resistance prevents excessive current, makes for less chance
of over-current damage.

Conceptually a SRM is very similar to a 3-phase stepper motor, you can just sequence
each phase in turn (if the current is limited by resistance, that is).

Once you go up to the design voltage of the motor you will need to monitor the current
since you need to drive the winding until the current reaches its maximum (before
full saturation of the poles) and no further.  Thereafter you may have to drive the winding
in reverse to reduce the current to zero at the end of that phase's cycle.  Or put another
way the winding's inductance is dominant and limits the rate of current change.

If you drive each winding in turn you only have to monitor the overall current to the
power stage, since only one phase is carrying current at once (at low speed certainly).

For efficient high speed operation the ramping of currents for the phases will probably
overlap, meaning 3 current sensors are needed.

You'll need faster ADCs than the Mega's built-in one, perhaps current sensing would
be better done with DAC+comparator circuit - you program a current limit and send
it to the comparator - the output of the comparator goes to an interrupt-enabled digital
pin to allow fast response in the code.

Another thing to note is that the direction of current isn't important, so each phase
(if brought out as two wires each) can be driven with a half-H-bridge, using the free-wheel
diodes to conduct during current-ramp-down.  A full H-bridge for each phase might allow
more flexible control (regen braking??)
22  Using Arduino / Motors, Mechanics, and Power / Re: Micro Metal gear motor with shaft encoder on: July 28, 2014, 05:29:40 am
Study the BlinkWithoutDelay example...  Rather than stopping and waiting
you regularly check.
23  Using Arduino / Motors, Mechanics, and Power / Re: Does this MOSFET implementation look correct? on: July 25, 2014, 07:24:24 am
The problem with low-side switching is that grounds are no longer common,
which can have various issues...  Or it might be OK.

Either way you also have to be aware of accidental powering via signal
lines in CMOS, which is why its great to have a shutdown pin on a chip
so you can put it in low power quiescent mode without having to worry about
such things.
24  Using Arduino / Motors, Mechanics, and Power / Re: L293D no power on output on: July 24, 2014, 06:36:06 pm
PP3-sized 9V batteries are not designed to power motors at all and may struggle
to do anything.

What voltage is the motor?  What is its stall current?  Do you realise that if
the motor pulls enough current to crowbar the output voltage of the 9V
battery it will pull current from the Arduino instead, probably resetting it.

Something like 4 to 6 quality NiMH rechargable AA cells are a good supply for
small 6V motors.
25  Using Arduino / Motors, Mechanics, and Power / Re: How to Control a Motor that has Been Taken Out of a RC Car with the Arduino on: July 24, 2014, 06:26:34 pm
You will also see the Vsat of the drivers at that current level and realise the chip will
be dissipating 15W or so at that current which is only possible on the version
with a tab if mounted on a large heatsink with a fan or with liquid cooling.

Absolute maximum ratings are not recommended operating conditions, and never have been.
26  Using Arduino / Motors, Mechanics, and Power / Re: Troubleshooting a L293D Circuit on: July 24, 2014, 06:21:59 pm
You perhaps fried it?  Have you connected all the ground pins and added decoupling on
both supplies near the chip?
27  Using Arduino / Motors, Mechanics, and Power / Re: Controlling DC Motors with direct PWM signals? on: July 24, 2014, 06:17:16 pm
Also which motors are you thinking of?  You need to match the motor driver and
supply to the motor, and realise you power it separately from the Arduino.
28  Using Arduino / Motors, Mechanics, and Power / Re: How to Control a Motor that has Been Taken Out of a RC Car with the Arduino on: July 24, 2014, 06:13:29 pm
But first you need to find out how much current the motor takes - motor
drivers like the L293 and L298 have very limited current capability.

Some more information about the car and or motor?  Measure the motor
resistance?
For example, i use a L298N, which can handle a total of up to 4A.. In my opinion this is not a "very limited current capability" ...
Sure it's a good idea  to find out how much current the motor takes, just in case !!!!
Ha, good joke...    No, the L298 will not handle 4A.  Assume each channel will manage 1A
at most and get super-hot doing that.  Sure it can handle 2A peak per channel but without
liquid cooling forget trying to run that continuously, its a darlington-based chip.
29  Using Arduino / Motors, Mechanics, and Power / Re: Does this MOSFET implementation look correct? on: July 24, 2014, 06:10:33 pm
Sorry, I've attached a larger version to the first post which should be better.

Now I can see the diagram you seem confused.

At the bottom left there is a p-channel MOSFETsymbol  labelled "NTR4501N" which is
an n-channel MOSFET.  You also draw the drain to Vcc and source to the load
which is wrong.

You need p-channel device with source to Vcc, drain to the load, to do high-side switching.

A simple hand-drawn sketch would have sorted this all out in the first instance...

This is high-side p-chan switch:


Note the diode is part of the device in all power MOSFETs, and note the direction of the
arrow on the channel which indicates its a p-channel device.
30  Using Arduino / Motors, Mechanics, and Power / Re: Servo motor helppppp on: July 24, 2014, 05:51:21 pm
Sounds like way too much torque for any normal hobby servo.  You need to redesign
your mechanics to be balanced.
Pages: 1 [2] 3 4 ... 780