Automatic Control and User Interface for Central Tire Inflation System

yes’m putting this together and connect everything together and is going to testa and fix errors that occur, give me two weeks into this :slight_smile:

So I will not come with many questions now :slight_smile: hehehe

@Eyberg, one thing which came to me (forgot it before). You know that Arduino 101’s reference voltage equals 3.3V? Recently I gave you instructions, but these were for ATMEGA and 5V Vref. Then i checked, and it’s not the same in 101.


This here

This is from the code. an I am using 5v now!
const float BITS_TO_PSIUNIT_MXP4250 = 3.8425; // 1 bit = 0,038425 psi
Bust this use 5v

5V is OK as a general I/O for 101 (it’s 3,3V but I/O’s are 5V tolerant). But here you have an excerpt from Arduino 101 reference:

Analog Inputs. Six of the 20 general purpose I/O pins on the 101 provide analog input. These are labeled A0 through A5, and each provide 10 bits of resolution (i.e. 1024 different values). They measure from ground to 3.3 volts

So above 3.3 inputs got saturated, and reads 1023 till the top, the 5V

ok, then these values are not correct psi!

You wasn’t aware of this, as I understand? Then the easiest way would be to use voltage dividers at sensor’s analog outputs, but still a a code needs recalculation of ADC -> psi.

1 Like

is there a specific type of Voltage Divider I need?

Or find another sensor for this?

Ergh… yes and no. A “specific”, because it needs specifically lower voltage from 5V sensor output to 3.3 Ain. And NO, because those are just two resistors.

For this case I’d use :

R1: 4,7k
R2: 9,1k

or (better choice, better stability, as using 1% resistors):
R1: 1,37k
R2: 2,67k

1 Like

or you just can use a big enough trimpot (say above 2k).
see this topic:

1 Like

Yup, the trimpot’s advantage (would use 10k in this case) would definitely be ease of use and “flexibility” (you can correct values not tampering the code) but the disadvantage is a far worse stability - if i have to, I’m using a small trimpot between fixed resistors.

1 Like


'I’m not that good at math to be able to find this out :slight_smile:

same issue here
BITS_TO_PSIUNIT_MXP5700 = 11.0135; // 1 bit = 0.110135 psi

@Eyberg, you don’t have to be math genius! if you follow instructions and read some theory about voltage dividers + common sense, it is way easy.

But I think, after using correct divider (you can use trimpots, but suggesting fixed) no need to mess the ADC -> PSI code recalc. Correct me fellows, if wrong, but we are just scaling down a linear equation. Was 5V Vref, will be 3.3V Vref, Was 5V full-scale, will be 3,3V full scale.

@wanek: And still there is a useful tool, at least for Android: ElectroDroid from Google Store.

@Eyberg: use the dividers and check with existing code AND manometers…

for voltage dividers i use the multiturn, closed design. (not the semi open, semi reglable ones, they are crap).

in my experience they are quite stable, i have some projects running now for 2 years daily, with high temperature changes in the case (amplifiers) and the trimpots keep up quite good. this ones:

Yes, using them too (only them), though still observed little drifting (well, up to 2-3 least digits). Not happening, when using quality fixed parts. Sometime you HAVE TO use trimpots, but still using it as a third member. Then it is quite stable. :slight_smile:
Then again: it’s just 10bits ADC, so you right @wanek - there is no need for such a perfection :slight_smile:

@marvin7, i know this is off topic, but we already talking voltage dividers:

usually, when i build a voltage divider, i hook up my dmm and also the arduino and compare the values (voltage), continuously adjusting my bench supply from the min to max range.

what i observed, that the arduino vs dmm never outputs the same voltage on the full scale (from min to max) sometimes they are the same, sometimes there are differences around 0.05 volts, or even more. not linear. do you have idea why is this happening? (it happening the same on resistors or trimpots)

edit: i admit that my dmms are not in professional range, just something like this., this model is very cheap, but got very good reviews every where on the net.

yes guys I’m completely lost you in this thinking how best thing to do.

I can not handle this stuff and going to think this bit of what I do on this, does not understand you now :slight_smile:

What about measuring tire with RF recevier and sent from the tire, or get diggital measures to send the correct value into Arduino

sorry, i do not understand exactly…

you mean just for testing, or for production version?
for production version, i do not recommend to further complicate with rf.
just build a voltage divider, and measure on analog pin. that is quite reliable if it is tested thoroughly.

There is rarely the need for professional DMM (though happens from time to time)

Well, referring to the question: Believe the DMM :smiley:. You had not pointed it, but I suspect you are using a standard Arduino, with standard Vref set at 5V. This is usually the first source of inconsistent readings (one time this, other something else…) Where possible, use internal Vref, or even stable, external ones. The other source of error is the ADC itself: its resolution with 5V Vref is just ~5mV, and there is the ADC accuracy too:

yes simple if you know
Here is what I missed the train