Mini Aref

What kind of temperature sensors do you use?

How is your Arduino powered? Batteries? Power supply? What other components are powered from that source?

The temperature sensors are AD22100AT
http://docs-europe.electrocomponents.com/webdocs/077f/0900766b8077fedc.pdf

The humidity sensors are HIH4000-001
http://docs-europe.electrocomponents.com/webdocs/06ba/0900766b806ba122.pdf

The arduino is powered by the USB/Serial Light Adapter

To activate the power to sensors I use a IM23TS relay, coil of 5volts 50mW
http://docs-europe.electrocomponents.com/webdocs/0f95/0900766b80f95686.pdf

For the SD power suply LM3940IT-3.3/NOPB
http://docs-europe.electrocomponents.com/webdocs/06e8/0900766b806e8b70.pdf

and a shifter 74HC4050N,652

A RTC PCF8563P/F4,112
http://docs-europe.electrocomponents.com/webdocs/0f65/0900766b80f65100.pdf

A demultiplexer M74HC4051B1R
http://docs-europe.electrocomponents.com/webdocs/0edc/0900766b80edc224.pdf

I think this is all, of course the condensators, resistances, diodes etc...

but the current when it´s measuring is arround 30mA, i think that is not very much.

All the components are powered with the relay, during sleep they are out.

Regards

Have you tried inserting the following line after waking up?

analogReference(DEFAULT);

Yes, I try it, just before the measurements, but it's the same problem.

Thanks

Have you measured the voltage between the GND and 5V pins of the Arduino after waking up? Is it the same as before going to sleep?

I have just measured, and in the first wake up I have 4,9 and go down to 4,7 but in the second one go down to 4,2 or minus, so I think that the capacitors discharge in the first one and dont have time to recharge, so in the second one they drops the voltage!!!

What do you think?

Thanks for help.

Regards

It looks like it's a hardware problem (a power problem to be exact). Can you make a picture showing all your wiring? Or do you have schematics showing all hardware of your project?

If you have a power supply I would try to power it by that and see if you still have these voltage drops.

Do you ever try to use external power supply? USB power only supply your system under 500 mA.

Sorry for my late answer, this is that i'am doing now, trying to put a external power supply, because now i have another problem, arduino resets on his own, I disconect all, and only whit the microrelay, when relay change to off, it rests, the relay consumes 10mA and it is powered by digital output, but maybe it is to much change for USB.

Tomorrow I try to put the schematic.

Thanks

Do you have the free-run diode over the relay contacts?

pylon:
Do you have the free-run diode over the relay contacts?

Contacts? Do you mean to ask the OP if he has a free-run diode across the coil terminals?

Which if not could be the cause of the OP's reset problem.

Lefty

Do you mean to ask the OP if he has a free-run diode across the coil terminals?

That's what I meant. Sorry for my English, I'm not a native speaker.

I dont have time today,:frowning:

What do you mean with free-run diode?

Regards.

The relay includes a solenoid which drives a mechanical switch. The solenoid is an inductor and as such gives back current when turn off. The free-run diode is a diode between the coil terminals which is normally blocking. When the power on the terminals is switched off, the inductor is returning it's "stored" energy into the circuit, the other way round as it was driven. Because the diode is conducting in this direction, the power is discharged without negative influences on other parts of the circuit.

I hope, my English is understandable.

Relays- especially "the diode"- An introduction to using them with microprocessors- ec1relay.htm has a schematics of the simplest usage.

@pylon..
One of the best descriptions I've heard yet and I think better because English isn't your first language.

Bob

Ok, I solve the reset, it was not a reset, the problem was the interrupt configuration as FALLING, now I put as LOW, and works well, in the other side If load another program only to take the measurements it works well too, so tomorrow I have to review the original one.

Thanks

Nevertheless, you should install the diode.

Yes of course, I have instaled, thanks for the info.

Regards.

Finally I remplaced the arduino with a atmega644P, I dont find the answer for the sensors error, only rewrite the code and now its working.

Thanks to all for your time.

regards