Pinewood Derby Tools

Scale Software

This page provides information to aid in the installation of the scale sketch for the Pinewood Derby Car Scale.  Refer to the Construction page for information on constructing the scale's hardware (circuit, enclosure, etc.).

The following subjects are covered:

BACK TO SCALE OVERVIEW PAGE

Programming Environment

Arduino Environment

The Arduino development environment is required whether you will be utilizing the default Teensy 4.0 microcontroller or the optional Arduino Due microcontroller. It consists of an integrated development environment (IDE) that allows programs to be edited, compiled and uploaded to the microcontroller. Refer to the Arduino web page which corresponds to your system type and follow the steps to download, install and test the IDE:

Teensyduino

For the Teensy 4.0 microcontroller an add-on needs to be installed which allows the Teensy to be programmed within the Arduino environment. See this page to download the installer and for detailed installation instructions. After installation the remaining steps in uploading the sketch are done from within the Arduino IDE.

Verification

To verify the programming environment has been installed correctly open the "Blink" sketch in the Arduino IDE; use the corresponding sketch for the microcontroller being used:
Arduino Due: File > Examples > 01.Basics > Blink
Teensy 4.0: File > Examples > Teensy > Tutorial1 > Blink
Upload the sketch and verify the LED is blinking on the microcontroller.

Do not continue until you have successfully uploaded the blink example to your board as described in the above instructions. If you could not get the blink example to work you will not be successful uploading the scale sketch.
Scale Sketch

COMING SOON! Final testing is being done on the sketch and it will be available on Saturday, November 7th.

There are a couple of quirks in the Arduino environment:
1) the folder name MUST match the name of the scale sketch. You can change the name but they must match. So if you name the sketch fred.ino then the name of the folder must be fred.
2) Keeping multiple copies of the scale sketch (backups for example) in the folder will cause the compile to fail. There should only be one sketch file in the folder, move any backups to another directory.
BACK TO TOP

Scale Configuration

Currently, there are no software configuration options in the scale sketch. Refer to the Construction page for information on available options via hardware.

BACK TO TOP

Uploading Scale Sketch

In the Arduino IDE open the scale sketch from the folder it was placed in and upload the sketch to the microcontroller by pressing the "Upload" button. This is the same process used when you tested your environment by uploading the blink example earlier.

BACK TO TOP

Scale Operation

Operation of the scale is simple. Turn on the scale by making sure the DC power supply is plugged in and the scale's power switch, if installed, is in the "On" position. The startup screen will be briefly displayed and then the main screen will be shown. If needed, tare the scale and then place the derby car on the scale. The weight and weight distribution(%) will be then be displayed. Use the "Units" button to toggle between displaying the weight in grams and ounces.

BACK TO TOP

Calibration

Calibration of the scale is done utilizing a 50g reference weight which is placed on each load cell in turn so the scale can calculate and store a unique calibration factor for each load cell.

The calibration sequence is started by pressing and holding the Tare button while turning on the scale. Once the calibration screen appears on the display release the Tare button. Follow the instructions on the display to complete the calibration sequence.

BACK TO TOP

Last updated: 1 Nov 2020