Sensors and trouble

Sensors issues fixing

Sensors and trouble

Sensors & Trouble
So I put everything together and find that I can’t read any cards anymore. The sensors are just giving erratic readings. I replace some reflective sensors, but find that the values reading from the sensors are all over the place, and even worse, the values of other sensors are changing depending on others. Some sort of cross talk or coupling was going on!

I admit that the sensor board was in reality prototype one, and had been hacked a lot which was contributing to my confusion over what was wrong.

This is all terribly close to next weekend when it all has to work, so on Wednesday I ordered ten more sensors from Hobbytronics for £11. They put them in 1st class mail so on Thursday night I stayed up until 3am building a new, better sensor board.

I had to keep the dimensions the same as all the acrylic was cut to exact sizes.

Building the new sensor board means I am now left with the prototype that I can hand to people to look at.

After building the new board, although the readings were much better and the coupling between sensors had mostly gone, I was still not able to read a card, still the readings were not good on the Netduino. I had a feeling what I was experiencing was to do with the A-D converter and or interference. I did a stack of reading on Friday night and found some answers.
From reading up I configured all the unused analogue inputs on the Netduino to be a digital output with default output high. This is supposed to prevent the tracking of one Ain by another.
I put an inductor and capacitor on the analogue reference (AREF) of the A-D converter. This filters high frequency interference off the A-D's reference voltage, which may be picking up the noisy devices also on the same controller board. The MAX LED drivers are notorious for noise. While I was at it I also introduced a 100uF capacitor to smooth any ripple on the 3.3V main supply from the Netduino.
The problems I'd been seeing were with independent power supply and USB powering.

Finally I upped the number of samples I take of each sensor, which are then averaged to get rid of any one off “bad readings”. While doing so I noticed that previously I had been dividing by one less sample than I should and so over stating the read value. I fixed that bug.

Now I can read my cards, the readings seem relatively rock solid. I’m now convinced I had some sort of tuned circuit going on with the interference and the physical layout of the previous sensor board. Its a nightmare when you have a few physical problems interacting. At least we are back on for next week now (wipes brow).

New sensor board followed by inductor and capacitor filtering for AREF