Sampling data


Richards
 Share

Recommended Posts

My project is to built a shock absorber dynamometer

The load of the shock will be capture by a S type load cell that will be represent in lbs on the Y on the graph,

The stroke of the shock will be capture by a rod displacement sensor that will represent the velocity vs time on the X on the graph,

The 2 sensors will be capture with a labjack u3-hv

Is it something doable.

I include a picture of the graph .

Capture d’écran_20221031_213311.png

Link to comment
Share on other sites

Absolutely.  Many people have done very similar applications.  Just collect the two data points from the LabJack at the same data rate and create a graph that plots Force vs Velocity.  Just make sure and set the bottom axis type to Lin instead of Date/Time so that it becomes an XY graph instead of a trend graph.

Link to comment
Share on other sites

  • 2 weeks later...

We do not recommend using the HX711 with the U3 unless you are familiar with serial protocols or want to learn more about working with low level digital communications. The HX711 uses what seems to be its own special serial protocol for communications. It does not appear to be a standard serial protocol, we do not directly support the serial protocol it uses, so it could require more attention to the low level communication details than other devices.

An alternative amplifier could be our LJTick-InAmp:
https://labjack.com/products/ljtick-inamp

Are you using a breakout board, and if so could you please provide a link to its documentation? I think that there are a couple of different HX711 breakout boards, and the wiring might vary slightly depending on which one you are using.

Link to comment
Share on other sites

This is the breakout board , but if the  LJTick-InAmp would be more appropriate ,i will go for it.

i am very novice in programation.

Description:

- The Load Cell is breakout board for the HX711 IC that allows you to easily read load cells to measure weight.
- By connecting the to read the changes in the resistance of the load cell and calibration you’ll be able very accurate weight measurements.
- This creating your own industrial scale, process control, or simple presence .
- The HX711 uses wire interface (Clock and Data) .
- Any ’s GPIO pins should numerous libraries have been written making to read data from the HX711.

Specification:

- Automatic reset circuit
- Simple digital control and serial communication: All are controlled by input pins, the chip registers without programming
- Selectable output of 10Hz or 80Hz
- Simultaneous rejection of 50Hz and 60Hz power interference
- Power consumption (including circuit): Typical operating current:
- Operating voltage range: 2.6 ~ 5.5V
- Operating temperature range: -20 ~ + 85 ℃



 

Capture d’écran_20221114_213526.png

Link to comment
Share on other sites

For the HX711 breakout, the color line side is all connections the load cell. That is described in the hookup guide here: https://learn.sparkfun.com/tutorials/load-cell-amplifier-hx711-breakout-hookup-guide?_ga=2.112634116.1828129323.1668558706-926891264.1636485443&_gac=1.127184639.1668558706.CjwKCAiAjs2bBhACEiwALTBWZQ17wY2q-S72-lITy9etdzRgpVlqs6s0DTZPlVHxjDIrFQ3UMMBlhBoCRYgQAvD_BwE#hardware-hookup-

VCC could be connected to one of the DAC outputs set to 3.3V on the U3, GND to GND on the U3, then finally DAT and CLK to any of the digital IO such as FIO4 and FIO5. We have not tested with this board, but I suspect that the serial protocol could be implemented using our SPI feature, configuring the SPI clock to the CLK DIO pin and DAT to the MISO DIO pin. Both of those are configurable in software. From there, you should be able to clock out the necessary pulses to CLK by setting the number of bytes transfered. Some related SPI info:
https://labjack.com/pages/support?doc=/datasheets/u3-datasheet/4110-spi-serial-communication-u3-datasheet/

 

If the SPI feature does not work well enough to handle the HX711 protocol, it might be possible to implement the protocol by using AddRequest calls to the DIO states directly, and putting small delays between them using the wait IOType as documented in the following pseudocode:
https://labjack.com/pages/support?doc=/datasheets/u3-datasheet/4114-miscellaneous-u3-datasheet/

 

Link to comment
Share on other sites

You will need to create a global variable or channel to hold the tare weight.  A variable should work fine.  In a sequence marked Auto-Start put:

global tareOffset = 0

Then create a conversion for your weight channel:

Value - tareOffset

Then apply that conversion to your weight channel.

Finally, in your button for setting the Tare, create a Quick Sequence action and put:

tareOffset = (myWeightChannel + tareOffset)

where myWeightChannel is the name of the channel you applied the conversion to.

 

Link to comment
Share on other sites

No, I mean a variable.  See 5.10 in the user's guide.  Its just a place to store a value, kind of like a channel, but simpler.

As for the sequence, create a new one (5.2 in the user's guide).  Call it, say, "StartUp", and then make sure it is marked Auto-Start (5.22 in the user's guide).

Link to comment
Share on other sites

 In a sequence marked Auto-Start i have put :global tareOffset = 0

Then create a conversion :Value - tareOffset

Then create a Quick Sequence action and put: tareOffset = (myWeightChannel + tareOffset)

 

As soon  i make the conversion , the weight channel on the graph is stuck to 0

before i hit the tare weight button.

i dont understand :''Then create a conversion for your weight channel''

and     ''Then apply that conversion to your weight channel''

i all ready have a conversion for the weight channel, do i have to create a second one.                         

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share