Show Posts
Pages: 1 ... 386 387 [388] 389 390 ... 782
5806  Using Arduino / General Electronics / Re: Control very high power LED on: February 26, 2013, 11:30:49 am
At this current and power level a switch-mode supply is not trivial to design (easy to make one that overheats!),
a series power resistor to limit current would be a simpler circuit.

I looked into driving a 100W LED array a little while back and the only high efficiency solution(*) I found involved
a MOSFET bridge driven by the LT3791, a chip that claims upto 98.5% efficiency, but needs a lot of auxiliary
components to do the job - it does have the nice property of not caring it the supply is above or below the LED
voltage.

Some of the SMPS chips allow an external MOSFET switch, which is needed for 3.5A, but I think you really need
synchronous rectification to avoid excessive losses in the schottky diode (several watts at 3.5A).
5807  Using Arduino / General Electronics / Re: Capacitor choice question. on: February 26, 2013, 11:16:44 am
Just a capacitor can't simply solve the problem - a beefier power supply is really needed.

Any capacitor big enough to prevent the voltage drooping at 0.4A for "a few seconds" will
overload the 25mA power supply for perhaps a minute while charging, which may or may not
cause damage (can't tell - the manufacturer of the power supply might know).

Furthermore the only capacitors big enough (several farads) are "super" or "ultra" capacitors,
which only handle about 2.7V or thereabouts.  They are tricky to put in series for higher
voltage as you need to ensure the voltage sharing is kept balanced.

You either want a power supply that can handle the peak current, or you want a battery
which can be trickle-charged from your supply (which means you'll no longer be able to run from
5V, but from the battery voltage).

A USB power supply gives 5V at 0.5A - just what you need...
5808  Using Arduino / Programming Questions / Re: Why use int instead of byte for pin numbers? on: February 25, 2013, 04:27:43 am
People often use int to avoid having to explain more datatypes - byte takes less space and
is perfectly reasonable.  const declarations allow the compiler to optimize the variable away
with luck. Also
Code:
#define led_pin 13
is fine and avoids introducing any variable.
5809  Using Arduino / Motors, Mechanics, and Power / Re: How can I protect my Arduino from current spikes? on: February 25, 2013, 12:39:20 am
If the servos' have a separate supply there won't be a problem - just don't run the Arduino from that supply.
5810  Using Arduino / Programming Questions / Re: Help with multiple millis() on: February 25, 2013, 12:27:02 am
Why do you believe your output pins aren't changing?  I think they are, but you won't see it without
an oscilloscope since they change for about 0.1ms every second.

You have three timer variables yet they run in perfect lockstep since they have the same delay, thus
every time they get to fire up their code sections they all run, leaving both output pins LOW.  Why
three variables?
5811  Using Arduino / General Electronics / Re: Removing Varnish From Very Fine Wires - Best Method? on: February 24, 2013, 03:55:18 pm
If its polyurethane lacquer then beware cyanide in the fumes - a _hot_ soldering iron will both remove the lacquer
and form a smoke plume that will tend to take fumes past your face and traces of cyanide will make your
nose sore - this can't be a desirable thing!

Even with a hot iron the polyurethane layer only peels away slowly so it takes a little patience.  Other materials
may not melt back - they may char a bit (then emery paper will have an easier job removing it).

A butane torch will oxidize the wire so solder may not wet it properly - might as well use emery paper in the
first place.

Commercial approach is a hot solder pot to dip the ends in for a while I believe.
5812  Using Arduino / General Electronics / Re: Reccomend me a good 100ma 12v smd on: February 24, 2013, 03:47:44 pm
What do you mean by "quality" - specification use numbers, not adjectives!   Accuracy, voltage-drop, line and load regulation, temperature
stability...   Unless you have special requirements any linear voltage regulator is likely to work for you.
5813  Using Arduino / Programming Questions / Re: Problem getting AVR interrupts to work as expected... on: February 24, 2013, 03:42:50 pm
You are calling Serial.print in an interrupt routine - that's going to block the other interrupts for ages
(especially at 9600baud).  Much better to busy-wait for the counter in loop() using:

Code:
void loop ()
{
  while (millis () - previous < 1000)
  {}
  previous = millis () ;
  report () ;
}
(This also saves a timer).  If you want more accurate timing then just record the value of pulseCount
in the interrupt routine and call Serial.print() in loop ().

Also this setup code:
Code:
   EIMSK |= (1<<INT0);      // Enable external trigger INT0 - connected to pin 2
   EICRA |= (1<<ISC01);     // Enable trigger on falling edge
is the wrong order - setup the trigger mode before enabling interrupts - otherwise you'll get false or
unexpected triggering - here it may not matter, but in general setup up, then enable.
5814  Using Arduino / Sensors / Re: Frequency input issue for tachometer on: February 23, 2013, 05:22:04 pm
You need to condition the noisy signal better.  I'd propose a low-pass RC stage with a cut-off around 1 to 2 kHz, followed
by a schmitt-trigger to generate clean logic signals.

You should also filter out really high frequencies with a 100pF capacitor directly across the incoming cable (always
worth doing for slow signal sources, such as audio, to cut out most of the radio-frequency interference).

A suitable RC stage would be 10k in series to 10nF to ground - cutoff around 1600Hz.  You also need to reduce to 5V
signal level and feed to a schmitt trigger stage such as a 74HC14 inverter.

Now for the theory:

Logic signals need to transition from LOW to HIGH (or vice versa) very fast (millions of volts per second) - this is
essential for correct circuit operation.  Anything can happen if the signal changes too slowly (many multiple pulses
may be registered, the circuit may temporarily go into a high-current-dissipation state, it may oscillate at radio
frequencies).

Thus a schmitt-trigger gate is needed to clean up the unknown noisy signal before the Arduino.  Schmitt-triggers
clean up any slow transition with positive feedback and guarantee fast transitions (and reject noise spikes completely
below a threshold amplitude).

But you likely have noise spikes from the car ignition all over your signal - low pass filtering can knock the amplitude
of these right down to below the level the schmitt-trigger will recognise.
5815  Using Arduino / Motors, Mechanics, and Power / Re: Can I Connect a DC Motor to the Transistor's Emitter? on: February 23, 2013, 05:05:56 pm
The reason for connecting the motor to the collector is _nothing_ to do with it being a current source.

When you use a transistor in a switching circuit it is not in the linear region and it is not even remotely
like a current source.

The reason the common-emitter circuit is invariably used is to reduce power dissipation in the transistor.
To get the lowest heat wasted in the transistor you must saturate it - which brings the collector-emitter
voltage down to between 0 and 0.2V or so typically.  [thus making it a rather good _voltage_ source]

The emitter follower circuit _cannot_ saturate without running the base circuit from a higher voltage than
the collector.   You get at least 0.7 to 1.1V across the collector-emitter terminals, thus wasting many times
more heat in the device.  In practice the voltage drop on the base resistor makes this worse.

The common-emitter configuration is _trivial_ to saturate, just pass enough current into the base.  Some
modern transistors can saturate down to a few 10's of millivolts with a reasonably large load BTW.
5816  Using Arduino / Motors, Mechanics, and Power / Re: where to find 4-wire suitable steppers? on: February 23, 2013, 04:56:34 pm
With bipolar steppers driven from a chopper drive like the A4988 you'll get faster maximum
step rates with a higher supply voltage - steppers with low inductance windings will be necessary
to get the fastest performance - something like 600 RPM isn't impractical for motors with
winding resistance of an ohm or so - low resistance windings have low inductance because
there are fewer turns. 

Make sure the hold-in torque is substantially larger than your load torque too.

I've got cheap sets of NEMA17 bipolar motors from eBay before.

Finding ex-equipment steppers rated for 600rpm might be rather hit and miss...
5817  Using Arduino / General Electronics / Re: Why do some toggle switches have two pins per point in the circuit ? on: February 23, 2013, 04:39:47 pm
Why is that link a "mailto:" link?!

The reason is a combination of:

2 pins is mechanically weak, 4 pins means more options for routing traces past / through the PCB
real-estate under the switch, some switches with the same footprint will be SPDT and need at
least 3 pins anyway.   There is a cultural bias in favour of rectangles over triangles/hexagons in
engineering too (for instance the standard QWERTY keyboard can be more logically made from
hexagonal keys rather than square, yet hexagonal key switches are never seen)
5818  Using Arduino / General Electronics / Re: Control other circuit with a transistor. on: February 23, 2013, 04:25:33 pm
Connect the optocoupler like the LED - so long as the total current is below 40mA (lets say 10mA for LED, 20mA for
optocoupler), then it will work as you want.

The transistor isn't necessary for a normal opto coupler which wants 10 to 20mA or so.

If a transistor was wanted then you'd need a PNP transistor doing high-side switching of the opto coupler, but
just driving it direct from the pin seems simpler here.

[edit:  doh, what was I thinking, the current flows through the push-button, no need to limit to 40mA, just choose
the right series resistor for 5V and the intended current.  (don't try to share it with the LED's series resistor).]
5819  Using Arduino / General Electronics / Re: Mosfet gate voltage on: February 23, 2013, 10:22:41 am
If you are getting a voltage(*) across the gate resistor then the MOSFET is toast.

(*) for more than a microsecond!

[ edit: MOSFET gates are static-sensitive and you have to be careful when handling them ]
5820  Using Arduino / Motors, Mechanics, and Power / Re: Simple motor question.. on: February 23, 2013, 10:17:15 am
Quote
So the speed and current draw and everything is the same in clock-wise and counterclockwise?

In theory I guess, but I think I have a motor which runs more slowly in one direction. I never investigated further though....

Some DC motors are intended to only spin one way - but most are happy to reverse.  If it goes a noticeably
different speed for the same voltage in the other direction something is wrong, there must be significantly more
friction on one direction, or the commutation point is advanced for greater efficiency with the rated load.
Pages: 1 ... 386 387 [388] 389 390 ... 782