Show Posts
Pages: 1 ... 231 232 [233] 234 235 ... 836
3481  Using Arduino / General Electronics / Re: Need help isolating a joystick on: January 12, 2014, 06:24:48 pm
No, you cannot blithely force the output, for if the pot and the digipot were at opposite
ends the power supply would be shorted out.

Fortunately joystick pots are normally physically restrained from travelling full range,
which if is the case lessens this difficulty, but you still have the issue of the output depending
on both the physical pot and digipot "positions", whereas you want to strictly override it.

The circuit that springs to mind is add a 10k or similar in series with the wiper on the
physical pot, then use a DAC and an analog switch to override the voltage further "downstream".  Digital pots are rarely needed outside of hifi systems, here a DAC is
a simpler and more capable choice.  The analog switch would be turned on to connect
the DAC output, and then the physical pot would be isolated via the 10k resistor (assuming
the DAC and analog switch have low impedance) and no longer have meaningful effect
on the output voltage.

However the details rely on knowing more details of the circuitry currently in the
3482  Using Arduino / General Electronics / Re: Reducing the time period a motion sensor is on from 5 secs to 0.5 secs on: January 12, 2014, 06:17:57 pm
More information is needed to judge - how is it wired?  what is it?  what is
the relay?  How are the sensor and relay powered?
3483  Using Arduino / General Electronics / Re: MCP4241 Shutdown Pin on: January 12, 2014, 06:13:20 pm
Quick question. I'm working with MCP4241 digital pot IC and it has shutdown pin which disconnects one of the terminals from wiper. But I have no idea how to activate it. Normally I have it connected to VCC (HIGH) but I tried connecting it to Ground  (LOW) and it didn't seem to do anything. It's not immediately clear to me from datasheet how to activate it (or I didn't find it).
When the SHDN pin is forced active (VIL):

VIL means voltage input low.  So its active low.

All (voltage controlled) logic families have VIL/VIH/VOL/VOH specs, an input has
to be below VIL to read low, above VIH to read high.

[also I just checked the datasheet, the signal is clearly active low as it has a line
over the top, which means active-low or negative-logic - this is a standard boolean
algebra convention]
3484  Using Arduino / Motors, Mechanics, and Power / Re: Spurious triggering of servos on: January 12, 2014, 06:05:56 pm

The switched ground wire for the motor runs about 3' directly alongside the control wires for the two servos whose control wires are twisted together.

Even with the servo control wires disconnected at the Arduino end, but with power available to the servos, the running of the motor causes the servos to go to zero positions.  Has anyone experience with control signals being induced from such an arrangement of wires traveling alongside each other?

Yes, running wires in parallel like that where some carry large switched current loads and
the others are sensitive signals is bound to lead to problems.  That's why we use twisted pairs,
screened cable and don't run power wiring alongside signal wiring.

One thing you don't mention is the +12V supply to the motor - this carries the same
switched current as the ground wire to the motor, but in the opposite direction.

If you use twisted pair for those two wires you will greatly reduce the interference they
put out.   Then if you use screened cable and / or twisted pair for the servo signals and
their grounds(*), this will greatly reduce the interference they will pick up.

And keeping the power wiring away from the servo signals will really improve things too.

(*) Each servo signal twisted with its own ground wire, not twisted with each other, and
 only common the grounds at one central point.
3485  Using Arduino / General Electronics / Re: parts for fritzing on: January 12, 2014, 02:49:45 pm
Eagle gets my vote.  Fritzing doesn't seem much better than a toy. I have not seen a good schematic created in fritzing.

I thought it only attempted to do wiring diagrams, not circuit diagrams - hence its
usefulness for teaching.
3486  Using Arduino / Motors, Mechanics, and Power / Re: Erratic operation when motor is supposed to be "asleep" on: January 12, 2014, 02:46:44 pm
All the variables you use to communicate with an interrupt routine must be declared "volatile".

Also you need to turn off interrupts whenever you change these variables from loop(), since
they are int, they are 2 bytes, and the ATmega is an 8 bit machine, so when you change
a 16 bit int you are doing two memory accesses, and the interrupt routine could run inbetween
the write to each byte.

volatile int RED = 0 ;

  noInterrupts () ;
  RED = (int) motor ;  // ensure atomic update of RED.
  interrupts () ;

These are basic rules you always have to follow for using interrupts.
3487  Using Arduino / Motors, Mechanics, and Power / Re: R/C plane - stepper motor or not? on: January 12, 2014, 02:39:07 pm
A heavy-ish stepper motor might be rated at 10W electrical power input, a brushless
RC motor of 1/5 the weight might be rated at 200W or similar - a significant fraction
of a horsepower out of something the size of an egg...

For flight you need outrunner brushless motor with ESC to drive it and a LiPo pack to
power the thing.  No other option comes close to the power/weight ratio really, certainly
steppers are two orders of magnitude out of the running.

Lots of websites out there with more info.
3488  Using Arduino / Motors, Mechanics, and Power / Re: 10 pound motor on: January 12, 2014, 02:30:15 pm
There seem to be two threads on this problem - its unhelpful to split a thread like this,
no idea which one to respond to.  Mark one as "solved" or something?
3489  Using Arduino / Motors, Mechanics, and Power / Re: motor that can pull 40 pounds on: January 12, 2014, 02:28:35 pm
Motors have speed and torque ratings, do you know what speed and torque you need?
Gearboxes allow trading one for the other, at the expense of reduced efficiency (friction

If you don't know how to do mechanics calculations you could try describing the
physical arrangement/dimensions of any existing wheels, axles, gears, etc.
3490  Using Arduino / General Electronics / Re: comms using a current loop on: January 12, 2014, 02:23:02 pm
current loops are relatively immune to capacitive interference, which is high-impedance,
because its a low-impedance technique, but that won't protect it from inductive interference
per-se, its being a high-voltage signalling scheme that does that.  So current loops running
at 20V or so are going to withstand loads of full-on EMI, but at a cost of lots of power

A differential signalling scheme is probably a better performer, since cancelling out
interference to a first-order allows lower voltages and currents for the same robustness.

(PS the name is a bit odd really, all circuits are current loops!)

3491  Using Arduino / General Electronics / Re: parts for fritzing on: January 12, 2014, 02:12:45 pm has a forum, that's the place to ask once you've checked out

I think fritzing is useful for teaching, but wouldn't use it for my own purposes, circuit
diagrams are the language of electronics and the sooner you get to grips with them
the more your understanding will deepen.
3492  Using Arduino / Motors, Mechanics, and Power / Re: H-bridge BJT problem on: January 12, 2014, 06:12:28 am
Here's a BJT H-bridge circuit - note the two auxiliary transistors than turn on a pair
of high-side and low side switches together (so only two control wires needed) and the
bridge rectifier providing all the flyback diodes in one package smiley

Yes the layout is odd, the arms of the bridge are crossed over X-style in the middle,
and you have to tune the values of R5 and R6 according to the supply voltage and
the gain of the transistors.

The two control lines must not be pulled HIGH simultaneously, this circuit has
no shoot-through protection for that.
3493  Using Arduino / General Electronics / Re: Need some help with arduino wiring on: January 12, 2014, 06:04:48 am
The diode across the relay contacts has to momentarily conduct the same current
as operates the relay - any diode that can handle a pulse current rating the same or
larger than the relay will do, 1N4001's are easy to find, will work up to 1A continuous.

Without the diode the inductive kick-back from the relay coil will destroy the rest of
your circuit, it is never optional.  It goes across the relay in the direction that does
not normally conduct, its only when the coil is switched off that it springs into action
saving the rest of the circuit from high-voltage.

Many relays require more current than an Arduino pin can supply, in which case a
transistor will be needed to boost the current, this is a common circuit question
search these forums for examples.
3494  Using Arduino / General Electronics / Re: USB not supporting enough power. on: January 12, 2014, 05:58:57 am
There's no datasheet for the transmitter it seems - have you tried to measure the
current consumption for it? (Though I'd be surprised if it was even approaching 0.5A).

A photo or diagram is far more informative than an attempt to describe a circuit in
words I find.
3495  Using Arduino / Programming Questions / Re: confused beyond belief on: January 12, 2014, 05:51:52 am
Opening a file for write shouldn't allow reading at all.

Firstly the code is poorly indented and hard to read - suggest you move all
the parsing code into separate routines, one for reading bool, one for int, one
for string, and write very simple test code for each separately using a simpler
test files and get each working independently first - then reconstruct your
file parser in terms of those routines.

Don't open the file for write if you are going to read it, complete red-herring.

Oh yes, and liberally sprinkle your code with Serial.println() debug statements
so you can see what is really going on, remove only after testing is complete.
Pages: 1 ... 231 232 [233] 234 235 ... 836