Loading...
  Show Posts
Pages: 1 ... 385 386 [387] 388 389 ... 442
5791  Using Arduino / Programming Questions / Re: Variable not declared in scope on: March 30, 2011, 07:02:17 pm
In other words spell 'val' with a letter l not a digit 1...

Also you can't use print or println with lots of values - the print library has to be tiny.

You can be much more concise with the boolean expression in the 'if':
Code:
  if ((val1==HIGH) || (val2==HIGH) || (val3==HIGH) || (val4==HIGH) || (val5==HIGH) || (val6==HIGH) || (val7==HIGH))
Code:
  if (val1 || val2 || val3 || val4 || val5 || val6 || val7)
HIGH is treated as true and LOW as false.
5792  Using Arduino / Project Guidance / Re: Compact rechargeable power for LED array on: March 30, 2011, 06:55:59 pm
Quote
Should you drive all 25 leds continuously at full power, they'll draw a current of 25 x 60 = 1500 milliAmperes, or 1.5 amperes an hour.

Quite a lot of NIMH-AA batteries can deliver up to 2700-3000 milliamperes. The arduino itself does take a few mA as well, but that's probably not worth counting.

I think this is confusion between current and capacity.  A batteries capacity is measured in mAh or Ah, which is really a measure of charge, not current.  A 2700mA hour NiMH AA cell can provide 270mA for 10h (capacities are usually quoted at the 'ten hour rate' - run down a battery really hard and its capacity is reduced (and it may be damaged permanently).  It does not follow it can provide 2.7A for 1 hour. It does not follow that it can provide 2.7A at all (it probably can, but at reduced voltage and generating a lot of heat in its internal resistance).

For completeness 1mAh = 3.6C (coulombs - one amp for one second = one coulomb)

Also good luck finding a battery holder that can take that sort of current - cheap ones use rivets and steel springs and can both lose a lot of voltage and be unreliable at high currents.  There are more expensive rechargeable cells with solder tags and proper data sheets for industrial use - might be worth considering.
5793  Using Arduino / Installation & Troubleshooting / Re: C106 CAPACITOR on: March 30, 2011, 06:37:28 pm
106 is the value in pF (10x10^6 - ie 10uF).  Its C19 on the schematic, the electrolytic decoupling capacitor for Vin.  If you are powering via Vcc its not used.  I suspect any value from 1uF up ceramic or electrolytic would be fine so long as the voltage rating is enough for your Vin.
5794  Using Arduino / Installation & Troubleshooting / Re: Inputs always high on: March 30, 2011, 06:29:06 pm
What is generating the stop signals to these pins?
5795  Using Arduino / Motors, Mechanics, and Power / Re: Quick input voltage question. on: March 29, 2011, 08:24:55 pm
The barrel jack is on the input side of the regulator so it needs 7V+ (in fact it connects to Vin via a reverse-protection diode) - the board auto-switches between USB and regulator as needed.
5796  Using Arduino / General Electronics / Re: Beginner Buzzer Question on: March 29, 2011, 08:14:23 pm
Firstly its a 12V buzzer.  Secondly red is positive, black is negative.  Thirdly what current does it take?
5797  Using Arduino / General Electronics / Re: Level shifter - suitable through hole MOSFET? on: March 29, 2011, 08:07:03 pm
Nearly all small signal MOSFETs are surface mount these days by the look of it - coudn't see anything at Farnell.
5798  Using Arduino / General Electronics / Re: Ardunio relay module wiring on: March 29, 2011, 08:02:02 pm
You appear to have an NPN transistor with its collector at the most negative potential in the circuit - that doesn't look right.
5799  Using Arduino / General Electronics / Re: Grounding problem? on: March 29, 2011, 07:57:32 pm
The cause of the interference is probably you!  If your near some mains wiring you can pick up dozens of volts or so at very high impedance and this is then inducing a fraction of a volt in your circuit because its relatively high impedance too.  You can reduce sensitivity to this AC pickup by sampling the piezo element at exactly the mains frequency...
5800  Using Arduino / General Electronics / Re: Control charger with NPN-Transistor on: March 29, 2011, 07:51:05 pm
That circuit is best controlled with a PNP transistor to do high-side switching before the regulator.  However you'll need an NPN to shift logic levels up to whatever Vin is.

There is probably a much better way to control that constant current circuit directly at the sense terminal of the regulator.
5801  Using Arduino / General Electronics / Re: Current question on: March 29, 2011, 07:46:51 pm
Never ever seen decagrams or hectograms in UK, nor on any food packaging around Europe - I think this is probably very culturally specific.
5802  Using Arduino / Motors, Mechanics, and Power / Re: Control speed of DC Motor with potentiometer on: March 29, 2011, 07:38:20 pm
You seem to have a freewheel diode in the wrong place - needs to be across the motor.
5803  Using Arduino / Motors, Mechanics, and Power / Re: PMDC Motor Pwm Problems Using Igbt on: March 29, 2011, 07:35:28 pm
Can't see anything but ads and popups on that site, please don't link to pop-up sites ITS VERY ANNOYING.
5804  Using Arduino / Sensors / Re: ADXL335 output signal on: March 29, 2011, 12:15:42 pm
Schematic?
5805  Using Arduino / Programming Questions / Re: Problems when combining servo and pump codes on: March 29, 2011, 12:11:19 pm
I'd just put:
Code:
outputValue = sensorValue >> 2 ;
Or if using map I'd #define all the constants:
Code:
outputValue = map (sensorValue, SENSOR_MIN, SENSOR_MAX, PWM_MIN, PWM_MAX) ;
Pages: 1 ... 385 386 [387] 388 389 ... 442