I am rather now to prototyping and electronics in general, so sorry if the questions I am going to ask you will be excessively naif!
I recently bought a Qwiic Scale NAU7802 that I connected to my Arduino Uno via the Qwiic Shield. I would like to use this board to read an absolute 4 wires pressure sensor from Kulite (XTL-123B-190M). This sensor is calibrate, so I know the relationship between Volts and Bars. Now, I just would like to use the Qwiic Scale to get the output signal and to amplify it, since the output voltage is of few mV only.
What I need to do in order to read my pressure, is to get the calibration factors that can lead me from the raw reading to a voltage, so basically the a and b parameters of the following equation: V = a*(x-b), where x is the raw signal.
The first thing I thought to do is to measure b. I then simply plugged the Qwiic scale without plugging any of the sensor wires and used the Exemple 1 of the library. I do get a reading, but the problem is that every time I close the serial monitor and I open it again, I get a different reading! I monitor the signal over several seconds and it is quite constant: it changes suddenly every time I restart the serial monitor/plotter. I also tried to get the signal via the serial library in Python 3.8 and it behaves the same.
What am I missing?
Thank you in advance for every help you may provide.
Sorry to bother you again, just a quick update to my previous post.
Today I could do some more tests on my Qwiic Scale board.
In place of using the pressure sensor, I just plugged 2 resistors as shown in the (very rough, i know…) sketch attached to this post. I selected a second resistor in order to have a mV voltage difference between GRN and WHT. I then monitored this voltage difference (Vgw) as well as the one between BLK and RED (Vrb) by using an oscilloscope. I then noticed that whenever I open the serial monitor or serial plotter, there is a negative spike in Vrb: nonetheless, Vgw don’t seem to be influenced by it. I learned that, every time a serial communication is established, the Arduino Uno board is reset, what may explain this shoot in Vrb. Anyway, since Vgw doesn’t change, I can’t understand why the reading I made using Arduino changes at every reset.
I then repeated the same operation using another card of yours (and its library), the HX711. In this case, I cannot detect any spike in Vrb or Vgw and the reading is always the same (in average) at every restart.
May you give me an explanation of where this issue comes from? In the next future, I think I will implement my prototype using the HX711 board, even if I would have really appreciate to use the Qwiic scale to avoid to solder the pressure sensor’s cables.
I don’t know how well your sensor is going to work with our boards, but what you’d need to do is connect the sensor and apply 0 pressure to the sensor then tare the scale to zero. Once you’ve done that, apply a know pressure and calibrate the scale to that pressure. Your setup with the two resistors isn’t going to work because it’s a half Wheatstone bridge and the board is expecting a full bridge.
For the spikes you’re seeing, those are most likely caused by the NAU7802 resetting along with the Arduino. Whenever you initiate a serial connection with the Arduino, the board resets and starts running your sketch over. That would cause the NAU7802 to reset as well. The HX711 is a different chip and may not reset with a reset on the Arduino.
thanks a lot for you reply. Actually, what you are suggesting for calibrating the scale is not too feasible, since I can’t really apply to my pressure sensor 0 pressure. Furthermore, I would rather prefer to establish a calibration factor that leads me from the raw signal to Volts, since I can more precisely measure voltages then pressure here and also because I would like to apply the calibration provided by the Kulite relating volts to bar, that is far more precise that what I could possibly do by my own.
Then, I understand the fact that I see a spike when the board is reset: what I don’t understand is why, even if the voltage read by an oscilloscope doesn’t change after board reset, the raw signal does. Do you think the board may be defective?
Zero pressure would be when no pressure is applied and would technically be 1 atmosphere, but that’s generally considered a zero point since you’re on Earth and not in space.
I don’t think your board is defective, but I do think it may not be suitable for what you’re trying to do. This is a digital board rather than an analog board and there isn’t a chart for mapping milivolts to force. The only way I can think of to calibrate this would be to install your sensor and not apply any force to it, then call that zero pressure. Then, apply a known force and calibrate to that pressure.
For example, the sensor connected to your apparatus with what you’re trying to measure open to the atmosphere would be your zero point. Then apply a measured 1500PSI to the sensor and calibrate to get a reading of 1500. After that, applying 500 PSI should give you a reading of 500, 1000 PSI should give a reading of 1000 and so on.
thanks again for your answer! I understand what you are suggesting me about the way of calibrating the pressure sensor reading: I was just trying to avoid doing this step in order to avoid the introduction of extra errors due to calibration, since I already have a precise calibration provided by the sensor’s supplier.
Then, I talked about a problem in the board, because of the fact that the reading i get (even if nothing is plugged into it by the way), changes every time the Arduino board is reset: in this case, whichever way I decide to calibrate, this issue will come in and may be troublesome…how can I get rid of it and why is it there in your opinion?
The value you get after a reboot may change a bit, but only by a tiny amount and shouldn’t be enough to affect any readings. You must have a load cell or other device properly connected to the board to get stable readings. With nothing attached, you will see unpredictable results.
You absolutely will need to calibrate the sensor to the board. This is a digital board rather than analog so you can not use the analog calibration the manufacturer has provided. The board doesn’t know what to do with the manufacturers calibration values and you need to follow the calibration process to get accurate results.
Thanks again for your explanations. I connected my pressure transducer and get a first rough calibration using a CO2 bottle and the readings of an analog manometer. In this case, I consider my zero of pressure as being the ambient pressure. For the measurements I am going to do with the device I am building, I will always have to measure a pressure relative to the ambient one, so if I have a proper calibration once, it will be enough even if my “zero” (the ambient pressure) changes.
I then verified what happens when I reset the Arduino: as I already observed, an offset is added/subtracted to the reading. Once I have my values in Bars, this offset is around 0.5 mBar, so it should not by a problem for my measurements. I also verified that I observe the same behavior on 2 different Qwiic Scale boards. I still don’t know why the board Load Cell Amp doesn’t show this behavior.
I have a load cell working good with your quick scale examples connected with an Artemis red board. Is it possible to connect a second qwiic scale in series with the first qwiic scale ? Will I be able to declare a second instance of the NAU7802 application or am I trying to be too frugal ? I am amazed at how well this chip performs, for such a low price.
Since the NAU7802 has a fixed I2C address, you can only have one on a I2C bus at a time.
If you were to create more than one I2C bus, OR split a single bus into multiple sub busses, then you could connect more than one. Splitting a bus is as easy as adding a MUX like our [Qwiic MUX but you do have to code for that.](https://www.sparkfun.com/products/14685)
Hi I am trying to use the Sparkfun Qwiic Scale with a AZ3166 IoT Devkit Board connected to a moto:bit breakout board with a qwiic connector however I am unable to get the scale to be recognized. I have tried the example code1 from the Git repo but my serial monitor reads “Qwiic Scale Example Scale not detected. Please check wiring. Freezing…”
I am running the vanilla example code and have only the qwiic scale connected to the moto:bit board (had to update the baud rate from 9600 to 115200 for my board). I have tried this with two different sets of components (qwiic scale, moto:bit board, and qwiic cables) I do not think this is a wiring issue. Any advice would be greatly appreciated.