Hola chicos, a ver si me pueden ayudar.
Compre una balanza de baño por 5€ en un mercadillo y la balanza funcionaba bien. Le quite las células de carga y tras recibir el INA125P estoy tratando de obtener los resultados y no veo luz. Queria ver si me podían ayudar.
Conecciones: 1) y 2) a 5V, 3) a GND, 4) a 15), 5) a GND, 6) cable rojo de célula #1, 7) cable rojo de célula #2, 8) y 9) conectados a través de una resistencia de 1K, 10) y 11) conectados a A3, 12) a GND, 13) 14) y 16) N.C. (libres).
Parecido al de este abajo, pero en vez de usar una celda de 4 cables, uso 2 de tres cables. los cables blancos van a 5V y los negros van a GND

Estoy probando este código:
// Arduino as load cell amplifier
// by Christian Liljedahl
// christian.liljedahl.dk
// Load cells are linear. So once you have established two data pairs, you can interpolate the rest.
// Step 1: Upload this sketch to your arduino board
// You need two loads of well know weight. In this example A = 10 kg. B = 30 kg
// Put on load A
// read the analog value showing (this is analogvalA)
// put on load B
// read the analog value B
// Enter you own analog values here
float loadA = 0; // kg
int analogvalA = 70; // analog reading taken with load A on the load cell
float loadB = 10; // kg
int analogvalB = 600; // analog reading taken with load B on the load cell
// Upload the sketch again, and confirm, that the kilo-reading from the serial output now is correct, using your known loads
float analogValueAverage = 0;
// How often do we do readings?
long time = 0; //
int timeBetweenReadings = 200; // We want a reading every 200 ms;
void setup() {
Serial.begin(9600);
}
void loop() {
int analogValue = analogRead(0);
// running average - We smooth the readings a little bit
analogValueAverage = 0.99*analogValueAverage + 0.01*analogValue;
// Is it time to print?
if(millis() > time + timeBetweenReadings){
float load = analogToLoad(analogValueAverage);
Serial.print("analogValue: ");Serial.println(analogValueAverage);
Serial.print(" load: ");Serial.println(load,5);
time = millis();
}
}
float analogToLoad(float analogval){
// using a custom map-function, because the standard arduino map function only uses int
float load = mapfloat(analogval, analogvalA, analogvalB, loadA, loadB);
return load;
}
float mapfloat(float x, float in_min, float in_max, float out_min, float out_max)
{
return (x - in_min) * (out_max - out_min) / (in_max - in_min) + out_min;
}
Resultados:
analogValue: 73.83
load: 0.07219
analogValue: 78.28
load: 0.15627
analogValue: 80.07
load: 0.19009
Tengo varias dudas, la primera es si tengo bien conectado el circuito. (estoy siguiendo lo visto aqui: http://cerulean.dk/words/?page_id=42). Después, si bien entiendo como funciona la función MAP y sé que al principio tengo declaradas dos variables que se deben ajustar para calibrar la balanza, cómo puedo asegurarme que la léctura tiene sentido?
Gracias de antemano!!!