So i have gotten my wiring setup. Two potentiometers work and communicate with board. I have a HX711 load cell amplifier connected to a Load cell and in turn connected to my arduino micro. My goal is to have 3 joysticks that communicate with my computer. Two potentiometers type controls and one force control. I am having issues with the load cell portion. My arduino script is attached. I have a load cell with 5 wires? and I have the DT from HX711 connected to A2 on arduino board. Please Help!
#include <Joystick.h> #include "HX711.h"
Joystick_ Joystick;
int RxAxis_ = 0; // Potentiometer input throttle
int RyAxis_ = 0; // Potentiometer input clutch
int RzAxis_ = 0; // Load Cell Input from HX711
Stringbean781:
So i have gotten my wiring setup. Two potentiometers work and communicate with board. I have a HX711 load cell amplifier connected to a Load cell and in turn connected to my arduino micro. My goal is to have 3 joysticks that communicate with my computer. Two potentiometers type controls and one force control. I am having issues with the load cell portion. My arduino script is attached. I have a load cell with 5 wires? and I have the DT from HX711 connected to A2 on arduino board. Please Help!
That's cool and all, but what is wrong? What exactly is the problem?
What about the load cell isn't working?
Do you have a schematic? Can you post the schematic?
I downloaded Fritzing to make a schematic but It is quite frustrating atm. The issue I am having is that the load cell is not registering as on the "usb game pad" through windows. The other two potentiometers work but I am unable to get the load cell to register a reading. I am assuming my script is wrong but I have no idea what needs to be done to correctly implement the HX711 into my script.
Stringbean781:
I downloaded Fritzing to make a schematic but It is quite frustrating atm.
Fritzing is crap, don't even bother with it. If you can't use a real schematic capture tool, just hand draw the diagram, scan, and post.
Your code makes absolutely no attempt to properly read the HX711. Start with the examples that come with that library and learn how to use it correctly.
gfvalvo:
Fritzing is crap, don't even bother with it. If you can't use a real schematic capture tool, just hand draw the diagram, scan, and post.
Your code makes absolutely no attempt to properly read the HX711. Start with the examples that come with that library and learn how to use it correctly.
Also, take the time to read the HX711 datasheet.
Okay, I will draw up a schematic right now. I have looked at the examples in the HX711 and I am having trouble understanding which each line does because they don't have descriptions. I will try to decipher further. Also with even the examples, I can't get any correct readings in the serial monitor. Because of this I believe my wiring is messed up. I have a load cell with 5 wires red, black, white, green, and yellow. I read over the HX711. I see the you can you either use A or B and then two wires go to power and earth for the load cell. The E +/- pins are for this correct? I will post schematic shortly. Thanks!
Correct. The load cell must be powered by an "excitation" voltage. Then 2 wires read the output. The 5th wire is usually a shield and can be connected to ground or left unconnected.
The HX711 has A and B connections. The "gain" or amplification is different for A and B. Mostly you would connect to A and leave B unconnected.
I am at work so I am not able to test this. From looking at other schematics, does the HX711 only give a digital output? If so, I am assuming I will need to convert that digital output into an analog one.
#include <HX711.h> #include <Joystick.h>
Joystick_ Joystick;
HX711 brake;
int RxAxis_ = 0; //THROTTLE PEDAL
int RyAxis_ = 0; //CLUTCH PEDAL
int RzAxis_ = 0; //BRAKE PEDAL
int LOADCELL_DOUT_PIN = A2; //BRAKE PEDAL
int LOADCELL_SCK_PIN = 7;
Again, your code is not properly using the HX711 object. You really need to get out of your head the fallacy that you're dealing with an analog device like your pots. Read and understand the datasheet.
Basically, it's a differential amplifier (with selectable gain) followed by a 24-bit ADC. The raw output is a 24-bit signed integer in arbitrary ADC counts. You can use this directly in your application. Or, the HX711 library (you didn't specify which one you're using, there are several) probably provides methods to scale the ADC reading to standard units. It probably also provides methods for calibration and setting tare.
Put your project aside for the moment, read the datasheet, and work the library's examples until you understand them.
gfvalvo:
Again, your code is not properly using the HX711 object. You really need to get out of your head the fallacy that you're dealing with an analog device like your pots. Read and understand the datasheet.
Basically, it's a differential amplifier (with selectable gain) followed by a 24-bit ADC. The raw output is a 24-bit signed integer in arbitrary ADC counts. You can use this directly in your application. Or, the HX711 library (you didn't specify which one you're using, there are several) probably provides methods to scale the ADC reading to standard units. It probably also provides methods for calibration and setting tare.
Put your project aside for the moment, read the datasheet, and work the library's examples until you understand them.
I have already read it and Do not understand it. I have gone through the examples in library and still having issues. I found a better option. BU0836-LC. Built in Load cell, 7 analog, and 32 digital inputs.
What is the load cell full load force? I would preload it with 1/2 it's rated load, then force on one side would increase the signal while force on the other side would decrease it.