Help needed with PCB design based on existing project

There is a sarcastic saying: Measure with a micrometer, mark it with chalk and cut it with an axe. I guess your schematic is somewhere in this discussion…but anyway digits “80” are not a standard rating.

5% resistor values generally follow the E24 table and 1% resistors follow the E96 table. There are some exceptions. Go to this link and scroll down to see the standard values.

https://www.electronics-notes.com/articles/electronic_components/resistors/standard-resistor-values-e-series-e3-e6-e12-e24-e48-e96.php

If you think you want “exactly” 80K you should probably choose 1% resistors (pretty widely available) and you could put 2 resistors in series. You could use 78.7K in series with 1.3K. Two in series allows easier fine tweaking. There is nothing generally wrong with putting resistors in series; I often do it for the purpose of flexibility or trying to hit the center of my design tolerance. Of course two resistors require more space and more $ than one.

I know what you are saying. As I said, I will go with 2 in seriesm 33+47k.

If it really needs dialed in that tightly, and I doubt it does, use a trimmer pot in series with a slightly lower resistance than 80K.

1 Like

https://www.digikey.com/en/products/detail/vishay-dale/RN65C8002BB14/3342595
https://www.digikey.com/en/products/detail/vishay-dale/CMF5580K000BHEB/3634417

I guess this is a long discussion…diminishing returns. As some others on this forum, I have been engineering for many years. Elaborating on my earlier comment:

Although I have some doubts as to the need for 80K ohms (and not 79K or 81K), I will assume you need 80K ohms.

Your 33K and 47K resistors are probably 5% tolerance. This means that your 80K total could be off by as much as 4K ohms (so you could have something from 76K to 84K) although these days it is very unlikely to be that bad. (45 years ago we were using 5% carbon composition resistors and many samples measured much worse than that.) But my point is that you seem to want a precise value. Given that you should go with a more accurate resistor and a more stable resistor. You probably do not want the value drifting significantly with time or temperature. For that purpose you probably ought to use 1% tolerance (or better) metal film for these resistors. If you do not, then it is a little more like you are cutting with an axe after measuring with a micrometer.

I do not contradict you, because I do not have such advanced knowledge of electronics and that is why I went on what “others thought”, but as I said I am more than open to suggestions and improvements.
I already had resistors 33k and 47k, so that’s why I said I would use those. But, I understood what you said and I will order others.

That sounds good. Using parts that you have is one of the first things to do. Certainly true when the alternative is spending your own money to buy parts. Among the parts that I have are a stash of “5% tolerance” 82 ohm 0.5 watt carbon composition resistors. When I grab one and measure it, it will probably measure outside of the 5% the range between 77.9 to 86.1 ohms.

But carbon composition resistors are not so common these days and carbon film seem to be much more accurate. Metal film is more accurate than carbon film.

I’d use the “vacuo/visuo” approach or “suck it and see”, or, the long version: “try the resistors you have and if that doesn’t give the required results, upgrade to metal film”.

If you are getting a PCB made, as @BobZ has demonstrated elsewhere, make provision for at least the two resistors in series, maybe three. A spare pair of pads can always be replaced with a link if not needed.

If the reading directly draws the display then right, but if it goes through software you can correct the reading according to resistor used. In such case the exact resistor value is less important then its stability over time and temperature. But if you will be buying precision (like 0.1%) resistor then you can buy 80k.
The question is: what is the accuracy of sensor. If it is 5% then using 0.1% resistor makes little sense.

Some thoughts when I looked at the project:

In short, the measurement takes the following route:

  • sensor converts pressure to analog signal, presumably the range about 0,675 to 4,5V is used here.
  • voltage divider formed by R2 and R3 reduce the analog voltage range to about maximum 3,3V, which is the maximum voltage the AD converter in the 1284 can handle.
  • the AD converter reference voltage is 3,3V from the AVCC pin according to the software
  • the AD converter is read in the software ( uint16_t readPressure() ), calculations performed to convert the AD reading to display value, and written to display / returned.

The 3,3V reference voltage has, according to the datasheet of the AMS1117-3.3, an accuracy of about 1,5% at 25C, or 3% over the full temperature range of the chip. Using 1% metal film resistors in the voltage divider would make sense, as you would then not significantly add to the uncertainty of the measured value (which could be the case with 5% resistors).

You can easily compensate for a different voltage divider (for example R3 = 82k) by adding a compensation factor to the calculation of float _p = in the readPressure() function.
(For example 82k would give the compensation factor 302/300 or 1,006666…)

Hope it made some sense…

The point is we are sort of talking out loud to one another explaining as we go why more complexity needs to be added for EMC (aka electro magnetic combability) or as Piort wrote: (ESD, Burst, Surge)
Reliability does not happen by accident and you can not count on luck.

This appears to be in reference to R3 near J11.
What connects at J11? ?
Not just what is a Drucksensor? What is the exact manufacturer name and exact part number and better yet a link to it and it’s specification.
Then we can look to see and understand what it is doing and what value of resistor may work.

The resistors R3 and R2 form a voltage divider and I must assume that PA5 is configured as an ADC measuring an analog voltage the Drucksensor provides. This resistive divider is rather high impedance and I would suggest a capacitor to ground, ie in parallel with R2. The value should be to limit the frequency of signals (energy bandwidth) to something with a time constant LONGER than the time between samples of the PA5.
The impedance at PA5 is R2 in paralle with R3 or about 58K. For a one second time constant C must be 1/58K or about 5200 uF. For 1mS time constant C would be 5.2uF

Anyone looked at the software to understand the sampling time?

Pressure sensor 1.2MPa.

Working Voltage DC 5.0V
Output Voltage DC 0.5-4.5 V
Sensor material Carbon steel alloy
Working Current ≤10 mA
Working Pressure Range 0-1.2 MPa
The Biggest Pressure 2.4 MPa
Cable length 19cm
Destroy Pressure 3.0 MPa
Working TEMP. Range 0-85℃
Storage Temperature Range 0-100℃
Measuring Error ±1.5 %FSO
Temperature Range Error: ±3.5 %FSO
Response Time ≤2.0 ms
Cycle Life 500,000 pcs
Application non-corrosive gas liquid measurement

This is another module built the same way, but this one only measures the pressure.

Ok so the accuracy is ±1.5 %FSO and additional variation due to temperature of ±3.5 %FSO.

If you want the ADC conversion process to be about as good or a bit better than the sensor (often a good choice) then you will want to choose 1% components to make the resistive divider.

The divider works: like this Vpa5 = Vsensor * (R2/(R2+R3)) or Vsensor * (80K/(220K+80K)) =Vsensor * 8/33 = Vsensor * 0.242. (Hope my math is correct).
You see that the measured voltage is about proportional to each. If you run the numbers one at a time with a 1% larger R3 or R2 the divider ration will change by a bit less than 1%.

Hope this helps understand it all.

1 Like

What is the exact manufacturer and model number of the sensor? The threaded metal part.

I don’t know, got it from Banggod, so it’s not a known brand.

I think I understand. :sweat_smile:

Hi
I have been away for long weekend and I’m glad to see all is going well and your in good hands,
good luck with the design !

Regards
Andy

Regardless you (we) need to know. You can not design for an interface of a component you do not understand.
Send them (the vendor) an email and ask for schematic and identify the principle components.
You can make close up high resolution photograph and share.
Read and transcribe for us the markings on the components.

For what it is worth, I found a seller of the PH measurement board with some helpful information. See: https://wiki.dfrobot.com/Gravity__Analog_pH_Sensor_Meter_Kit_V2_SKU_SEN0161-V2#More_Documents