Bonjour à tous,

J'ai acheté récemment un capteur de force (SEN-10245) 50kg et un amplificateur HX711. J'essai simplement de mesurer la force appliquée sur la capteur avec un Arduino.

Seul problème, j'ai vu sur Internet que ce capteur de force fonctionne en pair (avec plusieurs autres capteurs de force). Moi, je veux simplement en utiliser un seul, sauf que le SEN-10245 a seulement 3 fils (rouge, blanc, noir). J'essai donc de construire (ce qu'on nomme en anglais) un Half Bridge, à l'aide de deux résistances de 1k ohms.

Voici le circuit que je tente de faire:



J'utilise ce programme, mais j'obtiens seulement des valeurs de 0,0 grammes.

Pourquoi est-ce que ça ne fonctionneme pas? Est-ce que mon half bridge est bon?


Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
//Load cell input onto HX711 board using a Blend Micro board
//Robert Cundall March 2016
//wire DAT to pin 8, CLK to pin 5, GND to GND and 2.7-5V to VIN

#include "HX711.h"
#define calibration_factor -2220.0
//change this calibration_factor to match the output reading to the applied load 
//if you know the mV/V output from a load cell for the full range output (FRO) use the following formulae to calculate the calibration_factor
//calibration_factor = 4440000 / ((2/mV/V)x FRO)

#define DOUT 8
#define CLK 5
float value;
HX711 scale(DOUT, CLK);

void setup() {
 
  Serial.begin(9600);
  pinMode(13,OUTPUT);
  scale.set_scale(calibration_factor); 
  scale.tare();	//Assuming there is no weight on the load cell at start up, this resets the output to 0
  }

void loop() {
  Serial.print("Reading: ");
  value=scale.get_units(), 0;
  
  Serial.print(value); 
  //scale.get_units() returns a float
  Serial.println();
  
  delay(250);// 1/4 second delay
  //LED 13 switches on if the load >2000 and off if it goes below that
  if(value>=2000){
  digitalWrite(13,HIGH);
  }
  else{
  digitalWrite(13,LOW);
  }
 }