Show Posts
Pages: [1] 2 3 ... 814
1  Using Arduino / General Electronics / Re: Issues with sensors and external power on: September 02, 2014, 08:46:49 pm
Is the troublesome PSU isolated (floating output)??  Bench supplies usually are(*), eliminating
any chance of ground-loops or ground-mismatch issues.

(*) Though they usually have an optional strap to mains earth.
2  Using Arduino / General Electronics / Re: ACS712 sensor on: September 02, 2014, 08:42:01 pm
ACS71x series are hall-effect current sensors - their outputs are isolated from the
current-carrying terminals, which is good, but they are noisy, much more noisy than
shunt-current sensors, due to the need to ampify small hall-plate voltages.

They do have very low series resistance though, as they consist of a strip of copper
which runs close to a hall-sensor, all moulded into epoxy which provides the isolation.

They are very good at surviving high overload currents that would melt a shunt sensor,
according to the datasheet.

These devices are 5V powered with ratiometric voltage output (some tolerate a 3.3V supply,
some don't, check the datasheet)

They have bigger cousins, ACS756 and ACS758, which are in a package where the
current carrying terminals are thick strips of copper, rated to 200A IIRC.
3  Using Arduino / General Electronics / Re: Can I drive an N-MOSFET with an NPN-Transistor? on: September 02, 2014, 08:32:28 pm
Indeed - the gate pull-up resistor ought to be about 560 ohms - much smaller and it
will get too hot, much larger and the MOSFET will switch too slowly for PWM. 

Values like 10k are only appropriate for switching small loads occasionally.

If you are controlling lots of power (high voltage and high current) then the
safe way to drive a MOSFET gate is with a proper MOSFET driver chip
capable of 100mA or more of gate drive - this is needed to counter the
currents due to the gate-drain capacitance of the device(*).  MOSFET drivers go
up to several amps.

(*) Consider the drain switching 100V in 100ns, and gate-drain capacitance of 50pF,
that's 50mA fed-back to the gate, which would put 28V on the gate if it was driven
through a 560 ohm resistor, causing the gate oxide to fail and the device would
explode (that's how high power MOSFETs fail).

Drive the gate with a 500mA driver chip and that 50mA is comfortably swallowed
up by the driver.

Again consider the 100V circuit is switching 20A, then a switching time of 100ns
means about 30 uJ are dissipated on each switching event, ie about 60uJ per PWM
cycle, which at 10kHz is 0.6W.  If the switching was slow (due to using a largish gate
resistor) that dissipation increases, maybe giving 2us switching time means 12W loss.

A 10k resistor might mean switching time of 20us, which means at 10kHz 40% of
the time is spent actually switching, and losses are measure in 100's of watts.

The moral is do a back-of-an-envelope estimate of switching time and see if its reasonable.
Switching losses are proportional to the load power as well as switching time.
4  Using Arduino / General Electronics / Re: The important of calibration of oscilloscopes. Or not? on: September 02, 2014, 08:13:40 pm
Most oscilloscopes aren't particularly precise in voltage measurements(*), but
time measurements are another matter - 5+ digits of precision in measuring
frequency isn't uncommon, and perhaps 4 digits in measuring time intervals with
a delayed timebase maybe?

In practice quartz crystals are very reliable and timebase drift isn't really
going to happen in a modern scope.

(*) Digital scopes are often sampled at 8-bit resolution for instance.  The analog
circuitry before the sampler is perhaps the weak link - the gain/attenuation
network and anti-alias/equalization filters are crucial and exposed to the
most abuse.
5  Using Arduino / General Electronics / Re: Wiring Capacitors in Series on: September 02, 2014, 08:03:59 pm
Overload large caps and they burst(*), spraying their contents out, usually hot
corrosive contents.

Aluminium electrolytics do this readily if overvoltage, or connected backwards.

Double-layer capacitors (proper name of supercaps) are another form of electrolytic
roughly speaking.

(*) Burst here means explode out of the end, where the can is deliberately
weaken to lessen the violence of the rupture and prevent metal shrapnel.
6  Using Arduino / Motors, Mechanics, and Power / Re: Looking for High Torque Servos. on: September 01, 2014, 09:42:40 pm
The base of a robot arm should have a lower torque requirement that the elbow of the robot arm.

The elbow ( and the shoulder ) have to hold up the entire weight of the arm and provide torque to prevent the end of the robot arm falling down.

On the other hand,  at the base of the arm,   the weight of the arm should be carried by some kind of bearing,   and the servo only has to turn it,   not hold it up.

All the joints have bearings, of course, so that argument seems odd.

The base will have the largest torques as it handles more mass and more reach.  However
a rotation-only base is protected from gravity forces by a thrust bearing, perhaps
that is your point?  Not all arms are like that though. 

Remember dynamic torques have to be handled too so a fast moving
arm will have the largest torques at the base, whatever DoF it has, as
dynamic torques can be far larger than static in such a machine.

Static torque loads are straightforward to calculate, just do the sums once you've
got a good estimate of weights and sizes.  Dynamic torques depend on speed/acceleration
7  Using Arduino / Motors, Mechanics, and Power / Re: PMI motor with arduino on: September 01, 2014, 09:34:50 pm
It operates at 14V ans 47mA supply

Think about that - 47mA for an industrial servo motor....  I don't think so.

Measure the armature resistance - I would expect it to be very low in
this type of motor. 
8  Using Arduino / Motors, Mechanics, and Power / Re: Magic Smoke from ULN2004A from Unipolar stepper motor knob example. on: September 01, 2014, 09:28:33 pm
The motor specs  only mention Voltage not amps.
Nema 17
No. T6718-02   i could not find any information based on these numbers though.
Minebea Co. LTD.

Measure the winding resistance, ignore any voltage specification and trust only
the current rating and your measurement of the winding resistance.  Most stepper
drivers are constant current, not constant voltage.

If your NEMA17 has less than 24 ohms winding resistance its not suitable
for unipolar drive from 12V via ULN2004 as it will overload it.  If its less than
10 ohms its not really suitable for unipolar drive, best configured as bipolar and
driven with a chopper driver.

Remember both the GND and COM terminals of the ULN2004 must be connected
if driving a motor or other inductive load.  The motor positive supply goes to COM.
9  Products / Arduino Due / Re: Due DigitalRead() threshold voltage on: September 01, 2014, 09:17:14 pm
It should be pointed out that the ATmega family of processors happen to have guaranteed
thresholds of 1.5V and 3V when run at 5V, but in general 5V logic systems do not always recognise 3.3V as high.  You go to the datasheet for this information - see
10  Products / Arduino Due / Re: Audio (yes, I know) on: September 01, 2014, 09:13:42 pm
      incomingAudio = (incomingAudio+1)/4 - 1; //scale from 10 bit (0-1023) to 8 bit (0-255)
      if (incomingAudio<0){//deal with negative numbers
        incomingAudio = 0;

can be replaced by
      incomingAudio >>= 2; //scale from 10 bit (0-1023) to 8 bit (0-255)

Using the String class for buffer management is a big fail - replace all the String bashing
with a fixed sized byte array and explicit update along the lines of:
  if (index < MAX_INDEX)
    buffer [index++] = incomingAudio ;

Repeated string concatenation is neither efficient in time nor space, and will
likely just eat up all your RAM.

On the Due their are several ways to get regular sampling, using delayMicroseconds()
is the least best.  You can synchronize to micros(), which is better as its synchronous
to the clock, you can use an ISR from a timer to do the sampling automatically and
fill the buffer autonomously (more precise timing, lets rest of code do other stuff).

You can also configure the DMA hardware to drive the conversion and store the
samples (not scaled, though), completely without CPU overhead, even!  Not
simple to get that working.
11  Products / Arduino Due / Re: DmxSimple on: September 01, 2014, 09:00:20 pm
Be that as it may, do you agree with my assessment that the compilation error shown is due to the OP failing to rename the library folder and trying to compile a library with the folder name :
DMXSerial-master   ?
The error shows that the DMXSerial.h file is being compiled and contains an AVR-specific
reference.  So clearly DMXSerial.h has been found.
12  Using Arduino / Motors, Mechanics, and Power / Re: Driver options for the Nema17 on: September 01, 2014, 11:16:55 am
200 N-m is the spec of a motor capable of ripping your arm out of its socket,
its clearly a mistake - indeed going to the Adafruit site its described as
20 N-cm (ie 0.2 N-m).

NEMA17 steppers generally go upto about 0.4 N-m, NEMA23 to about 3 N-m.
13  Using Arduino / Motors, Mechanics, and Power / Re: Geared Stepper Motor on: September 01, 2014, 11:12:24 am
The Duemilanova came as standard with a 16MHz quartz crystal, so it could be
used to determine accurate times and frequencies.

The Uno comes with a cheap 16MHz ceramic resonator, only accurate to 0.5% or
something like that.   My Uno had space to solder on a quartz crystal in place of
the resonator so I did that, as sometimes you want accurate time.

This is a bit of a step back IMO.  I hope the recent versions of the Uno allow such
a repair job to be performed...
14  Using Arduino / Motors, Mechanics, and Power / Re: Probably an Issue with HG7881 Motor Driver on: September 01, 2014, 11:07:18 am
The issue I have noticed (which can be a very serious one) is that when you drive the motor with an external power supply that has a voltage less than the Arduino Vcc (say 2.5v), the module will start to sink current from the Arduino PWM pins, and can go very high even for a small 3v dc motor.

Yes, this is common in H-bridge chips like this, you have to be sure your motor supply
is present and strong enough to keep the motor supply higher than 5V at all times to
avoid this.

For instance the L298 and L293D chips have this property too I believe.  Couldn't
find the datasheet online for the HG7881 - I personally would be put off using a device
without a datasheet, because there's no way to check if you are using it correctly...
15  Using Arduino / General Electronics / Re: Problems with AREF on: September 01, 2014, 08:21:42 am
The analogReference setting isn't actually used until analogRead() is called,
so at start up the AREF may be unset, but the first call to analogRead will
set it up.

You measure the AREF with shield and your sketch running, you see 5V,

You remove power and shield, power up again, the lack of shield might
cause a different execution path that never calls analogRead() ???

Just one scenario, but all is guess-work without info on the shield and the
whole sketch.
Pages: [1] 2 3 ... 814