Go Down

Topic: Noise reading analog pulses (Read 1 time) previous topic - next topic

pbecchi

I made an Arduino pulses counter that read led flashes with a fotoresistor.
The fotoresistor is connected to an analogue input that is continuously monitored:
when the reading reaches a certain level Arduino count a pulse.
This way I am monitoring 3 electrical power counters and logging the readings on a SD.
The 3 units needs 3 different threshold since the power counter that I am monitoring are different.
For one unit the threshold is 500 and the reading are always correct.
For another one threshold is 100 and the reading give 0,1% less reading.
For another one threshold is 60 and the reading give 1% less reading.
In theory I should reduce the levels to get missing readings but because of the noise on the analogue lines :
-if I reduce the threshold the reading are increased by 100-1000 times!
- if I increase the threshold I don't read anything anymore!
So these levels have been adjusted to get the best performances.
I have tried to program some digital filtering with a moving average method , but since I want to read a narrow pulse those method are not appropriate.
I wonder if anybody found a solution to this problem : may be with some analogue filters.
Note: Probably the noise is generated by Arduino: I noticed that during communication the pulse reading run without led pulses.

Thank you for any help!

Paolo

Start new topic

I have tried to program some digital filtering with a mooving average method ,
but since I want to read a narrow pulse those method are not appropriate.
I wonder if anybody found a solution to this problem : may be with some analog filters.
Note:

Grumpy_Mike

Quote
I made an Arduino pulses counter that read led flashes with a fotoresistor.

Photo resistors are very slow and might not be fast enough to count the flashes on your LED, how fast is it flashing?

Are you sure your code is counting the pulses correctly and not continuing to increment the counter when ever the threshold is exceeded? That is when you exceed a threshold do you do nothing until the reading is then less than the threshold. Try making the up and down thresholds different, this is called hysteresis.

Quote
Probably the noise is generated by Arduino:

This is unlikely. What is your circuit?

pbecchi

Thank you Mike:
the pulse are very short (few millisecond) but the frequency is low ( pulses per minutes <100).
The fotoresistor is glued over 3 Electrical Power Counters and connected by a cable of about 3-4 mt to the arduino where they are connected through a 10kresistor to the analogue port.
The 3 counters have the intensity of the light pulses  different and I have problem only for the dimmest led: I have tried to change the 10k resistor but the signal increase and the noise increase as well.

The code I am using now , after having test several other methods, count the number of sample above the threshold and if they are more than 3, increment the counter  . (I have found that 3 is the optimum)
Now it works continuously since august so I consider the method reliable but I would like to improve the reading of the dim leds.

Any suggestion?
Paolo

Magician

Quote
The fotoresistor is glued over 3 Electrical Power Counters

How did you make it? You mean 3 photoresistors? And than connect them in series ?  ( you mention 1 resistor).

pbecchi

Sorry

I have not explained myself... :~
3 counter leds, 3 photoresistors , 3 indipendent lines in series with 3 10K resistors connected to 3 analogue ports.
For each counter the hardware is like this:
5v---------3mt cable----------fotoresistor-----------3mt cable--------------10Kresistor-------analog port.

Paolo

Go Up