Saturday 9 February 2019

A 3D printed CG scale

How do you measure the CG of your model? Very likely, you'll be balancing the model over a pair of pivoting arms, or - worse - your fingertips. Well, here's a better way using 3D printed parts and a couple of Arduinos...

CG Scale

CG Scale is an electronic CG scale for F3X sailplanes, designed is Olav Kallhovd from Norway.  Olav has released it as an open source project on GitHub, so anyone with a soldering iron and access to a 3D printer can make their own. Thank you Olav, for sharing your great design!

In use, you simply place the model on the scale, and read off the weight and CG position. The model's location on the scale is fixed, making it easy to experiment with different balance weights.


Finished scale showing the frame (with covers removed) and display unit.

How it works

The scale employs a couple of load sensors, some electronics and various 3D printed parts. Calculations for CG and weight are performed by an Arduino microcontroller.

The largest component is the main frame. Bolted to this are the front and rear load sensors. Just one end of each sensor is fixed; the other end has a support for the wing and hangs free. Embedded in the front cradle is a pair of vertical posts for locating the leading edge.

Twin sidepods house an Arduino, supporting electronics and a 9V PP3 battery.


Load cell cover removed, showing fixed part of each load cell bolted to frame.

There is a separate display unit comprising an LCD panel and - depending on the type of display - either an I2C board or a second Arduino. The display unit connects to the frame via a 3-wire cable.


Parts of the display unit. There's an Arduino lurking under the LCD panel!

Construction

The first step is to download the project files - these include the STL files for printing the plastic parts, a bill of materials, photos, circuit diagrams and Arduino code.

I printed out the plastic parts with a Creality CR10 Mini printer using PLA filament. The frame took longest to print - around 9 hours.

The sensor and electronic components are available from eBay, Amazon and other suppliers. The Arduinos vary in price - the cheap ones I got work fine. The Arduino site has some excellent introductory material.

The load sensors are designated "YZC-133". These are available in various ratings - I purchased two 3kg units. It's important that the sensors are mounted flat and perfectly aligned. Unfortunately the mounting holes on one of my sensors were slightly off-centre which caused it to tilt slightly when bolted to the frame - resolved by reworking the holes in the frame. Similarly, the four wing support pads must lie precisely in the same plane.


YZC-133 load cell. One half is bolted to the frame, the other carries the cradle.

Also required are a couple of amplifiers for the load sensors. The ones I obtained are marked 'Keyes 234'. These are longer than the ones shown in Olav's photos, and I had to file some material from the ends to get them to fit in the enclosure.


Main compartment showing load cell amplifiers (red boards), and Arduino Pro Mini.

Display unit

The LCD panel is a generic 1602 (16 character/2 line) device. These are sold in two versions, with or without an I2C board.

My panel came without an I2C board, which meant that I had to use a second Arduino plus all the extra wiring. To get it all to fit, I had to drop the bottom of the enclosure by 2.5 mm. Fortunately Olav has published a STEP file, allowing the design to be modified using Fusion 360 or similar.


LCD panel (non-I2C version) and Arduino. Note fiddly wiring!

First switch on!

With construction over, it was time try apply power and stand well back. To my relief, nothing exploded, and the roof is still intact. There wasn't even any smoke!

There was just one issue: the battery voltage didn't show during the startup process. I modified the main sketch to add a short delay before writing to the display, and this cured the problem.

delay(500); // allow display to initialise
Serial.begin(9600);

For viewing and uploading the Arduino code (called 'sketches') I used the excellent web-based development environment. It's easy to use, even for an Arduino newbie like me.

Calibration

The last task is to calibrate the cells. The calibration constants are stored in memory, and documentation is a little thin here. The way I did it was to initialise the calibration constants to 1000. I then applied some known weights to each cradle, and noted the displayed values. I then amended the constants to display the weight in grams.

One nice thing is that placement of calibration weights isn't at all critical, it seems that the load cells are very good at responding to sheer stresses only, while rejecting bending moments.


Measuring the empty weight and CG of my Stribog

Conclusion

My unit works very well. Readings have been accurate and repeatable, over a range of ambient temperatures. Just a couple of niggles: the default cradles are quite narrow, so you may want to find an STL file for a wider version for anything other than the more recent F3X models. Also the battery life using the default PP3 is quite short, just a couple of hours.

Total cost including all hardware was around £40. If you can't or don't want to build your own, the CG scale can be purchased ready made from T9.

All in all, this has been a fascinating project, albeit more time consuming than anticipated. Best of all, CG measurement is now a pleasure instead of a chore!

Links

CG Scale project page (Github)
Build thread (RC Groups)
Arduino

2 comments:

Skywalker said...

Hi .
Nice working
A question is that if the hx711 & lcd
Are working with 5 volt how you connect them to
9 volt battery?
Thank you

Unknown said...

The arduino mini has an onboard 5V regulator - enough power for the lcd and the load cell amps. The onboard regulator is ok with a 9V PP3 or a 2S lipo (8.4V max).
Cheers
Neil Gillies