From fa39953cc43c75df15f08015700e3533fc05576f Mon Sep 17 00:00:00 2001 From: kevin Date: Sat, 24 Oct 2020 13:56:06 -0400 Subject: [PATCH] control/README.md : Initial commit. --- control/README.md | 83 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 83 insertions(+) create mode 100644 control/README.md diff --git a/control/README.md b/control/README.md new file mode 100644 index 0000000..4c3ac3b --- /dev/null +++ b/control/README.md @@ -0,0 +1,83 @@ +This folder contains the _picadae_ control code. + +The _picadae_ control program consists of three parts: + +- _tiny_ : Keyboard solenoid driver +- _ctrl_ : Keyboard central controller +- _app_ : Monitor and command utility. + +# Architecture + +The keyboard control hardware consists of 8 driver boards +mounted above the solenoids on the keyboard assembly. +Each driver board has 11 key driver circuits and can +therefore control 11 piano keys. Each key driver +circuit consists of an ATtiny85 microcontroller +which controls a set of power transistors +which in turn control the state of the solenoid. +The solenoid can be in one of three states: + +- off +- attack +- hold + +The attack state is triggered by pulsing the +the solenoid with a fast (250 microsecond to +30 millisecond) 36 volt pulse. The duration +of the pulse determines the attack dynamic. +The hold state then holds the key down +during the sustain portion of the note. + +All 88 ATtiny85 microncontrollers are attached +to a single I2C bus which is shared with +an Arduino Uno. The application computer +communicate with the Uno via +a serial connection. The Uno in turn +translates messages between the +ATtiny85 channel computers and the +application computer. + +# Keyboard central controller : Arduino Uno Serial Interface + +Read a register value of `` bytes from channel `` + + 'r' + +Write a register value of `` bytes from channel `` + + 'w' ... + + +# Keyboard solenoid driver : ATtiny85 Firmware + + +PWM counter frequency and period. +for each possible `div` setting +with 16 Mhz system clock. + +Value | Div | Frequency | Period +------|------|-------------|------- + 1 | 1 | 16 M | 62.5 n + 2 | 2 | 8 M | 125 n + 3 | 4 | 4 M | 250 n + 4 | 8 | 2 M | 500 n + 5 | 16 | 1 M | 1 u + 6 | 32 | 500 K | 2 u + 7 | 64 | 250 K | 4 u + 8 | 128 | 125 K | 8 u + 9 | 256 | 62500 Hz | 16 u +10 | 512 | 31250 Hz | 32 u +11 | 1024 | 15625 Hz | 64 u +12 | 2048 | 7812.5 Hz | 128 u +13 | 4096 | 3906.25 Hz | 256 u +14 | 8192 | 1953.125 Hz | 512 u +15 |16384 | 976.6625 Hz | 1024 u + + +# Monitor and command utility : Python Utility + + + + + +