Author Topic: Troubleshooting analog inputs on pi-Stomp Core build  (Read 572 times)

Venya

  • Newbie
  • *
  • Posts: 13
    • View Profile
Troubleshooting analog inputs on pi-Stomp Core build
« on: March 19, 2022, 04:36:15 PM »
The setup:
- pi-Stomp Core with MIDI/expression add-on, 3 toggle footswitches, and two additional analog pots
- "official" enclosure

Basically, the default demo build (though I've not yet added the cool LED rings).

I did the initial build with just the core kit and two analog pots and after a few missteps (i.e. I literally had my wires crossed for the audio output), it was working lovely, except for the analog pots. I assumed a wiring error or something and didn't worry too much because I knew I'd be popping it open again.

Today I wired up the MIDI/expression add-on board and installed that in the enclosure. I also double-checked all of my connections for everything else. As far as I can tell, it is identical in setup to the default instructions showing you how to add three footswitches and two analog pots, plus now I have an expression pedal.

But alas, when I try to assign a control to a task in the web interface, I am still getting nothing from any of the analog inputs; it's as though they're not being seen by the system.

The relevant part of my ~/pi-stomp/pistomp/default_config.yml:

Code: [Select]
analog_controllers:
  - adc_input: 0
    midi_CC: 70
    type: KNOB
  - adc_input: 1
    midi_CC: 71
    type: KNOB
  - adc_input: 7
    midi_CC: 77
    type: EXPRESSION

I tried running ps-run -l debug to get some sense of what was going on and it seemed to respond to other inputs (e.g. footswitches), but I'm not sure whether just turning the analog pots should be reflected there.

What's a good next step?  Is there a command line utility that will let me read the analog inputs to see if they're actually getting anything?

(Everything else seems to work as before, so at least I haven't broken anything else in the process.)
« Last Edit: March 19, 2022, 06:28:08 PM by Venya »

Randall (Admin)

  • Administrator
  • Full Member
  • *****
  • Posts: 217
    • View Profile
Re: Troubleshooting analog inputs on pi-Stomp Core build
« Reply #1 on: March 19, 2022, 11:46:29 PM »
Sorry it's not working.  Yes, there is a nice test debug utility for this.

Do this from an ssh session:
ps-stop
ps-run --host test

That will bring up a curses UI (see attached).  At the top you'll see the state of Footswitches, Analog controls and the Encoder.   If you tweak one, you should see the value change.  If not, there could be a hardware problem.

Wiring would be the first place to look.  For your default_config.yml, the middle lug of the first control should connect to ADC input 0, and the outer two to 3v and ground.

The other culprit could be a bad ADC chip.  Make sure it's inserted correctly in the socket and fully seated.

If none of that makes the value change in the test utility, let me know.

If you do get the value to change, then stop the debug util with Control-C, and return to normal mode by running: ps-restart

Then try to map the control in the MOD UI.  Should point out that a given MIDI CC can only be used for one control of a given pedalboard.  If you try to map it to a second, it will be ignored.  That's just a limitation of MOD.


Venya

  • Newbie
  • *
  • Posts: 13
    • View Profile
Re: Troubleshooting analog inputs on pi-Stomp Core build
« Reply #2 on: March 20, 2022, 11:05:25 AM »
Excellent, thank you! I knew there had to be something to check out. I have to attend my birthday party today, but I will dig into this tomorrow and see what results.

Venya

  • Newbie
  • *
  • Posts: 13
    • View Profile
Re: Troubleshooting analog inputs on pi-Stomp Core build
« Reply #3 on: March 21, 2022, 09:50:12 AM »
I can see the footswitches and encoder do things in the curses utility, but analog controls are still decorative.

I will crack it open and wire up a fresh simple setup (just one pot) and see if I can make it play nice.

Update: I unplugged the other analog pots and carefully wired up a fresh one, nice and simple, and tried it on the 0 control.  Still no effect.  I will see if I did something obviously stupid with the ADC chip next.

Even more updated: not that I can tell. I don't know that I have a good tool to remove the ADC and re-seat it without breaking something, nor whether that is even likely to help. I will think on this some.
« Last Edit: March 21, 2022, 11:14:47 AM by Venya »

Venya

  • Newbie
  • *
  • Posts: 13
    • View Profile
Re: Troubleshooting analog inputs on pi-Stomp Core build
« Reply #4 on: March 21, 2022, 11:31:51 AM »
I just looked at your screenshot again and realized that mine is missing some things that seem relevant. This screenshot was taken just now; everything "extra" (e.g. footswitches, MIDI breakout board) is disconnected except for the one analog pot I wired up for testing.
« Last Edit: March 21, 2022, 11:34:28 AM by Venya »

Randall (Admin)

  • Administrator
  • Full Member
  • *****
  • Posts: 217
    • View Profile
Re: Troubleshooting analog inputs on pi-Stomp Core build
« Reply #5 on: March 21, 2022, 06:52:05 PM »
Yeah, if you're not seeing an "Analog Controllers" section in the curses test utility, then that's a software config problem.

The utility shows what's defined in the default_config.yml file.  Your YML snippet looked good, but maybe it's not from the actual file?  If you run: more ~/pi-stomp/pistomp/default_config.yml

Does it definitely include the analog_controllers defn (uncommented)?

If not, you could copy the example:
cp ~/pi-stomp/pistomp/default_config_3fs_2knob_exp.yml ~/pi-stomp/pistomp/default_config.yml


Venya

  • Newbie
  • *
  • Posts: 13
    • View Profile
Re: Troubleshooting analog inputs on pi-Stomp Core build
« Reply #6 on: March 21, 2022, 08:02:51 PM »
SWEET!  I'd much rather "something dumb I did on the command line" than "something dumb I did with hardware that may require solder wicking."

OK, I definitely have an analog section now and it's tweaking out because there's nothing plugged into it except the one test pot I made--which works fine.

I can't figure out what I was editing before, but apparently it wasn't the correct default_config.yml. There's a lesson here about paying attention to detail or perhaps not drinking while editing configuration files.  Either way, I probably won't learn it.

Thank you for your patience.

Update: Yes, it all works as expected/hoped now. I realize now that after checking everything else I could think of hardware-wise, I rm-r'd the pi-stomp folder tree and reinstalled as a last ditch effort, so of course the default_config.yml was back to default because I forgot to uncomment those lines again after reinstalling. I know I had done it somewhere before but unfortunately I can't ever be certain where I went wrong. But it works now and I'll take it.
« Last Edit: March 21, 2022, 08:23:09 PM by Venya »

Venya

  • Newbie
  • *
  • Posts: 13
    • View Profile
Re: Troubleshooting analog inputs on pi-Stomp Core build
« Reply #7 on: July 30, 2022, 05:42:24 PM »
I went through this all again almost exactly when I just reloaded my piStomp with the beta OS.

Note for future reference because I can't find my notes: for some reason, I decided to put my expression pedal on analog 2, not 7.

I just saved future me about an hour of troubleshooting.

Randall (Admin)

  • Administrator
  • Full Member
  • *****
  • Posts: 217
    • View Profile
Re: Troubleshooting analog inputs on pi-Stomp Core build
« Reply #8 on: July 30, 2022, 07:01:36 PM »
Thanks for pointing that out.  I've updated the install guide to recommend backing up default_config.yml and editing once your build is complete.

Also added something in the troubleshooting guide.

Since its a common thing to get wrong.  We'll soon consider an option to setup.sh for specifying some common configurations (v1: 3 footswitch, 1 tweak, 1 expression.  Core: 3 footswitch.  Core+: 3 footswitch, 2 tweak, 1 expression)