mirror of
https://github.com/eddyem/STM8_samples.git
synced 2025-12-06 10:45:12 +03:00
39 lines
1.3 KiB
Plaintext
39 lines
1.3 KiB
Plaintext
Algorithm
|
|
|
|
1. Main functionality - footswitch
|
|
|
|
By pressing footswitch you move drill down. Speed setup produced
|
|
by variable resistor on tray's control. Pulling footswitch
|
|
up returns drill into its previous position. If you press down the
|
|
footswitch when drill haven't reach its starting position, it moves down
|
|
again and returns back on next pulling up.
|
|
|
|
If drill motor was off, pressing footswitch will also turn it on.
|
|
|
|
If you pull down the footswitch when one of the tray buttons pressed, the
|
|
tray will move up or down.
|
|
|
|
2. Tray buttons
|
|
|
|
2.1. Left button (BTN1)
|
|
- press it and rotate potentiometer to change drill speed
|
|
- press both buttons to stop the drill
|
|
- press footswitch when it pressed to move tray
|
|
|
|
2.2. Right button (BTN2)
|
|
- press it and rotate potentiometer to change stepper speed
|
|
- press both buttons to stop the drill
|
|
- press footswitch when it pressed to move tray
|
|
|
|
2.3. Simultaneous pressing of both buttons will stop drill motor
|
|
|
|
|
|
The stepper's speed changes depending on current in drill motor. If it is too big,
|
|
the stepper paused until current will fall. The idle motor motion (upwards) done
|
|
on biggest speed.
|
|
|
|
To change the drill bit just press one of the tray buttons and push down the
|
|
footswitch. The tray will go up. To move it down press tray button and footswitch
|
|
again.
|
|
|