Hi,
So I want to build a Smart Scale that I can weigh my Hydroponic Lettuce/ Tomato's. I am also going to use same Smart Scale to track Water and Nutrient usage.
I eventually want to Visualize the Data in Ignition and use Ignition's Graphics, Historical Trends, DB. I picked Ignition because we use it at work figured I should use it at home for more experience(only 2hr trial, though)
HW:
Duemilanove or Leonardo(trying both)
HV711 board(ebay clone)
20x4 LCD display with YWRobot backpack
5 kg loadcell
Intel NUC running ESXi 6.7
SW:
Arduino IDE 1.8.3
Ignition 7.9.9
Serial Gateway Module(to get Modbus RTU Driver)
Oracle Express 11g
Windows 10 LTSB(in VM on ESXi)
Libraries:
HX711_ADC.h
Modbus.h
ModbusSerial.h
Wire.h
LiquidCrystal_I2C.h
I have some Rough Arduino code, that is mixture of Examples from the Various Libraries I have relied on.
When I run this code on an old Duemilanove it works but sometimes if my the Modbus RTU Driver on the Ignition Server connects too quick as it boots. The local LCD display hangs. Also each time Ignition connects to the Duemilanove, it reboots(something to do with DTR line).
So I bought a Leonardo from Microcenter. Moved the SDA and SCL over. It works, but only if there is a Modbus master(Ignition Server). Something in the code hangs, if there is not something to read the Modbus registers(weird?). Once I hit the Leonardo with QModbus or Ignition Modbus driver, scale works.
Atleast with the Leonardo board I can disconnect and reconnect Modbus RTU Server without rebooting the Leonardo, but I need to figure out why if there is no Modbus RTU server the sketch Hangs at
lcd.print("Scale Booting Up");
// Config Modbus Serial (port, speed, byte format)
mb.config(&Serial, 38400, SERIAL_8N1);
WeighScaleModbusTCP.ino (2.96 KB)