Show Posts
Pages: 1 ... 384 385 [386] 387 388 ... 697
5776  Using Arduino / Project Guidance / Re: Quadcopter on: October 13, 2012, 06:29:35 am
In fact mount accelerometer as close as possible to the centre-of-mass - this is the point the craft will turn around naturally - so you have to compromise if you have a variable payload (such as a camera mount).

Gyros aren't nearly so sensitive to being off-axis.
5777  Using Arduino / Programming Questions / Re: Inline Assembler; "Impossible constraint" for byte value > 127 on: October 12, 2012, 05:09:58 pm
That suggests that instruction takes a _signed_ byte offset, so the value cannot be more than 127.  Replace "byte" by "char" and 128 by -128 (unless you want +128 in which case perhaps a different instruction sequence is needed?)
5778  Using Arduino / General Electronics / Re: timing and decoupling on: October 12, 2012, 04:45:27 pm
The timing change suggests something different is happening at power-up-reset - the bootloader looks at the serial to check for an upload, potentially this could be affected by noise on that line, which in turn might be affected by capacitance, ground-plane, etc.

If you are using the 328p standalone it won't have anything connected to the RX pin (pin 0), so it will be floating and sensitive to the environment - try a 10k pull-up resistor from pin 0 to +5V maybe ?
5779  Using Arduino / General Electronics / Re: rc snubber networks/ac filter caps on: October 12, 2012, 04:36:06 pm
You ideally need to know the inductance of the load before choosing RC component values - the idea is that the RLC circuit formed when the contacts open absorbs the stored energy without going too high in voltage, and doesn't conduct significant current at mains frequency (the load is supposed to be off...).  The voltage will still go quite high, but much less rapidly, allowing the contacts to separate before an arc can establish itself.

The resistance of the load is in series with any extra R you provide so that you take the sum of those resistances into the calculations.
5780  Using Arduino / Project Guidance / Re: SICK sensor and AD wobble on: October 12, 2012, 03:57:09 pm
If your requirements are so close to the resolution of the ADC that a variation of one or two is important to you, you probably need to use a more precise ADC.

Under battery power the ADC is pretty well behaved (certainly noise below 1 lsb) - I suspect this is power supply noise - is the PSU a switching one?  Extra decoupling can help.
5781  Using Arduino / Project Guidance / Re: Which Arduino Board(s) is/are right for me? on: October 12, 2012, 03:52:21 pm
Well a lot of those motors are just switched on and off, so remote relays or MOSFET switches would probably be the simplest way to drive those (keeping all the high current switching away from the Arduino).  Signal cable runs should be shielded or twisted pairs or both.

Are the LED strips to be PWM'd or just switched on/off?

You might benefit from extra input/outputs, suggesting a Mega perhaps.

You'll need to be careful to how everything's powered - separate power for Arduino - and how everything is grounded.  Are the motors large?
5782  Using Arduino / Project Guidance / Re: Which boards to use for multy drop sensor network? on: October 12, 2012, 02:56:08 pm
Sounds like you are wanting a lightweight networking protocol, using the physical layer as an ether (in the original sense of ethernet!).  So some sort of collision-detection or retry mechanism is needed.  Just make sure the physical layer can handle collisions without damage.

You might want to look at some of the simple packet schemes used in RF transceiver modules such as the nRF24L01+  - you then have a framework that could be easily switched from wired to wireless.  There are no doubt a handful of relevant open-source networking protocols to look at that could be suitable.  Have a look through the forum archives esp. the networking/protocol/devices forum I guess.
5783  Using Arduino / Programming Questions / Re: Why are Float points not working? Short Servo Example on: October 11, 2012, 07:48:32 pm
If it was working and the code hasn't changed then it must be the hardware.  If the code has changed then look at what was changed.
5784  Using Arduino / General Electronics / Re: 16 Channels of 15V Analog Inputs... Any Suggestions? on: October 11, 2012, 07:44:23 pm
Where did I explicitly or implicitly suggest that the divider was significant source of noise, or for that matter even address it?  My concern was always about how reducing the voltage range makes the analog signal more susceptible to externally generated noise (e.g. from EMI), not the amount of noise generated internally by the circuit.

But the divider might reduce the impedance by a factor of three - thus 3 times less susceptible to capacitive pickup...

EMI will be picked up externally from long cables and the environment principally - assuming you've got good ground-plane in the multiplexer circuit you've got control of the pickup there, so a divider isn't going to be the place noise enters the system, except of course if the thermal voltage noise becomes an issue (if you were amplifying microvolt AC signals rather than measuring 15V DC then I would be much more worried about noise).

Without know the input and output impedances and noise sources your original paragraph seemed a very specious argument for avoiding a divider circuit - certainly there's no automatic factor of three involved in precision.
5785  Using Arduino / Sensors / Re: Strain Gauge to INA125 Troubles on: October 11, 2012, 07:34:57 pm
No, its just that the zero-point isn't within the output voltage range of the amp - you need to trim the bridge offset to get it within the active range - various trim circuits are out there on the web, might be as simple as one potentiometer.
5786  Using Arduino / Project Guidance / Re: Which boards to use for multy drop sensor network? on: October 11, 2012, 07:31:42 pm
485 is just a physical layer - protocol is up to you - also lots of driver chips available, dual and quad packages too.  Its fairly power hungry though using full-swing differential signals into 100 ohm loads, a LVDS chipset would improve on that markedly.

For low signalling speeds serial is still attractive, but long runs could introduce problems with mismatched grounds.  If you low-pass filter and then schmitt-trigger you can clean up a lot of noise pick up if only needing low baud rates.
5787  Using Arduino / Sensors / Re: Stabilize analogRead? on: October 11, 2012, 01:43:24 pm
Yes, almost certainly you didn't common the grounds - you can't measure anything if there isn't a reference point.
5788  Using Arduino / Sensors / Re: Capacative Pressure Sensor on: October 11, 2012, 01:34:47 pm
Yes, sounds pretty plausible - you could use a capacitive bridge using the sensor and a fixed capacitor of roughly equal value.

join the two capacitors and connect to an analog input.  The other lead of each cap goes to a digital pin via a 150ohm resistor, and you feed the digital pins in anti-phase.  To centre the analog pin connect it to both GND and 5V via two 10M ohm resistors.

The amplitude and phase of the signal on the analog pin depends on the relative capacitance values.  Code something like this might do the job (well I haven't tested this, so a pinch of salt advised):
void  loop ()
  digitalWrite (dpin1, LOW) ;
  digitalWrite (dpin2, HIGH) ;
  int difference = analogRead (apin) ;
  digitalWrite (dpin2, LOW) ;
  digitalWrite (dpin1, HIGH) ;
  difference -= analogRead (apin) ;
  if (difference > threshold)
    digitalWrite (outpin, HIGH) ;
    digitalWrite (outpin, LOW) ;
5789  Using Arduino / General Electronics / Re: 16 Channels of 15V Analog Inputs... Any Suggestions? on: October 11, 2012, 01:19:17 pm
That is why they have a thing called a voltage divider.

That's possible of course, but precision is potentially going to take a big hit even before the resolution of the ADC is factored in.  From the perspective of the signal's information content a voltage divider going from 5 to 15 V down to 0 to 5 V means there will be roughly three times less usable information detectable in the output signal.  For some applications that's not a problem, for others it will be.  Instead, I would check to see if there is an affordable ADC chip/module that can handle the orignal input voltage and output serial communication of some sort at 5 VDC.  

I'm afraid you are wrong in nearly every detail in that paragraph!

Firstly information is a logarithmic measure so a loss of a factor of 3 in precision is a loss of 1.6 bits of information.  Given a good ADC can give 20 bits, that would be only a loss of 8% information (18.4 bits / 20 bits).

Secondly a voltage divider doesn't throw away information like that - you need to know the signal/noise ratio and bandwidth of the source and the actual resistance values and their temperature, then you can calculate degradation in signal/noise ratio.  If the source is already noisy the potential divider might have almost no effect.  If the source is clean and low-impedance then a high-resistance voltage divider might be injecting massive amounts of noise compared to the source.

Resistors generate voltage noise proportional to temperature and to the square-root of the resistance value and to the square-root of bandwidth.

Thirdly the ADC might be introducing quantisation noise that's far greater than the signal noise - in which case everything else would be academic.  If you are only using a 8 / 10 / 12 bit ADC its likely to be the dominant source of error.
5790  Using Arduino / General Electronics / Re: 16 Channels of 15V Analog Inputs... Any Suggestions? on: October 11, 2012, 01:05:04 pm
AS to voltage dividers has anyone considered that an op-amp can have less than unity gain, that they make great attenuators as well and handle +/- 15 Vin as well? at ANY input impedance? 10 ohms to a T ohm are readily possible.


Non-inverting attenuation is easier as buffer followed by voltage divider.  Attentuating op-amp configuration is inverting so has finite input impedance.

Pages: 1 ... 384 385 [386] 387 388 ... 697