Hardware#
Components#
Component |
Description |
|---|---|
2× Nema-17 stepper motor |
Mounted above and to either side of the scan area |
GT2 timing belt |
Spans both motors; payload hangs from its midpoint |
GT2 drive gear (25-tooth) |
One per motor; engages the belt |
Drives both steppers from a single Arduino |
|
Arduino (Uno or compatible) |
Runs the |
The belt forms a V-shape between the two motors. Each motor changes the length of one side of the V, moving the payload in two dimensions.
Firmware#
The Arduino must be flashed with the bundled acam3 firmware before
first use.
Automatic (recommended) — connect the Arduino and launch any
QPolargraph-based application. If the application finds an Arduino but
no acam3 firmware, it opens
FlashDialog automatically. Click
Flash Firmware to install the firmware and the application will connect
immediately after. This requires
arduino-cli to be installed
and on PATH.
Manual flash tool — run the standalone flash utility:
qpolargraph-flash
This opens the same dialog independently of the main application.
Arduino IDE — open hardware/arduino/acam3/acam3.ino in the
Arduino IDE and upload manually.
The firmware and package versions are coupled: Motors.identify()
checks that the connected Arduino reports the expected firmware version
and that the Adafruit Motor Shield is detected at I2C address 0x60,
refusing to open the port if either check fails.
You can also wire FlashDialog into a
QMainWindow application as a menu action (see
FlashDialog for the example).
Calibration#
Five geometric parameters describe the polargraph. Set them in the
QPolargraphWidget control
panel or pass them directly to
Polargraph:
Parameter |
Default |
Description |
|---|---|---|
|
1.0 m |
Horizontal distance between the two motor pulley centres |
|
0.1 m |
Vertical distance from the pulleys to the home position |
|
2.0 mm |
GT2 belt tooth pitch |
|
25 |
Number of belt teeth on the drive gear |
|
200 |
Motor steps per revolution |
Measure ell and y0 with a ruler after mounting the motors.
pitch, circumference, and steps are determined by the belt
and gear specifications and normally do not need to change.
Settings are saved to ~/.QScanner/ automatically when the application
closes, so calibration only needs to be done once.