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
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.
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
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.
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…
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.
Then again: it’s just 10bits ADC, so you right @wanek - there is no need for such a perfection
@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.
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 . 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:
@Eyberg: But IT IS simple! I do not believe, that you managed to integrate Blynk into quite advanced project (as for beginner even quite much) and you gonna fall off with voltage dividers? No go! Can’t be! Get multimeter, connect voltage divider as shown on diagram (to the OUTPUT, the buffered output is not important part) and get the readings! If done correctly, a 5V input should give you 3.3V output. THAT’s IT!
what you say is true. regarding the expensive dmm, the problem is, that this equipment has the shortest life-time in my workshop. it is far too easy to damage if you are tired or distracted. in 8 years this is the 4th i destroyed. so, i’m afraid to spend too much money on them
@Eyberg, first just have a good sleep, then in next day search for voltage divider tutorial in youtube or other quality blogs. i bet you find plenty good ones even on your native language. after you get the theory you will see it is easy!
just take your time, you are learning for yourself, and probably will be useful on other projects too…