Magnetic Level Probe Mk2

A forum for discussion on the WMT River Control System hardware.
Penri
Posts: 1284
Joined: 18/05/2017, 21:28

Magnetic Level Probe Mk2

Post by Penri »

Details of new probe design will be posted here.
Penri
Posts: 1284
Joined: 18/05/2017, 21:28

Re: Magnetic Level Probe Mk2

Post by Penri »

Please find attached the schematic and some explanations for the design of the Mk2 Magnetic Probe.

The document does need some tidying up, comments are welcome and please feel free to make changes as appropriate
Attachments
MagProbeMk2 v02.odg
(28.04 KiB) Downloaded 96 times
Penri
Posts: 1284
Joined: 18/05/2017, 21:28

Re: Magnetic Level Probe Mk2

Post by Penri »

The attached photograph (IMG_3202) shows the bench setup used for testing the Mk2 Magnetic Probe.

During the tests Vcc was set to 12V with a 5 m length of cable connecting the probe to the meters and power supply.

It's worth taking a look at the photograph first before viewing the video as it'll give you a better understanding of what you're looking at, having the schematic in MagProbeMk2 v02.odg at hand may also help.

The attached video is of the probe in action on the bench. It opens with the magnet coincident with the 975mm Hall effect switch, as you can see from the right-hand most meter showing a different voltage from the other three. The video proceeds with the magnet being pushed left to right from 975mm down to 800mm, watch the meter needles.

I didn't have time to investigate the loading effect of the moving coil meters had on the indicated voltages Terry, but I hope you can see that only one Hall effect switch is ON at any one time and there is a definite OFF zone between each level. The voltage transition between ON and OFF went down markedly towards the O mm end of the probe (right hand end in the set-up), I could see the meter flicker but only just, your A/D should have less trouble than my eyes.

I haven't sealed the tube yet: a) just in case we need to access the electronics; b) I'm still not entirely sure how I want to do it. Currently everything fits inside the tube with the cable emerging from the top.

Terry let me know when you're ready to integrate your development set up with this and I make it available.
Attachments
IMG_3202.jpg
IMG_3202.jpg (3.02 MiB) Viewed 1368 times
IMG_3198.jpeg
IMG_3198.jpeg (2.13 MiB) Viewed 1368 times
TerryJC
Posts: 2616
Joined: 16/05/2017, 17:17

Re: Magnetic Level Probe Mk2

Post by TerryJC »

Penri,

I think that the video attachment didn't work...

BTW. I like the 1950s meters :-) The wooden fascia really sets the scene!
Terry
Penri
Posts: 1284
Joined: 18/05/2017, 21:28

Re: Magnetic Level Probe Mk2

Post by Penri »

Sorry about that, I appear only to have posted a snapshot, I should have checked the file size. Hope the attached is not too big.

Do you think an orange LED behind the panel with give it a "glowing valve" look, adding to the vintage feel!
Attachments
IMG_3197.m4v
(13.62 MiB) Downloaded 102 times
TerryJC
Posts: 2616
Joined: 16/05/2017, 17:17

Re: Magnetic Level Probe Mk2

Post by TerryJC »

Thanks. That worked. I've got to go out now, so I'll look at what I'm getting in more detail later.
Terry
TerryJC
Posts: 2616
Joined: 16/05/2017, 17:17

Re: Magnetic Level Probe Mk2

Post by TerryJC »

Penri,

A few things:
  1. I had to watch the video several times before I understood what was going on. I've realised now that you only show a few levels being passed, so each meter only dips three times.
  2. I've utilised the spreadsheet that you shared with me back on October and plugged in the values that you give in the drawing and get a range of Vo between 3.27 V when no sensors are active, 3.26 V when the bottom sensor is active and 1.65 V when the top sensor is activated. I've attached the modified spreadsheet to this post. The problem is that in the video, the maximum voltage that the meter shows is less than 2 V and the 'dips, go down to around 0.75 V. Unless I've completely misunderstood, the voltage at Vo when the magnet is between probes should be nearly 3.3 V.
  3. As you point out, the voltage difference near the bottom of the barrel is going to be quite small and that in itself shouldn't be too much of a problem, because at that level we just need to know that the butts are nearly empty. However, I'm slightly concerned that the voltage difference between an almost empty barrel and no probes active is so small. With a build-up of tolerances in the resistor chain, the effect of the turn-on voltage of the transistors, the errors in the A/D and the losses in the cable, we could have a few problems deciding if the barrels are empty or the magnet is simply in transition.
Or have I missed the point?
Attachments
MagProbeAlt SS(V0.2).ods
(15.77 KiB) Downloaded 96 times
Terry
Penri
Posts: 1284
Joined: 18/05/2017, 21:28

Re: Magnetic Level Probe Mk2

Post by Penri »

Hello Terry

1. Yes you are right

2. It's the loading effect of the panel meters on the circuit. I've just measures one of the the meters it has an impedance of around 4.7kR, which would have quite an effect. I only used the meters because they were cheap (@ £5) and I was more interested in seeing whether the channels all worked and whether two neighbouring Hall sensors came on at the same time. The Zener is not quite doing what I want at the moment, I may have picked up the wrong type out of the box as I get an ALL OFF value of around 3.5V on a channel without the meter in circuit (replace by a DMM), but I can confirm that the ON/OFF swings are broadly in line with the theoretical values in the spreadsheet. I would expect some difference between theory and practise due to tolerance an all the wiring in the circuit.

3. I can see the issue and the solution will be in the design of the "vote for Joe" algorithm. By eye I can see that an active channel (with a Hall switch ON) has a different value from the other 3 but we'll need the accuracy and resolution of your A/D to measure what that is for the smaller values and work out if its possible to discern a difference.

What's the maximum value the A/D can measure, is it 3V3? You've said it can stand slightly more with out damage.


Penri
TerryJC
Posts: 2616
Joined: 16/05/2017, 17:17

Re: Magnetic Level Probe Mk2

Post by TerryJC »

Penri wrote: 03/01/2019, 15:262. It's the loading effect of the panel meters on the circuit. I've just measures one of the the meters it has an impedance of around 4.7kR, which would have quite an effect. I only used the meters because they were cheap (@ £5) and I was more interested in seeing whether the channels all worked and whether two neighbouring Hall sensors came on at the same time. The Zener is not quite doing what I want at the moment, I may have picked up the wrong type out of the box as I get an ALL OFF value of around 3.5V on a channel without the meter in circuit (replace by a DMM), but I can confirm that the ON/OFF swings are broadly in line with the theoretical values in the spreadsheet. I would expect some difference between theory and practise due to tolerance an all the wiring in the circuit.
Ok. Thanks.
Penri wrote: 03/01/2019, 15:263. I can see the issue and the solution will be in the design of the "vote for Joe" algorithm. By eye I can see that an active channel (with a Hall switch ON) has a different value from the other 3 but we'll need the accuracy and resolution of your A/D to measure what that is for the smaller values and work out if its possible to discern a difference.
Here is the relevant part of the Datasheet:
ADS1115_Fragment.png
ADS1115_Fragment.png (164.31 KiB) Viewed 1360 times
From that I calculate that 1 bit equates to 151 uV. Taking the worst case error parameter; an offset error of +/- 3 bits equals a total error of approx 450 uV. However, thinking about it, many of these errors would be systemic, so will affect all values equally. That should be OK, but it would be useful to hear your thoughts.
Penri wrote: 03/01/2019, 15:26What's the maximum value the A/D can measure, is it 3V3? You've said it can stand slightly more with out damage.
The spec says Vdd +0.3 V, but that's the Absolute Maximum and the Datasheet warns that the device will be damaged if this is exceeded. We should aim for no more than 3.5 V as a maximum, I think.

However, anything over the reference voltage of 3.3 V will saturate the converter and make discerning the 'dead' zones even more problematic. Remember too that the reference voltage that' I'll be using will be the 3.3 V from the Pi (to ensure that we don't exceed the maximum GPIO input voltage), so there could be errors there too.

On balance, I think that the All-off voltage should remain below 3.3 V, to ensure that the change is discernible. In the end, we might have to treat a 100 mm reading as All-off. As you say we can probably do something in the algorithm; if the last reading was 500 mm, then a voltage of 3.26 V is definitely All-off, but if the last reading was 200 mm. then it is probably 100, but could be All-off.

Let's see what happens when I've finished the hardware design and coded it up.
Terry
TerryJC
Posts: 2616
Joined: 16/05/2017, 17:17

Re: Magnetic Level Probe Mk2

Post by TerryJC »

BTW. I've just been playing with the value of Rs in the spreadsheet and changing this to 10 k gives a minimum voltage difference between steps of 100 mV. Also, the step changes are more consistent.

Any reason why that wouldn't work?
Terry
Post Reply