Home of the Squeezebox™ & Transporter® network music players.
Results 1 to 8 of 8
  1. #1
    Senior Member chill's Avatar
    Join Date
    Mar 2007
    Posts
    568

    My RPi Button Board project

    Pippin's announcement of a new tool to use buttons and rotary encoders on a Raspberry Pi inspired me have a play with hardware controls for a Pi-based player, and since I'm planning to build an integrated amplifier (based on Hypex amps and their DLCP DSP board), I thought I'd combine the two and build a Raspberry Pi into the enclosure and make it the default source. 'Paul-' has been further developing the button daemon, and it's turning into a powerful tool.

    I thought I'd try to make a control panel for the RPi that would match or mirror the DLCP control panel.



    My idea was to connect the panel to the RPi via a ribbon cable so that the button panel could sit behind the amp's front panel, and the RPi could be mounted elsewhere inside the enclosure.

    Hypex were kind enough to give me details of the switches and button caps that they use (they really are very focused on the DIY market). They also supply CAD drawings of their DLCP control panel, so I used the measurements to draw up a simple circuit board (my first!) and had some samples made. I included a couple of spaces for an IR receiver, so that the panel could be made to exactly match the DLCP or, the other way up, to mirror it.



    The samples arrived today, so I built one up.



    The idea was to install pin headers into the 'GPIO Pins' and 'Switch Pins' locations so that I could experiment with different GPIO configurations, but while I was waiting for the boards to arrive I finalised which pins I wanted to use so I hardwired this board. The pins I've chosen avoid the ones commonly used by the HiFiBerry add-on amps and DACs.



    The underside of the board carries a socket so that the board can mount directly to the RPi, hat-style (it's not a hat, as it doesn't have an EPROM to identify itself to the RPi, but the mounting holes are at the right spacing to mount hat-style). I also included a box header so that the board could be mounted on a ribbon cable, or alternatively so that other devices (amp, DAC etc) could be daisy-chained. With the board mounted on top of the RPi it gives me a convenient place to hang the RPi inside my amplifier enclosure - no need for a separate location or a ribbon cable - it'll just hang off the button board behind the front panel.





    Here's the built-up board next to its inspiration.



    By luck, the button arrangement fits perfectly within the cutout in the lid of the official RPi case, so I made sure the board would fit inside the case (hence all the little shaping details). I'm considering having some made without the box header tab on the side, or possible making the tab a snap-off section, so that it fits entirely within the case. There's no reason why I couldn't simply saw off the tab on the existing boards though.



    I also made a little clip-in panel on my 3D printer. I quite like the 'Fisher-Price' look of the red-and-white case with yellow buttons.
    I included 'grilles' in front of the IR receiver locations, but in fact they're not really needed as the IR gets through the PLA clip-in panel.

    Last edited by chill; 2018-04-21 at 05:09.

  2. #2
    Senior Member
    Join Date
    Apr 2013
    Location
    UK
    Posts
    1,231
    Where do I click "likey very much"?

    When can I buy one?


    Transcoded from Matt's brain by Tapatalk
    --
    Hardware: 3x Touch, 1x Radio, 2x Receivers, 1 HP Microserver NAS with Debian+LMS 7.9.0
    Music: ~1300 CDs, as 450 GB of 16/44k FLACs. No less than 3x 24/44k albums..

  3. #3
    Senior Member
    Join Date
    Apr 2005
    Location
    UK/London
    Posts
    985
    Very neat and tidy.

    A bit like the new Cosmic Controller from IQaudIO.
    Paul Webster
    http://dabdig.blogspot.com
    Author Radio France (FIP etc) plugin

  4. #4
    Senior Member chill's Avatar
    Join Date
    Mar 2007
    Posts
    568
    Quote Originally Posted by drmatt View Post
    When can I buy one?
    Haha - I do have the parts to make up a few more from my sample boards, so if you're genuinely interested I could work out the cost of the parts and let you know.

    But I'm planning to tweak the design a bit for the next batch, so there'd probably be a choice of the 'daisy-chain' version as above, or one that would fit entirely within the official case. And I'd fix an obvious shortcoming of the layout, so as to do away with the need for that diagonal black (GND) wire.

  5. #5
    Senior Member chill's Avatar
    Join Date
    Mar 2007
    Posts
    568
    Quote Originally Posted by Paul Webster View Post
    A bit like the new Cosmic Controller from IQaudIO.
    I hadn't seen that. Why didn't I think up a snappy name for mine?!

    Mine does also allow a rotary encoder to be connected to any of the spare GPIO pins (an encoder with a push button function requires three more GPIO pins). But the software tool for programming these buttons will also allow bigger volume 'steps' to be programmed on the volume buttons. The scale goes from 0 to 100, in default steps of 2.5 (to map directly onto the 40 steps of a Squeezebox display). I've found that programming steps of 5 makes the buttons a lot more responsive, and I could happily live without the rotary encoder. But the facility is there, or should I say the option to add one is not blocked by my board, even if there isn't a physical space on the board to mount one.

  6. #6
    formerly known as Fletch
    Join Date
    May 2005
    Posts
    2,246
    Very nice!

  7. #7
    Senior Member pippin's Avatar
    Join Date
    Oct 2007
    Location
    Berlin
    Posts
    14,447
    Niiice!
    ---
    learn more about iPeng, the iPhone and iPad remote for the Squeezebox and
    Logitech UE Smart Radio as well as iPeng Party, the free Party-App,
    at penguinlovesmusic.com
    New: iPeng 9, the Universal App for iPhone, iPad and Apple Watch

  8. #8
    Senior Member chill's Avatar
    Join Date
    Mar 2007
    Posts
    568
    I made a second iteration. I learned the benefits of having a ground plane (or two!) for signal routing, and I improved the layout so that it’s easier to connect switches to GPIO pins without soldering. The middle column is the switch pins, the right hand column is some commonly unused GPIO pins, and the left column is some alternatives in case some of the pins in the right column are taken by other devices. So every switch pin has a choice of two GPIO pins that can be connected via jumpers alone, but if a different configuration is needed then jumper leads might be needed. The two alternative arrangements of legs on the IR receiver can also be accommodated by the third and fourth rows of pins.



    I also made a version without the breakout tab on the side so that it fits wholly inside the ‘official’ case. In this case, there would be no other devices to the RPi, so any of the available GPIO pins could be used.




Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •