Show Posts
Pages: 1 ... 384 385 [386] 387 388 ... 836
5776  Using Arduino / General Electronics / Re: 298 interface on: June 09, 2013, 05:40:37 pm

Only the least significant bit of count 3 and 4 are wrong.  I could use a tri-state multiplexer/demultiplexer (happen to have a few cd4053's on hand) to swap lsb's output through an inverter when msb is high but that's a whole 'nother chip i'd rather not use. 

No, an XOR gate.  But you need to first generate the 2-bit count - plenty of counter chips in the logic families,
need to first find one with at least two output bits and a count-up/count-down capability (74HC169 ?)  Step signal to the clock,
direction to U/D, lower two output bits (via an XOR gate) give the output signals.
5777  Using Arduino / General Electronics / Re: PCB Trace width question. on: June 09, 2013, 05:21:36 pm
The latter I think.
5778  Using Arduino / General Electronics / Re: Reasons why a LDO would heat up, then burn out? on: June 09, 2013, 05:20:51 pm
That familty of LDO regulators have an absolute maximum input voltage of 6V.   If its designed to work at 5V that's
very close to the edge.  (For instance many 5V regulators handle 17 or 26V inputs).

I think you need much better margin of safety than that - especially if a SMPS is driving it, because of the switching
transients.  The change of load to the DC-DC converter probably caused a wobble that fried the LDO...  (perhaps the
load was ill-behaved - perfectly possible)

Choose a regulator that can handle at least 8 or 9V on the input.  Make sure its got enough input decoupling
5779  Using Arduino / General Electronics / Re: PCB Trace width question. on: June 09, 2013, 03:54:06 pm
Depends what temperature rise you are happy to tolerate.  1 degree is not very much.

Using traces on both sides of the board will not dissipate heat in quite the same way, so it will only be
approximately true that 2 70mil traces are equivalent to one 140mil trace (think surface area). It feels
to me like 2 x 70mil will replace 125mil OK.

Some heat dissipation will be along the traces to the components soldered on.

If ambient goes to 40C, then an extra 5C, let alone 1C isn't v significant.  Some electronics runs a lot hotter.

Rapid thermal variations are the most damaging aspects of temperature management - you get
differential expansion leading to mechanical stresses - often implicated in long term failure modes.
Having a trace vary by 20C on a regular basis would be bad - so although trace width is a flexible
choice you want to try to be conservative - but you can increase that 1C to 2 or 3 I think.
5780  Using Arduino / General Electronics / Re: transistor gain and loudspeaker on: June 09, 2013, 03:43:56 pm
1k base resistor is always a good value. But you must insert a resistor in series with the loudspeaker as well (for example 220ohm).
8ohm loudspeaker is too low impedance to be connected that way.
Or you may use an output audio transformer with 2k:8ohm ratio.
That depends on the transistor, but misses the most important point, a (moving coil) loudspeaker needs
AC drive with no/little DC bias (else it will travel to the end-stops and get hot and distort the
sound).  You thus cannot drive a loudspeaker from a single transistor well - either you have
DC bias (bad) or you have to use a blocking capacitor and need to add a load resistor (inefficient).

This is fundamentally the same reason that a reversing motor cannot be driven from a single
transistor (and needs an H-bridge).  Usually for audio amps a blocking capacitor is used and
only half an H-bridge is needed (ie a push-pull driver, needs 2 transistors).  Bridge-mode
audio amps lose the capacitor and have a full H-bridge configuration (but linear rather than
switching brdige).
5781  Using Arduino / Motors, Mechanics, and Power / Re: Brushless Motor Basic Programming Question on: June 09, 2013, 03:33:22 pm
timer0 controls pins 5,6
timer1 controls pins 9,10
timer2 controls pins 11,3

This is hardware fixed, cannot be changed.
5782  Using Arduino / Motors, Mechanics, and Power / Re: Brushless Motor Basic Programming Question on: June 09, 2013, 08:37:30 am
timer0 controls PWM on pins 5 and 6 but also does the timer interrupts for millis(), so if you change its
clock then mills(), micros() and delay() will stop working properly.

timers 0, 1 and 2 are all different in details.  only timer1 can do more than 8 bits.
5783  Using Arduino / General Electronics / Re: no response from stepper on: June 09, 2013, 08:33:42 am
Have you tried swapping the connections to A1 and A2 over?

That can only change the direction of steps.  Swapping A1<->A2 or B1<->B2 or swapping both As for both Bs will each
change the direction of rotation.  Miswired states have a winding connected to one A terminal and one B terminal,
which is wrong.  A's drive one winding, B's drive another.  Direction can be sorted out in software or by swapping
one winding's wires.
5784  Using Arduino / Motors, Mechanics, and Power / Re: joy stick control of stepper motor on: June 08, 2013, 03:26:33 pm
In software the only feedback needed is the initial determination of the starting position when powered up -
stepper motors (used properly) are open-loop position control, you just keep track of how many net steps.

A single switch is enough to set the home position, if its at the end of travel.  You step the motor in that
direction until the switch activates and then call that position zero (or whatever). Thereafter all is dead-reckoning.
5785  Using Arduino / General Electronics / Re: Why did I burn my TIP120? on: June 08, 2013, 03:12:14 pm

Basically the TIP120 is the wrong thing to use here. You need a logic level FET.

Or a water cooling system for the TIP120, using a tiny little water pump switched by a 2N2222!
5786  Using Arduino / Motors, Mechanics, and Power / Re: Motor/generator control on: June 08, 2013, 06:51:01 am
Some suggestions:
 IRFZ44 isn't logic level transistor, you may need a driver if load current > 1 or 2 Amps.
 Remove serial print from the loop, make debug printing by request from the user via console.
 Look into PID library for arduino.

Yes, looking at the typical output characteristics graph its very marginal at 5V.  You certainly
don't want to reduce the gate voltage below 5V as you have done with the two resistors - place
the 10k resistor on the Arduino pin, not directly on the gate electrode.  But the basic mistake
is using a MOSFET that wants 10V drive at 5V - you need a logic level MOSFET really.

The instability problem is a symptom that your control system is not tuned.  You probably need
to research PID control theory and experiment.
5787  Using Arduino / Motors, Mechanics, and Power / Re: Servo potentiometer glue on: June 08, 2013, 06:44:50 am
In other words calibrate it.
5788  Using Arduino / General Electronics / Re: Two Arduinos hooked up to one mosfet on: June 08, 2013, 06:43:22 am
@fungus, I think I'm gonna pass on that one...

Oh, go on, I'd love to know the amps between two pins.

You've already been doing it for ages ... a few more seconds won't hurt. smiley

Output transistors on an Arduino pin are around 20--40 ohms each IIRC, two fighting each other
is thus 40 to 80 ohms across 5V, so in the ball park of 100mA (absolute max rating is 40mA).

One arduino pin shorting to ground would be twice that current, overloading the output pin
and the power pins of the Arduino I think.
5789  Using Arduino / Motors, Mechanics, and Power / Re: Harvesting steppers and power supply from old printer - stepper running hot on: June 07, 2013, 09:00:20 pm
Yes I expect you're right. I managed to burn out part of the power supply when I left it on too long so that probably wasn't designed to sustain that either.

Is it enough to set all the inputs of the motor to +24v? I'm trying to remember my physics A-level and iirc if there's no potential difference then no current will flow and no power dissipated.

Yes, correct.
5790  Using Arduino / General Electronics / Re: Avoiding High Voltage Spikes from Inductor Coils on: June 07, 2013, 08:56:35 pm
You could add protection or snubber circuit across the inductor (for instance back-to-back zener
diodes, aka TVS diodes, can limit voltage excursions).

Snubber circuits are RC networks designed to both limit the voltage spike from an inductor
and limit the "ringing" of any LC resonance (using just a capacitor would usually lead
to extensive ringing).

When dealing with relays motors etc a simple freewheel diode is used to prevent back EMF
spike on switch-off.

Most scope probes have a "x10" setting (which divides the voltage by 10) - always choose this
if high voltages may be present since there will then be 9Mohms in series with your 'scopes
Pages: 1 ... 384 385 [386] 387 388 ... 836