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: 1326
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: 1326
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 80 times
Weds
Posts: 15
Joined: 19 Mar 2015, 21:25
Location: Kent

Re: DIY CoG Meter

Post by Weds »

Hi Peter

Did you get any further with the improved version, I'd really like to make this but if there's a better version in the pipeline I'll wait a while

Thanks..
User avatar
mjcp
Posts: 180
Joined: 29 Jul 2015, 08:14
Location: A wind swept hill with no wind, in driving distance of Windsor, UK
Contact:

Re: DIY CoG Meter

Post by mjcp »

(Following)


...as they say on Facebook ;-)


M
m̶j̶c̶p̶ Marc

Hanger -
Some (now) pristine models that are un-flown for a year.
User avatar
Peter Balcombe
Posts: 1326
Joined: 18 Mar 2015, 10:13
Location: Clevedon, North Somerset, U.K.

Re: DIY CoG Meter

Post by Peter Balcombe »

Okay guys ;)
The replacement part allowed the unit to be completed a while ago, but was then put on the back burner after an initial check showed that it worked.

The pics below show the overall hardware setup for the 4 load cell version intended to cope with larger & heavier models.
Pairs of load cells are bolted onto 3D printed bases, connected together by three 6mm carbon rods which allow the spacing to be easily adjusted whilst keeping the bases parallel. The load cell amplifiers (smaller size ones) will just fit between the load cells & are covered by a 3D printed channel section. Two 6 way ribbon cables connect each pair of amplifiers to the processing unit.
I’ve used 10Kg load cells, but larger ones can easily be used if required without any other change as they all use the same mechanical interface & the calibration routine looks after the range values.
The processing unit is an ‘Arduino Every’ module which is very similar to the ‘Nano’ used in the 2 load cell version, but has the extra memory resources needed to cope with the extra variables used by 4 sets of load cell processing. The processor unit has connections to the 2 sets of load cells, the I2C LCD display and power (which can be either via the USB connector or via the ‘RAW’ input).

As can be seen from the photos, I have used 3D printed load cell mounts which accept 6mm carbon rods, topped by 3D printed levelling pads, the front ones are equipped to take LE reference pins.
My measurement points are 180mm apart, with the LE reference 50mm forward of the front measurement point, thus it is suited for wings which have a chord length of 250mm+. As for the previous version, these parameters can be altered to suit a different physical arrangement.
I have used 6mm carbon rods throughout, but in hindsight it may have been better to use a stiffer 8mm or so rod for the vertical stands, both to take the weight & minimise wing pad ‘spread’ (which will affect CoG location accuracy).
The 3D objects should be able to be easily modified to take larger rods.
Note that the load cell adapters were designed with a largish central open area to allow the bolts to be inserted.

The firmware is very similar to the 2 load cell version (just has 4 load cell sensing routines rather than 2) and adds the 2 front/rear cell load values together to arrive at the front & rear weights.

I have checked the CoG measurement by placing a known load on the stands & confirming that the load & CoG offset are correct. Not managed to put a large model on it yet though.

I will add a zip file containing the firmware and the 3D print objects, although this may now go into the relevant area in the Gold members section.
Attachments
2FF9BF71-EE5A-45D1-A2A8-E5BF7A9C4178.jpeg
3DAB86DD-6510-456C-ACD5-ECDF26B7B9B0.jpeg
F0BC59DA-6C13-4B32-B7E0-478FB073521A.jpeg
64335044-6D7D-4E6F-8569-8599882DF543.jpeg
Last edited by Peter Balcombe on 14 Jun 2021, 21:09, edited 1 time in total.
User avatar
Peter Balcombe
Posts: 1326
Joined: 18 Mar 2015, 10:13
Location: Clevedon, North Somerset, U.K.

Re: DIY CoG Meter

Post by Peter Balcombe »

Arduino sketch and 3D print files attached.
(Note that the required I2C LCD & HX711 load cell libraries are those provided with the 2 load cell version sketch very near the beginning of this thread. There is also an I2C bus scanner provided there to identify your LCD address if needed.)

Note that the Arduino sketch will NOT compile for an Arduino Nano or even a UNO as it needs the extra memory resources provided by the 'Every' unit.
For the 3D print, you need 2off of everything except the Vertical Block Base & Balance pad where you need 4off.
As previously mentioned, the 3D print models currently have holes for 6mm rod. Rod lengths to suit your requirements, as long as the 4 vertical model support rods are all of the same length.
The holes for LE pins are 3mm.

I can provide a schematic if required, but the Arduino pin designations are stated in the sketch code.
Load cells arranged as #1 & #3 at Front, #2 & #4 at rear. Left/Right doesn't matter as summed.

Load cell#1 D_Out - Arduino pin 4
Load cell#1 SCK - Arduino pin 5
Load cell#2 D_Out - Arduino pin 6
Load cell#2 SCK - Arduino pin 7
Load cell#3 D_Out - Arduino pin 8
Load cell#3 SCK - Arduino pin 9
Load cell#4 D_Out - Arduino pin 10
Load cell#4 SCK - Arduino pin 11

LCD SDA - Arduino pin A4
LCD SCL - Arduino pin A5

0V/GND - Arduino 0V
Vcc - Arduino 5V

Input power either via USB connector or the RAW pin. Spec says 7-21V, but I would suggest a 15V or so limit.

Any queries/problems, please send me a PM & I will try to help.
Attachments
4Cell_CoG_print_parts.zip
(55.22 KiB) Downloaded 43 times
CoG_Measurement_4Cells_I2C.zip
(3.59 KiB) Downloaded 44 times
Last edited by Peter Balcombe on 20 Jun 2021, 08:45, edited 2 times in total.
Weds
Posts: 15
Joined: 19 Mar 2015, 21:25
Location: Kent

Re: DIY CoG Meter

Post by Weds »

Brilliant, thanks for that Peter. I think mostly self explanatory. I'll send you a PM if I get stuck, unless it'll be useful to others..
Jeff_Wezzi
Posts: 1
Joined: 06 Feb 2022, 10:36
Location: Huddersfield

Re: DIY CoG Meter

Post by Jeff_Wezzi »

Hi Peter,

Brilliant work, I am in the middle of building one and have a question for you that I cant seem to find the answer on google.
In your code you have the LE offset as d1=28 & d2 = 160, where on the load cells do you take the measurement's from?

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

Re: DIY CoG Meter

Post by Peter Balcombe »

Hi Jeff, I see from the numbers quoted below that you are looking at the 2 cell unit
D1 is the distance from the wing LE reference pin to the point at which the front load is measured, whereas D2 is the distance from the LE to the rear load measurement point.
In each case I assume that the load is taken at the centre of my model resting pad above each cell.
The photo below shows one of my pair of load cells on the 4 cell unit. It shows the load cells & printed blocks into which are mounted 6mm diameter vertical rods which carry the model support pads. The load measurement points are assumed to be the centre of each pad, directly above the centre of the black blocks.

4 cell unit pair
4 cell unit pair

Each load cell bar has 2 threaded holes at each end, the larger ones are for fixing to the base & the 2 smaller ones (adjacent to the load capacity/direction arrow sticker on the end face) are where the load is applied.
I have used 3D printed blocks on my 4 cell unit to support my measurement point above the centre point between the measurement hole pair, but the precise point only matters for a distance between multiple load measurement points.
The exact measurement point on the load cell isn’t critical as each cell is individually calibrated using a known weight, however the distance between the CoG reference point & each load measurement point are used to calculate the CoG distance from the LE Ref. point.

On the 2 cell unit, my LE Ref. point is 28mm in front of the front load measurement point & 160mm in front of the rear point, thus the load point centres are 132mm apart.
Hope this helps.
Post Reply