Don't forget to check your spam folder if you don't get an activation email after joining!!

DIY CoG Meter

Discussion about Tx, Rx, Servo's, Batteries, Chargers, and all the other things we like to talk about..
Moderator: VinceC
User avatar
Peter Balcombe
Posts: 1335
Joined: 18 Mar 2015, 10:13
Location: Clevedon, North Somerset, U.K.

Re: DIY CoG Meter

Post by Peter Balcombe »

For those of you using a USB device which has a CH340 USB/serial interface onboard (such as some of the Arduino Nano units), you may need to install a CH340 device driver in order for it to be recognised by the PC.
Sparkfun have a helpful web page for this which includes a link to the driver
https://learn.sparkfun.com/tutorials/h ... rivers/all

If the correct driver is installed, the device will show as a new USB port on the PC system info. page & as a Serial Port in the Arduino IDE.

Note that an Arduino Nano uses a USB Mini-B connector, so you need the appropriate USB cable to connect it to your PC.

User avatar
Peter Balcombe
Posts: 1335
Joined: 18 Mar 2015, 10:13
Location: Clevedon, North Somerset, U.K.

Re: DIY CoG Meter

Post by Peter Balcombe »

I have managed to produce what is hopefully an improved version of the 2 loadcell CoG meter firmware as attached.
This version uses the onboard EEPROM to save calibration values determined during a calibration process which runs automatically upon 1st use & can also be run at any time afterwards if the unit is connected to a PC & using the Arduino Serial interface.
The calibration process calibrates each sensor in turn starting with #1.
Follow the Serial print instructions which involve first doing a Tare with no load applied, then add a known load & enter the weight in grams.
The firmware then calculates the appropriate calibration value & stores it in EEPROM.
When calibration is complete, the unit goes into measurement mode.
Upon subsequent start-up the unit should detect that calibration has already been done, so will go straight to measurement mode.

If you start up with a load applied, the unit will Tare to the model weight, so you need to start with no load.
Tare can be achieved by cycling the power or via the PC Serial link - enter "t".
Recalibration can be achieved via the PC Serial link - enter "r".

The attached sketch removes the need to run the separate Calibration sketch.
Just unzip the file into the Arduino sketch folder to get a new folder called CoC_Measurement_2Cell_2C. This folder will contain the sketch .ino file.
You will see a low memory warning in the IDE when compiled, but it seems to run ok.

As with the previous sketch, there are 3 variables which might need to be amended to suit your setup.
d1 is the distance between the wing LE & the front load measurement point, d2 is the separation distance between the two measurement points. You may also need to change the I2C LCD address to suit your unit. If you can see anything on the display, but all looks ok on the Serial output then run the I2C sniffer sketch to check what address is detected.

I have a 4 loadcell version nearly ready to go but first need to replace a duff loadcell before testing. This version will need the Arduino Nano Every variant which has more memory resources but will provide a more stable measurement platform for large/heavy models.
Peter
Attachments
CoG_Measurement_2Cells_2C.zip
(3.19 KiB) Downloaded 7 times

Post Reply