Dreambox: switching to plan A

      No Comments on Dreambox: switching to plan A

Planning is a good thing. Having your project mapped out before you start saves time and avoids wasteful detours and last-minute kludges. I should definitely do that some day.

My approach to electronics is the same as my approach to writing software: just get started – it’ll all work out somehow. Luckily, I don’t write code or build electronic devices for a living. My only customer is me. (Oh, except for one app, but that one was definitely planned. Honest.)

When I decided to build my Dreambox – a device for lulling me to sleep with gentle music – I opted to use a Raspberry Pi as the music machine and a Teensy as a kind of interface controller. I did something similar with my HMV1960 project and that worked out okay.

But then I got to thinking (always a dangerous move): in this plan, all the RPi is doing is playing a small, fixed playlist of songs. That’s rather a waste of its capabilities. After all, on the HMV1960 I have the Pi doing lots of stuff – like running a small web server, sending out random Tweets, running SIMH machines and more.

I’ve also already used a Teensy for an audio project – in fact, one that performs precisely the job I want it to do here. So why waste a Pi?

It didn’t take long to convince myself I should change course. I’m very persuasive when I’m the only person I need to persuade.

So, Plan B. In this version, the Teensy is still doing the interface job for which it was originally included, namely:

  • Controlling a small TFT LCD display.
  • Monitoring three switches (one on the side of the box to initiate the music playing, and two built into encoders to switch lights on/off and … um, something yet to be decided.
  • Monitor an encoder used to … er, also do something yet to be decided.
  • Control banks of LEDs for cool lighting effects.

Now that I write that list it seems that even the Teensy is being under-utilised.

There was one slight hitch. I’ve already built the board on which the Teensy sits and connects to all the other stuff. Like all my circuit boards, this was was made up as I went along, but it’s not too shoddy. I’ll provide some more details in my next Dreambox post.

Teensy audio board

No matter. I’d taken the precaution of socketing the Teensy. It looked to me like the audio board, which connects directly to the Teensy pins, would sit above my circuit board without problems.

Plan A was out the window. Welcome Plan B.

Then I did what I should have done earlier. I checked the documentation for the audio board. It seems that many of the Teensy’s pins it uses are already committed in my design, not least to drive that TFT display. Maybe I could reconfigure the software so that the display uses different pins, but that would mean throwing away the circuit board and starting again. And I’m not even sure it can be done given that I have other pins tied up with stuff like the switches and encoders.

Bye-bye Plan B. Welcome Plan A.

Yep, we’re back to the beginning. And it’s not altogether a bad thing. Yes, the Raspberry Pi will be under-utilised to start with. But mission creep is bound to set in at some point, and it’s handy having additional capabilities available. We’ll just have to see where this leads.


Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.