Show Posts
Pages: [1] 2 3 ... 40
1  Using Arduino / Sensors / Re: HMC5883L magnetometer problem on: February 20, 2013, 01:13:28 am

HMC5883L compass;
u get a fresh instance of HMC5883L.

And here in setup()
 Serial.println("Constructing new HMC5883L");
 compass = HMC5883L(); // Construct a new HMC5883 compass.
u overwrite it with a second instance.

I think now u have 2 instances that deal with the same chip...

Did u try to test ur chip again without ur software changes?

2  Using Arduino / Sensors / Re: L3G4200d on: February 16, 2013, 01:08:31 am
is the power supply stable? smiley
r there enough capacitors near that chip?

u could ask the manufacturer, what may cause that f√ľnny behavior...  smiley-grin
3  Using Arduino / Sensors / Re: linear light sesnor help on: February 09, 2013, 05:45:52 am
what is bad about keeping the intensity constant at one point somewhere inside the room?
preferably a point that doesnt get direct sun light...

u could use a simple LDR and measure its resistance and keep that resistance constant by giving more or less extra light...

or  an even cheaper photo diode (but i dont know what circuit u need for that):
4  Using Arduino / Sensors / Re: linear light sesnor help on: February 09, 2013, 01:16:05 am

Why dont u just use
a photo diode, that u place at a point that should have a constant brightness,
a comparator (either digital or analog), that tells the arduino if u need more or less artificial light?

i dont c
1. why u need a linear sensor, or
2. why u need to measure the sun/street light input...

5  Using Arduino / Sensors / Re: DHT11 too high values on: January 24, 2013, 05:07:45 am
the dog ate the sensor?  smiley-grin

are all readings wrong?
or just <10%?

r u sure u connected the wires right?
6  Using Arduino / Sensors / Re: Arduino + RTD: What is the maximum possible accuracy? on: January 24, 2013, 05:05:03 am
arduino can use a reference voltage of Vref=1.1V (lower than 1V is no good idea, IIRC)...
@10bit and a sample rate of 5kS/sec u get about 1mV/LSB...
a LM35 delivers 10mV/K...
many arduinos can neither do differential ADC nor gain (e. g. the ATmega168 cant)...

the ATtiny25 can do differential ADC and can use a gain of appr. 20x...
that means, that u can get about 50uV resolution and that is 0.005K...  smiley-grin

the Arduino Due has a
"16-channel 12-bit 1Msps ADC with differential input mode and programmable gain stage",
that could do the same as (or better than) the ATtiny25...

the Arduino Mega 2560 can do the same as (or better than) the ATtiny25...

i forgot to mention:
1. oversampling might increase the resolution by some bit(s)...
2. if u use a thermocouple u might need some external circuitry (like one differential amplifier for each thermocouple...)...
7  Using Arduino / Sensors / Re: DS touch problem on: January 24, 2013, 02:55:10 am
did the temperature change? smiley

can u show us ur wiring?
and the program?
8  Using Arduino / Sensors / Re: timer1 counter with inductive proximity sensor npn no on: January 15, 2013, 02:42:52 pm
the serial communication on pin 0 and pin 1 is done by a dedicated circuit...
but u should keep ur interrupt handler as short as possible... e. g. just incrementing a counter or so...

u could convert the frequency into a voltage and read that voltage with the ADC?
or what is a "sensor npn no"? do u have a datasheet online?
9  Using Arduino / Sensors / Re: 3 axis accelerometer to monitor dryer. on: January 11, 2013, 03:57:44 am
did u look at the readings when u shake it?
maybe u can c a characteristic pattern?
10  Using Arduino / Sensors / Re: Weather sealing a PIR motion sensor ideas? on: January 11, 2013, 03:55:58 am
i m in germany and use the cheapest slime i can find...
i just take care that it is good for fish tanks... when it doesnt hurt fishes then it wont hurt me... smiley
11  Using Arduino / Sensors / Re: 3 axis accelerometer to monitor dryer. on: January 10, 2013, 03:10:30 am
this could b the structure of the code:

void setup() {
// setup sensor
// setup LED

void loop() {
// wait
// read sensor
// if there was movement --> turn the LED off
// if there was no movement --> turn the LED on

or what was ur question? smiley
12  Using Arduino / Sensors / Re: Weather sealing a PIR motion sensor ideas? on: January 10, 2013, 03:02:48 am
i use silicone silme for fish tanks for that... smiley
but sugru seems to b good 2...
13  Using Arduino / Sensors / Re: Decoding two IR sensors separately on: January 06, 2013, 02:26:47 am
u cant store so many pulses for 2 sensors, i think...
the atmega168 has just 1KiB of SRAM... smiley
but u just store them for building an average over 100 samples, which u can do easier... or did i miss something?

is the blinking really necessary? smiley

u mean something like this?

void setup() {...}

void loop() {

void lookAtSensorAtPin(const uint8_t pinSensor, const uint8_t pinLED) { // all IR sensors must be on port D (PIND)
  #define IRpin_PIN PIND
  const uint32_t ts0 = micros();
  const uint8_t C = 100;
  const uint8_t msk = _BV(pinSensor);
  for (uint8_t i=0; i<C; i++) {
    while ((IRpin_PIN&msk) && micros()-ts0<2UL*1000UL*1000UL);
    while (!(IRpin_PIN&msk) && micros()-ts0<2UL*1000UL*1000UL);
  const uint32_t ts1 = micros();
  const uint32_t avg = (ts1-ts0)/C;
  Serial.print("Sensor "); Serial.print(pinSensor);
  Serial.print(" average cycle length "); Serial.print(avg); Serial.println("usec.");
14  Using Arduino / Sensors / Re: car parking using Ultrasonic Module HC-SR04 Distance Sensor For Arduino on: January 03, 2013, 02:48:42 am
maybe transmitter and receiver r waterproof...
so u just need to cover the board with silicone sealant...
b sure that the sealant gets good contact with the case of the transmitter and the receiver and the cables...

maybe the manufacturer can tell u, if his transmitter and receiver r waterproof...?
15  Using Arduino / Sensors / Re: analogRead fluctuates on: January 03, 2013, 02:40:58 am
the voltmeter averages its readings...
it doesnt update the display 5000 times per second... smiley
possibly ur reference voltage is not very stable?
those 5V from the USB are not very stable...
ur sensor might have some noise on the output that u cant c...
e. g. 50Hz/60Hz mains power lines cause some noise...
but 0.2volts (appr. 40LSB @Vref=5V) sounds a little bit too noisy...
Pages: [1] 2 3 ... 40