Writing mostly as a log for my own clarity – what i’ve been doing for my electronics hobby lately. Lets start with a bit of a history of electronics for me. This might be a bit of a script for a youtube video I need to make which i’ll link back in here.
I went to university Bachelor of Science and in the Physics department and Computer Science department there were subjects where one did experiments with capacitors and power (former) and digital electronics (the latter).
During and after university I had this interest in guitar playing. So owning a guitar or two the soldering iron came out to fix broken wiring (or mess it up and put switches in backwards). I opened one of my amps that fell into disrepair. A mosfet Marshall and offered it to my friend that if he got it repaired he could cover price of repair and if it was cheap give me the difference. Basically i gave it to him for free and he got it fixed because the repair was substantial. He liked it. So there the seed of “wanting to know repair” was born.
I built tons of “whiteboxes” as I moved into the employed world or for my musician friends as they grew out of being children. Whitebox = generic PC – motherboard, RAM, DISK, cards = probably for cheaper than some pre-build branded offering. So I met headers, plugs, power supplies (you have to match that). One computer sucked until we gave it a stronger power supply. These computers could run audio engineering and recording software, effects plugins. During those days we bought cheapish digital effects processors and ran cables in/out for live shows or recording. That started to get switched out for emulated effects. We had drum machines and those started to vanish for synth and sampler plugins. There was a golden age of synth and drum machine that died off.
Then I formed some bands and one hired me into their trio. They had keyboards/samplers and I just had the job of the guitar so … I didn’t miss much with this. Mostly I did it on the computer.
Flash back a few years earlier I had worked contract and had to deliver it to the USA. I wrote a fully functional sequencer and synth manager for an OP3 chip. That is an FM-synthesis chip that is found on old sound cards like Sound Blaster and used for video game sound or some other basic music gear. That is from the intel 386 – intel 486 days. I wrote in C++ and assembler and I used a mac with a sequencer to compose. Then I converted the midi files into a form to run soundtracks. This was meant to be a module in video game development but my time there ended. I didn’t want to get a green card so I returned to Australia. Green cards and US citizen status are not really undertaken lightly. I’d already spent years in the USA as a child and seen a lot of the country.
Anyway, I have this history with electronics but it was kind of forced upon me by circumstance. On the other hand, I have an appreciation and soft spot for instruments.
I’ve bought midi keyboards over and over because I was moving around and needed to create but then would just give them away. Drum pads – and I have a Tenori On that I bought as a collectable because it just felt right. I bought that when I was working in France in the IT and spiritual/meditation world [it was culty]. Then I had a lot of spare time to experiment and I started to think of making my own thing – but the skills were not there.
The Tenori On has 16 x 16 grid but it feels limiting because it doesn’t chain together series of patterns so easily. You have to manually organize them and switch them.
These last couple of years I’ve started making digital (Arduino development and experimental boards) as well as analogue amplifiers and mp3 players. Various lighting and pre-amplifiers and a headphone amp and so on. I have to update the headphone amp because I built a second prototype which is still in use – the first one didn’t work out. Recently I repaired headphones damaged by these half working headphone amp circuits which was a good feeling to do – not hard other than to find the drivers and dismantle/assemble.
So I felt like I had done enough analogue only projects – I started back towards the digital world but wanted to bring things together. First I made this toy computer … that I had hacked and messed with into a kind of platform for experimenting. Inside it has a speaker that can also switch into headphone amplifier mode (so that’s 3 headphone amps now). It has an ESP32 that listens (samples) the audio from that amp – it has an SD card mp3 player it controls and then it does analysis and lights up a digitally controlled meter and enables colour.
Pro Kid computer toy was gutted and has a microprocessor, SD audio player, amp and speaker and headphone amp output. Audio is analysed by samples, math and converted into a colourful meter. There are also 2 PSU in Prokid – 5v and 9-0-9 for the audio parts.
Putting things into old cases of toys was the vision of buying them – but they sat around for over a year waiting for my aspiration and skill to close in. Making things strong enough to last while you toss and flop them trying to make them fit in some random box … they often break a wire or otherwise need constant on the fly repairs. So the pro-kid was the casing of one project – and it can be leveraged by others in future as a sound test input. Right now its not exactly accessible. In the picture above – on the white plastic breadboard is a working synthesizer with a USB host but to play notes on it I needed to build something else.
I like to take ideas and merge them and I wanted a makeshift real keyboard that was playable. I found a toy keyboard – it was only about $5 and, while it can make sound it’s absolutely unusable and atrocious. That didn’t bother me – because it has a usable keyboard, albeit “toy” child-sized that I could hack into and integrate to locally control a copy of the synth. I wanted a proper stand-alone toy. Later I hope to put a speaker and mini amp inside it and see a child play with it (or an adult).
So I set to figuring out how to wire the columns and rows approach they use to having many keys. I figured out enough to make all the keys work using 7 columns x 6 rows (42 possible keys). When a button is pressed it can be noticed as a coordinate by which row and column are being tested when the switch is noticed. You have limits on how many wires you can link to your computer (This one is an ESP32) – I wanted to keep them free. So I got another chip called a GPIO expander – pins on these microcontrollers are called general-purpose input-output. For about $2 I could add 16 more pins. This was becoming my greatest challenge yet in terms of running out of pins.
The software is about 30% me but the modules for MIDI and synth come from Marcel Licence – see his GitHub where he has quite a few other cool things I hope to implement too. He doesn’t walk you through – you really have to want it – but you can communicate with him. He also has YouTube where you can see and envy his creations. Seems very prolific and talented to me. Envy or inspired to make it – a more positive result. If you just want a synth you can easily buy one but for me like Richard Feynman said “what I cannot create, I do not understand” .. which is to say that these man-made things can be understood. For me, nature is more mysterious.
Some small technical information – this CPU is called an ESP32 – its meant to be like a wifi chip but it has obviously got many other possibilities and some rather potent computing power. 2 cores. It costs only a few dollars as a “development board” with a USB. You can load your own programs into it to read and write voltage to the pins – that way you can interface to the real world. The synthesizer creates wave forms which are transformed into a good sound using a DAC (digital to anologue) converter which is another small chip. So this has a few different parts. It has a little screen because I want to replace everything fake with something real bringing the childs fantasy into reality. I guess I’m the adult child.
To be continued – this is getting too long. I’ll present the more finished version of this little keyboard and the headphone amplifier in another post.