Author Topic: Footswitch led indicator (rings)  (Read 767 times)

Muldee

  • Newbie
  • *
  • Posts: 3
    • View Profile
Footswitch led indicator (rings)
« on: September 26, 2021, 10:58:32 AM »
Looking at the example setup, how does one manage led (ring) for footswitches? As far as I understand, debounce header has V+ and GND to connect the 5 switches, I simply don't understand how to supply the led rings and make them turn on/off according to footswitches. Moreover, are they 9V led rings?

Randall (Admin)

  • Administrator
  • Full Member
  • *****
  • Posts: 222
    • View Profile
Re: Footswitch led indicator (rings)
« Reply #1 on: September 26, 2021, 11:24:02 AM »
Good question.  Yes, the switches themselves would generally attach to the debounce header (although you could alternatively/additionally attach them, to the Analog input header).  Pi-Stomp Core also includes 3 undedicated GPIO's which can be used to drive LED's.  The PCB includes a place to add current limit resistors for those.  The kit includes three 33 ohm resistors which I've found to work best for the LED halos that are generally marked as able to operate from 5v to 12v:
https://smallbear-electronics.mybigcommerce.com/led-washers/
https://www.taydaelectronics.com/catalogsearch/result/?q=halo

Those don't include an internal limiting resistor which is why they can work with 3.3v and a small resistor.  The 9v halos that I've tried, include a limiting resistor which drops too much voltage.

You could also of course drive single LED's.  You'd want to find the ideal current limiting resistor to provide the brightness you desire.

You map your GPIO's to a footswitch via the config file (https://www.treefallsound.com/wiki/doku.php?id=configuration_file_guide) and then the pi-stomp code takes care of coordinating footswitch actions with toggling the LED halo and the LCD and performing whatever actions you assign the footswitch (preset increment, midi CC message, global bypass, etc.).

As it is, you'd only be able to drive 3 LED's.  But using those 3 GPIO lines, one could attach a demux (eg. https://assets.nexperia.com/documents/data-sheet/74HC_HCT238.pdf) to drive up to 8 LED's.  I've not done that yet but plan to in the next month or so.  It'll require a code update since the 3 GPIO's in that case will be used as address lines instead of driver lines.  I'll post back to this thread once I've got it working.  Unless someone beats me to it  ;)