Hello,
I'm using an Ultrasonic range Finder LV-MaxSonar EZ0 in a sculpture where there are light tubes (tld) and light dimmers.
The lights turn on an off following different patterns controlled by the interaction with the EZ0.
The EZ0 works perfectly until I start the light animations. Then the data coming from the EZ0 to the arduino becomes completely unstable (I'm reading its analogue output)
The only reason i can think that could provoke this situation is the changes in the electromagnetic field close to the sensor and due to the light's dimming.
Is this possible?
Using the pwm output may work? or should I have the same issue?
Yes, it's entirely possible that the switching of high currents (your lights) is causing lots of noise on the sensor's analog output. The PWM may be much more reliable because it is digital. You can also try separating the sensor and the light controller as much as possible.
If the PWM is not workable you can try buffering the analog output with an op-amp unity-gain buffer (e.g., TLV2371) to try to decrease the output impedance and make it less susceptible to induced noise.
Hi,
Thank you very much for your answer.
I just tried it with the pwm and I have the same results...
I would like to try the op-amp solution you suggest... can you give me other references for the op-amp? What op-amp type should I ask at the electronics store? (I have an LM324N at home?)
Do you have any Schematics to make the circuit and connect it to the Ultrasonic ranger & the arduino?
Sorry but I'm not very good with op-amps
Thanks again
Felix
The op-amp type you should ask for is a "single supply rail-to-rail input and output (RRIO)". The LM324 is definitely not going to work. This is why I suggested the TLV2371. Something like this circuit:
But if PWM was of no help, to me it suggests that the noise is affecting the ultrasound module directly, and trying to clean up the output is not going to help so much. If you have access to an oscilloscope then you should look at the output of the ultrasound module directly to see how bad it is. The best thing is still to keep the ultrasound module as far away from switching high currents as possible. You can also try putting it inside a metal shield of some sort (aluminium foil is easy to try but not great).
Hi
Thanks very much.
Yes, it seemed to me too that the noise is affecting the ultrasound module directly ... unfortunately I don't have access to an oscilloscope.
Do you know any other sensor that I could use to measure distance from 0-6m?
F
At that range, ultrasound is your best bet. You can try IR (infrared) if you're willing to go shorter distances. The Sharp GP2D12, for example, is only good for <1m.
If you have lots of cash you can look at industrial-strength ultrasonic sensors (e.g., automationdirect.com) which I think are much more protected against noise. But we are talking >$200 now.
Hello,
I try to put an aluminium foil around the sensor connected to ground and it works. thanks!
I will then put the sensor in a metal box connected to ground.
Many thanks
F