Go Down

Topic: SICK sensor and AD wobble (Read 4 times) previous topic - next topic

2Tricky

#15
Oct 15, 2012, 09:14 pm Last Edit: Oct 15, 2012, 09:32 pm by 2Tricky Reason: 1
In principle this is the sensor but mine is a rare variant, NT6-03014 (from memory) with a 4m cable, which Sick has assigned a new part number to.

The beuaty about these great yester year devices (unlike many modern eyes) is that they were made with an anaolgue output too.  If you dig into the specs you'll find references to it: They have a green light and a red one and this topic ties nicely into the figures I've just recieved from the analysis as promissed.

Following my rationalisation of what matters and what doesn't, I have the following (all relative to 1024 values [10 bits]):
Set to the green light...
A glossy white mark: 75..77
A glossy black mark: 15..17

Set to the red light...
A glossy white mark: 201..204
A glossy black mark: 37..39

The key to this project holding water is a matter of the ratio of distance moved (image movement beneath the sensor) to ADC change.  The green gives around 0.1mm per count and the red around 0.01mm.

My conclusion is that 0.01mm is fine whereas 0.1mm isn't and unfortunately this is the best scenario as other colours produce a much smaller range.  Therefore I feel I need to continue refining.  I would be gratefull for peterH (author of 20 bit suggestion) or of course for anyone who knows some ins and outs of taking the 20 ADC bit route because I'm new to this and hoped my little Arduino would cope.

Thanks a lot all.

2Tricky



If your requirements are so close to the resolution of the ADC that a variation of one or two is important to you, you probably need to use a more precise ADC.


Under battery power the ADC is pretty well behaved (certainly noise below 1 lsb) - I suspect this is power supply noise - is the PSU a switching one?  Extra decoupling can help.


MarkT sorry, I have little idea what a switching supply is but I can say that it is pretty cheap.  It is surprisingly accurate though despite this (compared with other supplies I've measured), reading 11.94 for a 12v supply.

Cheers

retrolefty

The first thing I would try as a simple experiment would be to remove the external Aref voltage you are applying to the Aref pin and use the instead default internal Avcc reference and see if your wobble improves, gets worst, or remains the same.

Lefty


holmes4

I tried a simple analogRead of a simple two resistor voltage divider and got "wobble", readings of 512 or 511. Your circuit is much more complex than mine!, so many more sources of wobble.

I think your in the area where real circuits and theory differ.

Possible sources of wobble a 1 part in a 1000 wobble.

1. The output from your PS is not as good as you think. If you looked at it with a very good 'scope you will find it varies even with no load, at mains frequency.

2. The load is never as constant as you think. A lot of chips draw more current on the rising/falling edge of the clock than in between.

3. Ambient light changes, some bulbs flicker at the mains frequency, this may be, just, enough.

4. Induction in that 4 meter cable (from near by mains cables) is the cable shielded?

5. Small changes in temperature.

6. Vibration.

Mark


2Tricky


The first thing I would try as a simple experiment would be to remove the external Aref voltage you are applying to the Aref pin and use the instead default internal Avcc reference and see if your wobble improves, gets worst, or remains the same.

Lefty


Lefty, Aref was only tried after suffering with wobble and made very little perceivable difference compared with the Unos' default 5V.  I should just check: When you say 'internal', do you mean something other than using the 'DEFAULT' Const when setting the reference in 'analogReference()'...this is how it was being used prior to using the Aref pin (although it was used by default, i.e. no specific call to 'analogReference()')...

Thanks Lefty

Go Up