Programming for the new servo control started from the test program written yesterday rather than the code written specifically for the wrist mount. Only the code for toggling the position bit was kept. Bulky code, including the bit toggling code, was moved out of the main loop() and into appropriately named functions to increase readability. Comments were still sparse.
Code this time doesn't rely on limit switches so there are two fewer inputs. Inputs were also moved from pins appropriate to the Digispark to pins appropriate for a standard Arduino board. A Pro Mini board was chosen.
Servo control used the code from yesterday which used a timed pulse from 500µS to 2500µS which was double the standard range. The standard servo library used timed pulses from 1000µS to 2000µS. Additionally a new trick was added which sends a 3000µS (3000µS = 3 milliseconds = 0.003 seconds) pulse to the servo that should effectively disable it and reduce power consumption. The position is reasserted periodically in case of slippage.
An analog input variable was processed to control the speed. During demonstrations it may be better to have the servos move slowly to catch the eye and give the impression of a heavy-duty machine while fast moving servos would be more convenient when a keyboard is immediately necessary.
Downloadable Files:
The rest of the posts for this project have been arranged by date.
First time here?
Completed projects from year 1.
Completed projects from year 2.
Code this time doesn't rely on limit switches so there are two fewer inputs. Inputs were also moved from pins appropriate to the Digispark to pins appropriate for a standard Arduino board. A Pro Mini board was chosen.
Servo control used the code from yesterday which used a timed pulse from 500µS to 2500µS which was double the standard range. The standard servo library used timed pulses from 1000µS to 2000µS. Additionally a new trick was added which sends a 3000µS (3000µS = 3 milliseconds = 0.003 seconds) pulse to the servo that should effectively disable it and reduce power consumption. The position is reasserted periodically in case of slippage.
An analog input variable was processed to control the speed. During demonstrations it may be better to have the servos move slowly to catch the eye and give the impression of a heavy-duty machine while fast moving servos would be more convenient when a keyboard is immediately necessary.
Downloadable Files:
- Common OpenSCAD files
- Servo footprints for OpenSCAD.
- Arduino Code for wired keyboard
- Spreadsheet for chords.
- Wrist mount
- Servo arms
- 40mm longer
- Straight
- 2 hinged
- 2 servo ended
ProgramNew times for servos. 500µS to 2500µS3000µS to stopPotentiometer input, A0Speed. 1-100Refresh once positioned- Terminal board
Short wires2 servo connectionsScrew terminals for wrist switchPotentiometer- Input voltage
- USB
- 6-15volts
- Make base for keyboard
- Integrate:
Servos- Enclosure for each controller
- Potentiometer access
- Activation switch
- Power connection
- Debug
- Test
- Refine
- Repeat
- Write instructions
- Compress and link to all files
- OpenSCAD files
- STL models
- Arduino code
- Make diagram with every part labeled
- Schematic for servo controller
The rest of the posts for this project have been arranged by date.
First time here?
Completed projects from year 1.
Completed projects from year 2.
Disclaimer for http://24hourengineer.blogspot.com/
This disclaimer must be intact and whole. This disclaimer must be included if a project is distributed.
All
information in this blog, or linked by this blog, are not to be taken
as advice or solicitation. Anyone attempting to replicate, in whole or
in part, is responsible for the outcome and procedure. Any loss of
functionality, money, property or similar, is the responsibility of
those involved in the replication.
All digital communication regarding the email address 24hourengineer@gmail.com becomes
the intellectual property of Brian McEvoy. Any information contained
within these messages may be distributed or retained at the discretion
of Brian McEvoy. Any email sent to this address, or any email account
owned by Brian McEvoy, cannot be used to claim property or assets.
Comments
to the blog may be utilized or erased at the discretion of the owner.
No one posting may claim claim property or assets based on their post.
This blog, including pictures and text, is copyright to Brian McEvoy.
2015-09-25 (F)
Comments
Post a Comment