Show Posts
Pages: 1 [2] 3 4 ... 40
16  Using Arduino / Sensors / Re: ACS712 problem when sensing an inductive load. on: December 22, 2012, 01:29:57 am
what if u take 1000 samples per second?

what is the minimum?

what is the arithmetic mean of the samples of 1 second (i think that is what the DC amp meter measures)?
http://en.wikipedia.org/wiki/Arithmetic_mean
17  Using Arduino / Sensors / Re: ACS712 problem when sensing an inductive load. on: December 21, 2012, 01:21:14 am
what if u measure the ACS' output over a second and print minimum and maximum?

the ACS should b able to show u the current with a quite high resolution (100kHz, i think)...
18  Using Arduino / Sensors / Re: Arduino to sleep: wakeup on external interrupt OR timer > 8s on: December 21, 2012, 01:17:36 am
ok... smiley
r u sure that ur RF routine is not interrupt proof?
but it looks like u cant really miss a PIR interrupt very often...
19  Using Arduino / Sensors / Re: Creating a sensor to measure when hand is close to face on: December 19, 2012, 12:50:38 pm
what about a necklace (around the throat) that detects some RFID like thingy, that is attached to the wrists? smiley
http://playground.arduino.cc/Learning/PRFID

according to en:WP they can b read from 10cm to 10m...  smiley-lol
http://en.wikipedia.org/wiki/Rfid
20  Using Arduino / Sensors / Re: Arduino to sleep: wakeup on external interrupt OR timer > 8s on: December 18, 2012, 03:57:32 pm
why do u detach and attach the interrupt handler?
cant u just attach the interrupt handler once in setup()?
21  Using Arduino / Sensors / Re: Arduino to sleep: wakeup on external interrupt OR timer > 8s on: December 17, 2012, 05:32:42 am
1.
isnt the power consumption the only reason for all this? :-)

2.
would it b ok, if it just sleeps 16msec and then looks, if the PIR acts up?
i mean: no other interrupts but the watchdog interrupt?
ur timing would b more accurate then even if the PIR is upset...
or is the PIR signal too short?

3.
what about this structure (in PSEUDOCODE):
Code:
void setup() {
attachInterrupt to function handler()
configure watchdog to 8SEC interrupt mode (no reset)
}

uint8_t workpending=0;
void handler() { workpending=1U; }

void loop() {
  for (uint8_t i=0U; i<(5U*60U)/8U; i++) {
    cli(); // no interrupt can b missed now
    if (workpending) { workpending=0; and do the PIR work now }
    power save (ADCSRA=0, ACSR=1<<ACD; PRR)
    // PIR interrupt is already enabled in setup();
    sei(); // pending interrupts will b processed after next instruction, so we dont sleep forever
    asm("sleep\n"); // wakeup after 8SEC or after PIR interrupt
  }
  read the sensors after about 5 minutes (there is not way to say, how many seconds of sleep we skipped due to the PIR interrupt - or u check the WDIF after sleep...)...
}
22  Using Arduino / Sensors / Re: Arduino to sleep: wakeup on external interrupt OR timer > 8s on: December 16, 2012, 01:57:19 pm
1.
ur
Quote
"for" loop to sleep longer (38 times to be extact)
needs to check for a pending interrupt... smiley
in case of a pending interrupt it should break, so that interrupt handling can take place...

2.
why do u want to sleep more than 8sec?

3.
how much current does it draw when it is not sleeping?
what sleep mode does that library use?
there r different sleep modes: idle (mA), adc (mA, but less noise than idle) and deep (uA)...
23  Using Arduino / Sensors / Re: 1 TRX to 2 RX on HC-SR04 on: December 15, 2012, 04:53:42 am
Hi!

what if u use the same sketch as yesterday?
then u could find out, if  it is the wiring or the sketch...

Have fun...
24  Using Arduino / Sensors / Re: TMP36 sensor working fine or damaged? on: December 15, 2012, 01:10:22 am
i would not use that AREF pin, because it can damage the arduino:
http://arduino.cc/en/Reference/AnalogReference?from=Reference.AREF

analogReference(INTERNAL) is safe and quite (but not very) temperature stable... smiley

the cap close to the TMP36's power pins could help to reduce jitter, if the power supply cables r very long (>20cm), i guess...
if they r short, arduino's capacitors will b sufficient...
25  Using Arduino / Sensors / Re: Native Capacitive Touch - Arduino Nano on: December 14, 2012, 05:43:06 pm
LOL  smiley-lol
26  Using Arduino / Sensors / Re: Native Capacitive Touch - Arduino Nano on: December 14, 2012, 02:33:36 pm
u can use other pins?
or did u already use them all?
27  Using Arduino / Sensors / Re: Native Capacitive Touch - Arduino Nano on: December 14, 2012, 01:09:42 am
pins A6 and A7 r no digital pins, IIRC...
they r just connected to the ADC MUX...
28  Using Arduino / Sensors / Re: PIR interruption which makes arduino go back in setup() function on: December 13, 2012, 04:05:01 pm
1.
u r inside an interrupt routine and use these vw_...() routines...
can u just set that interrupt flag and do the real work in the loop() function?

2.
what if u just toggle the LED_PIN in that interrupt routine?
will it reset then 2?
29  Using Arduino / Sensors / Re: TMP36 sensor working fine or damaged? on: December 13, 2012, 03:45:09 pm
1.
u could use some more of them and c if the "fried" part is far away...

2.
some devices have internal protection diodes and the arduino has a fuse that shuts down at about 1A and the USB bus possibly shuts down already at 500mA...
so it might b, that ur part just got hot and didnt suffer any damage...

3.
did u try what it says about the temperature in 10cm distance of a light bulb?
or close to a cup of coffee (but dont contaminate the cup with the part's "sweat"...)? smiley

4.
i just read in the datasheet that up to +/- 3°C r within specification...
+/- 1°C is typical though...

have fun...
30  Using Arduino / Sensors / Re: TMP36 Brownout possibley killed it on: December 12, 2012, 03:52:44 pm
is 664mV a little low for 21°C?
it should b 500mV + 21°C * 10mV/°C, right?

what does ur analog pin say, if u connect 3V3 to it via a 100kR resistor?
u can measure the voltage over that 100kR resistor then... smiley

if DC42 is right, u can even say the resistance that disturbs the measurment...
Pages: 1 [2] 3 4 ... 40