Show Posts
Pages: 1 ... 231 232 [233] 234 235 ... 805
3481  Using Arduino / Project Guidance / Re: Backup Battery on mains failure on: December 19, 2013, 12:44:59 pm
With most multimeters with both a low current and high current socket you have to
ensure the correct range is set for the socket you are using, the meter is actually just
reading a voltage across a shunt resistor network.  Use the 2000mA range with the
10A socket and the result is meaningless.

The high current shunt cannot be switched since the voltage across the switch would
massively reduce the accuracy of the reading and the high current would rapidly
destroy the switch contacts, hence the separate socket to plug the probe into.
A 10A shunt might be a few milliohms only.
3482  Using Arduino / Project Guidance / Re: Hantek 6022BE, good for beginner? on: December 19, 2013, 12:38:01 pm
I've seen some rather mediocre reviews: See reply #12 at http://www.eevblog.com/forum/testgear/hantek-6022be-20mhz-usb-dso/msg258456/#msg258456

20MHz isn't great - a secondhand 50+MHz scope would be preferable if you can afford the
space.  eBay can be very handy at times.


3483  Using Arduino / Project Guidance / Re: Arduino clock/gate modules for analog synths - Am I doing good? on: December 19, 2013, 12:26:57 pm
The transistor/diode inverter circuit sounds OKish, but if the
incoming signal is slowly varying you may get multiple triggers.

Feed incoming signal via 10k resistor to input of a 74HC14 inverter,
add two schottky protection diodes from that input to 5V and GND to
prevent exceeding the 0..5V range.   Now the output from the 74HC14
is a clean fast logic signal and the hysteresis in the '14 should prevent
multiple transitions.
3484  Using Arduino / Project Guidance / Re: Generate Reference Signal 0.5 Vrms and 60 kHz using Arduino on: December 19, 2013, 12:19:37 pm
1. - you haven't said whether this is sinusoidal or square.  You can't generate sinusoidal
easily - an analog filter would be needed.  The current Uno's use ceramic resonator
rather than quartz crystal so the output won't be very frequency-stable either should
that matter.

2. No, the Arduino cannot amplify a signal.   AD620 doesn't have anything like the
bandwidth needed to amplify 60kHz signals without phase error, no use for phase
measurements (its designed for very low frequency use only).

3.  You'd need an external phase detector, or else ADCs capable of synchronous sampling at
MHz rates, followed by digital phase estimation.  Only the Due could get close to the latter,
and it wouldn't be trivial.

I think you are trying to replace precision analog test kit with the wrong tool.  A high
performance DSP with high-speed ADC is kind of what you'd need to do this in the
digital domain.  A one degree phase shift at 60kHz is 40ns or so, and as I understand
it dielectric loss tangents are very small phase shifts.  Or are you looking at more
tractable shifts?

3485  Using Arduino / Project Guidance / Re: Arduino attachInterrupt() sesitivity on: December 19, 2013, 12:01:40 pm
Hi everyone,

I'd like to know the sensitivity of the interrupt.

Say if I use attachInterrupt(INT0, ISR, CHANGE)
What is the bandwidth based on which the Arduino can tell if there is a change?

Thanks.
Looking at the synchronization circuit in the datasheet section 12.1 it looks as
a pulse of 1 clock cycle or more is guaranteed to be detected, shorter ones may
be detected (depending on when they fall compared to clock edges).

There is no noise-filtering so you have to provide a clean logic signal to the pin
to avoid spurious triggering.
3486  Using Arduino / Project Guidance / Re: Questions of a newcomer [ESC, digital/analog IO] on: December 19, 2013, 11:53:24 am
RC ESCs are driven just like RC servos and this means using the Servo library
on Arduino.  On the Uno the Servo library can drive up to 12 pins independently.

With the Mega 2560 you get a lot more pins and the Servo library can drive up to
48 of them IIRC.

The Due isn't appropriate for talking to servos or ESCs directly as its 3.3V only.

For more general IO pins it is possibly to add extender shields using shift
registers or other chips to enable many more pins to be controlled (or sensed),
but you pay for this with less bandwidth available per pin.

Most Arduino boards have several analog inputs, and several PWM outputs,
but not true DAC outputs (Due being an exception).
3487  Using Arduino / General Electronics / Re: Broken H-Bridge? (SN7544) on: December 18, 2013, 09:33:22 pm
So that means the motor is getting 7.4 - 0.5 = 6.9V then?  Have you measure voltage
at the motor terminals, at the supply, actual supply current?  Double checked all the
connections/wiring?
3488  Using Arduino / General Electronics / Re: Lithium cells / batteries. More efficient to step-up or step-down on: December 18, 2013, 09:31:01 pm
My gut reaction is that having a single cell is going to simplify things(*) even if it doesn't
bring any efficiency improvement - at the expense of less endurance.

(*) no charge balancing needed, fewer mechanical connections, simpler to monitor
one cell.
3489  Using Arduino / General Electronics / Re: DIY Solder Glue for Silicon, Nickel, Aluminum, Copper, etc. on: December 18, 2013, 09:26:34 pm
Hmm, interesting about PVA + solder paste...  Could it be mixed in some sort of
extruder?
3490  Using Arduino / Programming Questions / Re: 'Smoothing' example yields negative numbers with greater numReadings on: December 18, 2013, 09:17:28 pm
For first order systems the time constant is the time to drop by a factor of e (base of
natural logarithms).
3491  Using Arduino / Programming Questions / Re: large array compiler error - Trying to load image into Flash on: December 18, 2013, 07:48:36 pm
Array indices limited to int16 isn't unlikely on an 8 bit processor with 8K of SRAM.  Suspect
it needs to be broken up to be stored.
3492  Using Arduino / Programming Questions / Re: accumulate time an input is state HIGH on: December 18, 2013, 07:40:43 pm
The state-maintenance for this sort of thing could be done in an external interrupt or
a pin-change interrupt, then loop() won't have to check the pin at all.

Here its pin 3 which is external interrupt channel 1, so attachInterrupt could
be used
Code:
void setup()
{
  startTime = millis () ;    // in case pin 3 already high
  attachInterupt (1, handler, CHANGE) ;
}

void handler ()
{
  if (digitalRead (3))
     startTime = millis();  // store the time
  else
     add_duration (millis () - startTime) ;  // however its done
}
3493  Using Arduino / Programming Questions / Re: Problem writing high byte on: December 18, 2013, 07:34:05 pm
The 16 bit counter modules have a special arrangement so that they can be atomically
written and read - to get this to work properly they must be read or written in pairs in
the right order (see datasheet).

The C compiler should be providing a 16 bit pseudo-register for you (and compiling
the access as the right two 8-bit accesses).  Thus from C code its a 16 bit register
(unless you try to access it both in an interrupt routine and from the main code -
in that case you have to disable interrupts around the accesses in the main code).

The original problem seems to be an issue with the compiler, therefore (no interrupts
are involved in the example given).
3494  Using Arduino / Programming Questions / Re: 'Smoothing' example yields negative numbers with greater numReadings on: December 18, 2013, 07:29:41 pm
You can also use digital filtering to get a smoothed value without needing the array.

The classic first-order low pass filter is:

Code:
float smoothed = 0.0 ;

void handle_sample ()
{
  float val = (float) analogRead (..) ;
  smoothed += 0.01 * (val - smoothed) ;  // for a time constant of 100 samples or so
}

So although this uses floats it only requires a few operations per sample to
give smoothing over almost any timescale you want (use 0.1 for ten samples or so,
0.001 for a thousand...).

It can be done using fixed-point or integer arithmetic but you have to worry about
rounding and suchlike.
3495  Using Arduino / General Electronics / Re: Advise needed: How to verify a 2.7v "500F" Capacitor on: December 18, 2013, 07:17:34 pm
That's likely the working voltage, not an absolute maximum.  (Check any datasheet
carefully though)

The working voltage is the voltage the capacitor should be able to stand in normal
operation.  Absolute maximums are stresses that start to cause permanent damage.

You'd never want to take a component upto its abs max if you can help it, you'd
be happy to run a capacitor at or very near its working voltage (except for tantalums).

Since dual-layer caps are designed expressly for energy storage it makes sense
to take them to their design voltage to make most use of your investment.

Using them at rather lower voltages will reduce the leakage current, IIRC.

BTW a 500F 2.7V cap will be storing 1.8kJ, which is a lot of energy, don't leave it
charged up with bare terminals, its easily enough to start a fire if accidentally shorted.
Pages: 1 ... 231 232 [233] 234 235 ... 805