Hi all,
We’re designing and building a pop-up interactive disco experience for a festival. It will be unmanned, so making sure the tech runs smoothly is very important.
From a participants perspective the experience will be as follows:
They enter a room, there’s a table with 5 large round arcade buttons that are lit up, and 3 square buttons that are not lit up. They press one of the 5 buttons, which triggers a 3-5 minute song plus matching light show. Users are locked in for that duration, the LED in the button they pressed stays on, the others turn off. Once the experience starts, the 3 square buttons light up. These trigger 20s long sound effects. After the experience finished, the square buttons go dark, and all 5 round arcade buttons light up again, ready for the next experience.
We have the outputs from the laptop to the speakers and party lights covered with the skills in our team (we have some sound and light engineers). We’ll be running sound experiences from Ableton, and Ableton will also trigger one of 5 pre-programmed light shows. We have a large battery that will run the experience, so electricity is not a problem.
With regards to the buttons and input: I feel comfortable putting everything together (soldering etc.), but none of us has experience building the input side of things. Any advice on the following would be much appreciated:
- Is it better to use a Teensy or an Arduino board?
Initially we thought to use a Teensy, but the LED buttons are an issue as they need more voltage than the Teensy can provide (5-12V versus 3, and 20 amps versus 10). We can introduce a MOFSET, but from my research they seem more compatible with some of the Arduino models when it comes to voltage and amps.
- Will we need a MOFSET? - we need the LED’s to be very bright so they actually light up the button.
- What setup do we need for (MIDI) signals to go both to the laptop, and back into the buttons to make sure that the LED’s help signpost what experience is running and what buttons they can interact with?
- What should be on my shopping list?
I’ve made a very schematic drawing, hope that helps!
1 Like
Im sure there will be many ways to do this so just need to find the one that works best for you.
If the Laptop is going to run all the smarts then the bit you need help with is a fair bit simpler.
The amount of power needed for the leds will depend on the LED chosen for its color and/or brightness. Since these are fixed, I tend to agree with the fixed led and use the needed resistor to limit current. With the correct mosfet you can use the 3.3V or 5V logic to trigger a higher voltage led.
There are still a few ways you can do the controller, but Im thinking a dumb controller, laptop makes all the calls and tells it what to do.
e.g. on any button press, send button ID to laptop. Laptop can choose to action it or ignore it (e.g in the middle of a song)
the laptop can then send back the LED status.
so now, you just need a simple 8 Input, 8 Output controller.
on input trigger → send ID to Laptop
on RX led status → turn on/off led.
The comms between the the controller and laptop could just be Serial (Com Port X)
To manage any switch bounce, you can just take the very first trigger as it being pressed, then ignore all other input until the timer has expired (as per your design).
The laptop may get more then one trigger, but can just ignore unless its expecting a new one.
From here you can get more hightech and denounce better etc and only send events once. for the 8 you can encode them all in one byte with each bit for each button, but it wont really matter as it will all be very little data to deal with.
I would work backwards I think. pick the buttons and leds you want first as that is the show and user experience. that will dictate the power needed to turn on the leds, that then will give the specs for the mosfet and power to supply.
For there, any microcontroller with 16 free I/O pins can run the rest. Depending on that choice you will then add the misc bits; e.g. current limiting resistors, button pull up/down resistors, serial/uart interface (e.g. most not have a USB that can provide serial comms, but if that auto defaults to debug output that can be useful to keep as that and add a 2nd UART-USB on a 2nd UART port (back to the controller choice).
Bottom line, firm up the bits that are important then people can help with the exact makes/models to make that work.
hope that makes sense… I know its not, here is a shopping list, but that should fall into place later.
1 Like
Hi Michael, thanks for your reply, that’s already very helpful.
In regards to buttons and LED’s we’re looking at these:
LEDs
100mm dome buttons or a 60mm variant with same specs.
Square buttons
We would max have 5 buttons on simultaneously, which would be 100ma in total and 3.2-3.4V (If I’m understanding and adding everything up correctly!)
A dumb controller definitely sounds like the easiest way. Also helps us do most things on the laptop where AI can help us code…
Regarding the Serial comms - would that enable us to still send signals to each button individually? We would need buttons 6-8 to be active when 1-5 are locked down.
Many thanks!!
1 Like
Yeah, the uart/serial can send and receive data to/from the controller
So the controller will just loop and read each input pin, if button X is pressed, then send a unique command/value to the laptop.
e.g. Define some commands (im using a pseudo c here; but use what ever you feel os ok)
#define cmd_Button1_Pressed 0x01
…
#define cmd_Button8_Pressed 0x08
then on the laptop, copy the same defines…
if (Uart Input == cmd_Button1_Pressed ) then process as needed for button 1
then in the same way, define the LED on/off
#define cmd_Led1_On 0x11
…
#define cmd_Led8_On 0x18
#define cmd_LedAll_Off 0x20
#define cmd_Led1_Off 0x21
…
#define cmd_Led8_Off 0x28
So on your laptop code… I would see something like
if ((UartRX == cmd_Button1Pressed) and (AllowedToChange)) {
UartTX (cmd_LedAll_Off);
UartTX (cmd_Led1_On);
PlaySong…
}
and what ever other tacking/change you need
Note: how I added an LED All Off… as I can see you may want that to just send one command to turn them all off, then one to turn on the one you want.
Of course there are plenty of ways to do all this, so just some ideas here.
Since the controller is just scanning the Input pins in a loop and sending when a pin changes to its pressed state, then turning on/off one of its output pins when it gets that command, any controller with enough free I/O pins will work. Speed for this should not really be much of an issue.
so 16 Free I/O pins.. 8 for input and 8 for output.
Like above, ensure you can setup a UART to give clean output and note mixed up with some default debug. e.g. the ESP32 by default want to use the USB-Uart 0 as the debug uart, which you can remap to Uart1 to fix (or turn off). then just use the built in USB port on the controller to the laptap, and it should show up as a Serial port. of if needed you can get a USB to UART adapter and wire that to its own UART and leave the USB 100% for firmware update/debug works. All just options fo how you want to work.
2 Likes
Your schematic makes sense. I’d go with a Teensy and use MOSFETs to drive the 5–12V LED buttons from a separate power supply. The Teensy only needs to handle the control signals, so the higher LED voltage/current isn’t a problem.
For communication with Ableton, USB MIDI would probably be the simplest option: button presses go from the Teensy to the laptop, and MIDI/serial commands can be sent back to control the LEDs and enable/disable the square buttons.
I’d also recommend using proper flyback/protection where needed and keeping the LED power supply separate from the Teensy’s 5V/3.3V logic supply. The schematic looks like a good starting point.
1 Like
Amazing, thank you! I think this covers most of it.
We’re making one modification; we’re getting all white buttons and using RGB LEDs with a control IC in them (see link). Just ordered these. They should make the light side of things easier as we won’t need MOSFETs. From what I then understand we’ll be sequencing the lights in a daisy chain, and it should be more straightforward.
Thanks for all the inputs! Placed my orders so now it’s waiting for them to arrive and then building!
1 Like