Arduino 5 Minute Tutorials: Lesson 8 - Wheatstone Shield & LCD

@ColemanBenson In fact, I have found the error. In the example of the library, the ‘strain_gauge_shield_and_lcd_arduino_uno_code’ directory contains a ‘.c’ file. To obtain a correct compilation the extension must be change to ‘.cpp’.

@Raji, Luc: Thank you for reporting this error. A fix has been added to the GitHub (renaming to .cpp).

EDIT Comment was moved to the forum of RobotShop due to its length and technical nature. It can be found here: https://www.robotshop.com/forum/wheatstone-amplifier-shield-lcd-issue-arduino-zero-t14987.

@Lawrence: We have answered your comment on our forum (post here). Please note blog comments are meant for small clarifications of details in the article. For integration issues or other troubleshooting, please use our forum. If you received a defective part or have other complex issues, you can open a support ticket here.

You use A1 and Strain2 in the example above. The LCD shield does not seem to use A0 so would it be possible to use a switch to connect either A1 or A0 to A5 as required to show the output of both Strai 1 and Strain2, not simultaneously of course.

@Bill the 16x2 LCD Shield Kit for Arduino uses the A0 pin for buttons. That’s why we used the “bent pin” workaround to connect A0 (from the LCD Shield) to A5. With this hack, you still have access to Strain 1 and Strain 2 (A0 and A1).

Hi there,
When I follow all instructions above I get no change in raw ADC when applying a force to the load cell. Using a different example I have already made sure the ADC does change when applying a force to the load cell. Do you know why this might be?

Thanks,
Max

Hi there, when I follow the steps above to calibrate the setup and go to apply force to the load cell the ADC value does not change. When I’ve tried different examples I’ve made the ADC value change by applying a force to the load cell - so I think there must be connection issue between Arduino and LCD Shield?
Thanks

@Max Blake: Since these are technical questions, we recommend that you continue this support request on the forum. Since you already have topic there about it, we recommend that you post additional details there, such as pictures of your setup (showing clearly all components, wiring, etc.). These extra details would certainly help with identifying potential issues and solutions.

WheatstoneBridge wsb_strain1(A0, 365, 675, 0, 1000) excuse me please can i have an explanation about these values and where do they come from please

@stovel This is for creating an object named “wsb_strain1” that sets the proper analog pin to input (in this example : pin A0) and does the calibration :
inputMin: Minimum expected value of raw ADC input
inputMax: Maximum expected value of raw ADC output
outputMin: First (lower) calibration point with a known force, usually 0.
outputMax: Second (higher) calibration point with a known force, usually near the maximum force measurable by the load cell used.
Please take a look at the CPP file of the Wheatstone Bridge library here

I recently purchased the Robotshop strain gauge/load cell/Wheatstone bridge interface. I would like to use this to connect to a single strain gauge bonded to a piece of wood or steel to measure actual strain as tension or compression is applied. The strain gauge only contains 3 wires (red, white, and black). I would like the LCD to display the actual strain value. How can this tutorial be modified to achieve this setup?

@JC The Load Cell Shield works with almost any 4 wires load cell. We didn’t test this shield with 3 wires load cells/strain sensor. This Arduino forum post might help in this case.

What are the recommended edits to make to the sample arduino program to help it run properly? Such as low raw adc, and high raw adc. I want to test a weight that has a maximum of about 10 lbs.

@William Alexander The first step is to choose an accurate and appropriate sensor - ex. load cell. You can also use Vref for higher accuracy (in certain situations). Not sure what can be done about the code itself (project specific).

I have a 5 kg load cell. When i follow the directions " First, you will have to enter the low point for force (defaults to 0). It can be changed using the left/right/up/down buttons. Once you press select, you will be ask to choose the raw ADC value that is equivalent to 0. Then, you will be asked for the high point of the force measurement. This is ideally the largest force you wish to measure but it can be any force that is higher than the low point. Add a weight/tension to your load cell equivalent to the force entered and press select. The screen will then show you the raw ADC value for the high point with the weight/tension. Press select to calibrate the system."

I select 0 for the low force.
After the selection, the program defaults to 340 low rad adc.
When i select this, it asks for the high force, I attached a 2.5 kg mass and enter the value 2500 for the high force.
However, when I press select, the high raw adc that is calculated is 340, so the strain does not change? Have I entered something wrong into the button selection system?

Never mind on that last one, I figured it out. Thank you for your assistance!

@William Alexander: It is possible that your load cell is connected to the wrong channel. As mentioned at the top of this article, please create a new topic on our forum for detailed troubleshooting. Make sure to include some pictures of your setup showing clearly all components.

I have a project where I am using 3 120 ohm strain gauges in parallel to negate roll in a barbell so in any orientation I can read the strain value. Is it possible to use this set up with a 2 wire strain gauges?

@Ethan W: As mentioned at the top of the article, please open a new topic here on our forum for technical questions. We recommend that you provide as much information as you can about your potential setup, such as drawing and such. You can attach files and pictures using the Full editor mode.