News:

PROTON pic BASIC Compilers for PIC, PIC24, dsPIC33

Main Menu

Calculating system errors

Started by TimB, Feb 16, 2021, 09:43 PM

Previous topic - Next topic

TimB

Hi all

I'm working on a manual for my latest product. The duel input PT100 temperature indicator.

In case you interested a render of it is attached.

The issue I have is in the specification section. 2 x AA batteries I can figure out but it's the total system error % stuff I have no idea on.

Anybody have any tips? I can supply more specs if it helps.

Tim

Craig

Wow Tim That Really looks excellent Well Done, I like all the very clean lines.
Regards
Craig

OG

Hi Tim
Where do you get the case you use? Quite nice.

TimB

#3
The case is numbered AK-H-46 from SZOMK

https://www.chinaenclosure.com/products/2x-AA-battery-holder-plastic-enclosure-for-handheld-electronics-equipment-box-AK-H-46.html

https://www.aliexpress.com/item/32703806952.html

They cost me around $6.5 each

The front panel is curved which is a pain so I have to route the back out to get the screen I use as close as possible to the front
As the panel is curved I went for a membrane keypad

2 x AA so you need a step up power supply is needed.

The use of that case was a very long drawn out process. It was
1 Find a case with battery compartment
2 Find a screen to fit
3 Ensure pcb connectors etc will fit
go back to 1 until you find a solution

If you intend to make any products with it I have a lot of resources to make the process easier than I had it.

Another real life image of the device
Temp meter.PNG

 

 

charliecoutas


top204

#5
There are so many, sitting behind a desk, theories for measuring the percentage left in a battery, however, they rarely work in the real world, and for Alkaline batteries, they never really work. :-)

Because they are alkaline batteries, their chemistries differ from manufacturer to manufacturer, and price to price. So a packet of 10 batteries bought from a Pound Shop or Ebay or CrapAzon etc, do not actually have the same power capabilities of a single good quality battery, so a good percental measurement based on the type of battery used is impossible.

The method I have done in the past is to place a, switchable, known weak load over the battery using a MOSFET acting as a load, and measure the Voltage, or a known resistor switched using a MOSFET over the battery, then measure the voltage. Do this every 10 or 100 seconds and see what voltage drop is occuring. This can then be extrapolated over time because the measurement of the voltage will be a fixed X length of time from one test to another to try and give an approximate percentage of life left. 



ken_k

Very professional looking, are you using a 4 or 2 wire measurement method? Sorry I cannot help with your question.

TimB


Ken, the chip I use for the Pt100 conversion is capable of 2,3 and 4 wire.

I decided that 3 wire would be fine for me. So the probes were made as 3 wire.


One thing I just figured out the reference resistor. They say Pt100 use a 400 ohm. I never knew why then it dawned on me. The 15bit A/D is referenced against the reference resistor. So the max resistance the system will take is 400ohms. Which is around 780oC on a PT100. At its very limits.
The maths to get the Ohms is
ADC value * ref resistor / ADC resolution eg 32767

The equates to a step of ~0.03 oC

If however you are happy to work upto say 250oC max then you can reduce the Rref to 200ohms You can reduce the step to ~0.02oC


Since I work to 0.1 I'm happy with 0.03

I have to say I'm super impressed with the MAX31865.



 

TimB


Les

I more thinking about the system accuracy of the temperature system.

For the battery calculations as its so pulse based eg of the ADC converter and the Bluetooth I decided to use an analogue meter. I just eye ball it.

Battery level is done on the raw voltage as they are 2 x AA Full on the scale is 3v and minimum is 2v

 

ken_k

#9
Hi Tim I used the MAX31865 some time ago and found it to be most satisfactory. Regarding total system error it might pay to have one tested, in Australia NARTA test and certify, NATA labs have precision testing as all PT100's are not the same and it seems you need the entire device calibrated using precision temperature references, I was not that concerned and a two point calibration using crushed ice in water as zero C and boiling pure water as 100C. I worked for a company once where we NATA calibrated and certified one meter, we then used it a a reference to adjust the other meters about the workshop.
I toyed with the idea of using a PT1000 in a two wire config with a 2 pin connector, in a two wire system the connector contact resistance error is reduced by a factor of 10 by using a PT1000.

 

TimB

Hi Ken

At the factory (my house) I perform factory calibrations. I have 0.01% resistors fitted in some M12 connectors.
100ohm, 150ohm and 200ohm. Internally the max uses as a 400 0.1% reference resistor.

First thing is I use the 0.01% 100ohm resistor to calculate the true value of the 400ohm. It then gives a very exact result of what the ref resistor actually is. for example 400.056, That is stored in eeprom. As soon as I do that the 0oC Zero is spot on.
Next I do a span with the 200ohm. That is 266.35oC When I look at the span on that its around 1.00056 (from memory)so only slightly out.

As calibration is a system with the probes and I need calibration certs for regular use. My prototype is currently being checked by a calibration house. In my line of work you need UKAS traceable. Not expecting any dramas.

I'm very happy with the calibration algos I developed. Your restricted to Zero between -5 - +5 and Span over 100oc. While the display is 0.1 when calibrating its 0.01 and you enter exactly what the ref probe displays. This helps with the rounding issues.

As I have access to the raw values, calibration is simple and does not require you to mess around jumping between zero and span adjusting it to get the best fit. Its Zero then span and your done.

Another image this time from the manual on calibration. I'm going real ikea style, as little text as possible. :)