Diese Seite beschäftigt sich mit dem Umbau einer alten Tastatur, damit sie als Lernspielzeug für Kleinkinder eingesetzt werden kann.
This website outlines a modification of an old PC keyboard to become a toddlers learning toy.
Unser kleiner Sohn ist sehr interessiert an Technik, insbesondere auch jene, welche auch von Erwachsenen verwendet wird. Es findet alles elektronische interessant, und was Töne von sich gibt ist unschlagbar.
Our son, as of writing a toddler, is very keen on technical stuff. Especially devices used by grownups like keyboard, computers, etc. are interesting and things that produce sound are irresistible.
Bei einem Gespräch mit anderen technikaffinen Eltern kam das Gespräch auf alte Tastaturen als Spielsache. Einige hatten gute Erfahrungen dabei gemacht, die Buchstaben der Tastatur als Mittel zu benutzen, die Buchstaben des Alphabets zu vermitteln. Hieraus entstand die spontane Idee, dass man die Tastatur selbst die Ansage übernehmen könnte.
In a meeting with other like minded technical parents keyboards and their toy-value came up. Some had used keyboards and the characters printed on it to teach the alphabets letters to their children and had good success with it. Eventually the idea was born to make the old keyboard somehow speak the letters being pressed.
Das Ganze ist mal wieder eine Kombination von vielen bereits vorhandenen Bausteinen, die zusammen etwas Tolles ergeben. Alle Bauteile lagen halt herum und daher wurden sie verwendet, bestimmt gibt es auch andere Möglichkeiten.
The whole project is built around stuff I had laying around, so there should be plenty of ways pulling it off.
Eine (sehr) alte Tastatur (Baujahr ca. 1988), bringt das Gehäuse und "User-Interface" mit. Ein Arduino Nano ist mit dem original-Tastaturcontroller verbunden und nimmt die Eingaben entgegen.
An old keyboard (about 1988 vintage) gives the project its enclosure and "user-interface". An Arduino Nano is hooked up to the keyboards original controller and simulates the host PC and receives the keyboard inputs from the keyboard.
Der Arduino gibt nun über eine PWM Samples aus, die Samples werden von einer FAT formatierten SD-Karte geladen. Die meisten druckenden Tasten, also die normalerweise auch Zeichen erzeugen, werden nach ein paar Regeln auf Dateinamen abgebildet. Die Samples sind im .WAV-Format abgelegt, müssen aber mono, 8bit und mit einer Samplerate aus der Menge von (32, 22.05, 16, 11.25 oder 8 kHz) sein. Damit ist es relativ einfach, die auszugebenden Samples zu tauschen, ohne spezielle Software zu benötigen. Fehlt eine Datei, so bleibt die Tastatur dann einfach stumm.
The Arduino reads a WAV file from a FAT formatted SD card. The file name is determined by the key which was pressed so changing the sounds on the keyboard is as easy as properly naming WAV files on an SD card. The sound is output as PWM for the next stages. If a file is missing, the keyboard does not say anything. The library used supports 32, 22.05, 16, 11.25 and 8 kHz sampling rate mono WAV files with 8 bits.
Die PWM-Ausgabe wird durch eine kleine OPV-Schaltung vom groben PWM-Lärm befreit und wird dann mit einem PAM8406-Modul verstärkt. Als OPV wurde ein TLC277 verwendet, lag' halt herum.
To reduce PWM related hissing noise, a small and simplistic filter has been added. As an op-amp I chose a TLC277 from my parts bin. As an output stage a cheap Chinese PAM8406 module was used.
Glücklicherweise war in der Tastatur aus irgendwelchen Gründen ein Lautsprecher vorgesehen (einige obskure IBM Rechner hatten so was). Ein mechanisch wenigstens halbwegs (2mm zu viel Durchmesser) passender Ersatz (Ekulit LSF-28M/NT-B)
Somehow the keyboard had a speaker mounting hole and grill in the original case (some obscure IBM computers, not your regular PC, had that way back when). That way I could find a somehow fitting (2mm too wide) speaker (Ekulit LSF-28M/NT-B).
Da die meisten Dinge fertige Module sind, gibt es hier nur einen Verdrahtungsplan. Das Filter ist ja im Abschnitt Funktionale Beschreibung hinreichend beschrieben.
As this is mostly based around modules, here you only find a kind of block level wiring diagram. The filter has been sufficiently explained in functional description.
Da die Tastatur freundlicherweise an vielen Ecken Platz bietet, Module unterzubringen brauchte es kein weiteres Gehäuse. Insbesondere wenn die Tastatur aber auch noch für anderes genutzt werden soll, wäre es wahrscheinlich eine Option, doch eine kleine Box zu bauen. Aber so ist es wenigstes kompakt und das hat, bis jetzt, wohl kaum einer.
Due to the fact that the keyboard comes with plenty of space inside to mount all the modules, no external case is necessary. When you think about using the keyboard for something else once in a while, it might also be an option to go for an external box. But when everything is built in it looks rather tidy and as of today very few children will have something that retro-sleek.
Der Lautsprecher wurde mit einer kleinen Adapterplatte und viel Heißkleber im Gehäuse fixiert. Jetzt hat die Tastatur angeblich 2W Musikleistung.
The speaker, which was a little too wide in diameter is held in place using a small adapter plate I drilled out quickly was rather well hot glued into place inside the case. Now the keyboard supposedly has 2W PMPO.
Die restlichen Komponenten wurden ebenso zumeist mit Heißkleber an Ort und Stelle fixiert. Somit ist das Ganze erst einmal (hoffentlich) kindersicher. Das Gehäuse wurde zugeclipt und mit einem Kabelbinder sehr fest verschlossen. Nur ein USB-Kabel zum Arduino, auch paranoid zugentlastet, führt nach Außen.
All remaining components where also hot glued into place, so it might be shock proof to children's standards. The case itself has rather sturdy clips, but is also secured shut using a zip tie. Only the USB chord for power supply and Arduino programming leads outside, it has been strain relieved to the maximum extent possible without making it impossible to remove.
SD
: SD-Library byvon William Greiman, Spark fun, et. al TMRpcm
: WAV playback library that works with the SD-Library byBibliothek zum Abspielen von WAV-Dateien, die mit der SD-Bibliothek zusammen arbeitet. TMRh20PS2Keyboard
: Interface PS/2 and AT keyboards by Schnittstelle zu PS/2 und AT-Tastaturen von Christian Weichel, Paul Stoffregen, et.al$ sox ../ttsMP3....mp3 outfile.wav silence 1 0.01 .1% 1 0.1 .1% : newfile : restartin getrennte WAV-Files geschrieben und anschließend manuell nach obigem Schema umbenannt. resulting in multiple files that where renamed using the scheme described above. Die Klaviersamples wurden dann auch entsprechend in
PIANO_1.WAV
usw. umbenannt, da diese schon im WAV-Format vorlagen.
The piano samples were renamed to PIANO_1.WAV
etc. as they already came in WAV format.
Um die Samples nun für die SD-Karte vorzubereiten wurden diese mittels der folgenden Befehle, hier am Beispiel der männlichen Stimme, umgewandelt. Hierbei wird jedes Sample zuerst auf -3dB normiert, d.H. die maximale Amplitude beträgt 70% der Gesamtdynamik. Dann wird die Abtastrate auf 16kHz reduziert und auf acht bit Auflösung umgerechnet.
To prepare the samples for being played back on the keyboard, they are preprocessed using the following commands (here the male voices for example). With this, every file is by it self nomalized to -3dB, which means the maximum signal amplitude is set to 70% of the dynamic range. Then the sampling rate is reduced to 16kHz and resolution is changed to 8-bit.
$ mkdir -p ../sd $ cd male $ find . -name '*wav' -exec sox --norm=-3 {} -r 16000 -b 8 ../../sd/{} \;Der Quellcode des Projekts ist unter https://github.com/ptwz/SpeakKeyboard zu finden. You can find the sources at https://github.com/ptwz/SpeakKeyboard.