Go Down

Topic: Virtual, variable resistors, with saved presets recallable by MIDI (Read 21363 times) previous topic - next topic


I just tried placing a 100uF cap between the Vcc pin and GND pin of the LED display, and it still fluctuates.  Just to be clear, I removed my series resistor from the Vcc line when I tried this.

Sorry, I'm just seeing the below. must have missed it earlier:

Can you measure, with respect to the 9v supply gnd:

- The arduino gnd
- the arduino +5
- the 7805 +5 out

9v supply gnd -to- arduino gnd = 2.0v
9v supply gnd -to- arduino +5v = 1.91v
And as you know, when the 7805 was in the circuit, it was measuring 3v

I tried a 100ohm resistor in series, instead of a 330 or a 470, and I thought it was stable with it ... but it seemed to intermittently fluctuate every once in a while.  So then I tried a 220ohm resistor, and it seems to be stable with it.

So, 220, 330, and 470 all seem to stabilize the 5v bus.  Is there any particular reason to not use a series resistor here?  The rotary encoder's button and the display both seem to function fine with the resistor in place. 


A thought.

The TLC opamps, though rail-rail, don't have a very strong pullup on their outputs.

Try adding a 680 ohm between Q1 ( BC337) 's base and collector to improve  the +ve drive



I actually have the PSU soldered down to a board already, with it's inputs coming from the effect pedal's internal 9v and GND input terminals.  

I have a 2 pin header for the output, which goes to the arduino and the breakout box.  I also have a 6 pin and a 7 pin header on order, which will go on the PSU board as well ... for ease of connecting and disconnecting everything.

Then the final connection point is an externally accessible RJ45, which will go on the end of the PSU board, for plugging in the breakout box, after it's all said and done.  

So one 9v wall-wart, plugged into the pedal, is now feeding everything.  

I did end up soldering a 220 ohm resistor inside the breakout box, located in series on the 5v line connected to the Vcc of the backpack LED display board.  It is definitely stable like this, as I've been playing the guitar through it and testing out the sound and preset functionality.  

I can certainly deconstruct some of the board to add the 680 ohm resistor across the base and collector of Q1 like you suggest, but is there some reasn as to why a resistor in series with the Vcc line of the display's control chip isn't a good idea?

I also still have the PSU made up on the breadboard, so I can certainly test it there too .. but I'll have to remove the 220ohm resistor from within the breakout box to really know if it fixes it.  


I was able to test placing 690ohms across the BC337's collector and base.  I bypassed the 220ohm series resistor, and then used a 470ohm plus a 220ohm resistor (in series) to bridge pins 1 and 2 of the BC337. 

In this config, the analogRead() from the 2 analog POTs were still fluctuating rapidly.

So I went back to using the 220ohm resistor in series with the 5v line feeding the display backpack chip (HT16K33), and it's stable again.


It sunds like the series R to the display is sufficent decoupling / current limiting to do the job.

Still a mystery to me, but so long as it works......

Could you post a final circuit diagram?



Here is how it's configured now.  I didn't draw out all the Arduino interconnects with the Digi-POTs and Opticoupler, just because it would get pretty messy.

I've also attached it as a JPG, just in case the forum scales this down too much to see it.  


Well, it all looks ok....just surprised that the display runs OK with that series 220R - .....



Ok, great.  Thanks for taking a look at it.  I definitely would not have been able to get this far without you Allan! You too Grumpy Mike ... I truly appreciate both of your input!

I made some more progress on the mounting.  I now have 3 standoff posts under the Arduino board, to prevent it from moving around and to ensure the USB jack stays firmly placed; especially when inserting a cable.  I still think I need something lateral, on the end with the MIDI input 1/8" jack though ... in case I (or someone else) really jams a USB cable in ... as it stands, it'll probably bend the connection points on that side if pushed too hard laterally.

When everything is hooked up, a 9v battery connected to the effect pedal battery leads does power everything, but I think I need to sacrifice that functionality due to space.  Besides, this will be installed on my pedal board, and will always be powered.

So .... the PSU board will go in the battery compartment, and will double as an interface board for the headers and RJ45 jack to mount.  I want to be able to disconnect the Ardiono and remove it without soldering, so I'm using header pins and connectors. 

I haven't made the standoffs for the PSU board yet, as I'm waiting for the RJ45 breakout board to be delivered so I can determine the proper height.

The headers should arrive tomorrow, so I can finish up the interconnects from the Arduino board to the PSU board.  The RJ45 breakout boards should be here tomorrow too.  So hopefully, over the next couple of days, I can have this wrapped up from the hardware perspective.

From a code perspective, I still need to make a few tweaks to the display code.  I want to add an indicator to show when the currently applied values are different than recalled preset values ... probably a decimal point lit up.  And then I need to move the array into EEPROM so the presets will be stored when power is disconnected.  

I debated on adding code so an expression pedal could be used over midi, to control DRIVE or LEVEL, but that can always be done later if I so choose.

I thought about your idea Allan, of having a mode where it's cycling through a few of the presets to give a sort of tremolo effect ... and I could add that later too, although sometimes switching POT values does cause an audible click ... so cycling through several presets quickly may be too noisy with the clicks. 

Here's the current state:



Thanks Mike, still a ways to go, but getting close :)

Related to the click/pop generated when the Digi-POTs change value:  Is there a reasonable way to remove or reduce the effect?   

Earlier in this thread (I've read it through a few times), it was recommended to put some capacitors between the Digi-POTs H, L, and W pins and the pedal's PCB connection points.  Would this take care of the popping? 

I assume it's a result of the value maybe dropping to zero between the switch in values?  Or am I off on this assumption.

If it's not reasonably remedied, I won't worry too much about it; as the typical use case for this is switching presets when playing live and not turning the knobs.  So the click/pop would be very short and most likely burried in the band mix.   

But, if simply adding 6 small caps would fix it, I can do that easily when I mount the header pins onto the PSU board. 


Yes you could try a cap, between the wiper and the ground end of the pot. Try a 0.1uF to start with.


Ok, thanks Mike.  The rest of my components are due to arrive today, so the soldering iron will be coming out then, and I'll try it.

.... Attaching my latest code build here.  I cleaned it up quite a bit, but I'm certain there are lots of opportunities for increased efficiency.  I'd bet there are things I'm doing in the code which use  more processor cycles than what is necessary.

Are there tools, or other resources, to use for analyzing the code to determine where it can be made more efficient?  Or maybe I could pay one of you fine gentlemen VIA PayPal to have a gander .... ;)  


I was able to get the interconnects soldered up today, and tested with my OHM meter to ensure complete signal path .... but didn't have time to get holes cut for the RJ45 jacks yet.  Hopefully I can get that done tomorrow and perform a real test.

Should be easy to test some caps across the Digi-POT wiper terminals too, considering the header pins and clips.  Once it's all mounted and verified functional, I'll give it a shot.


If the digipot (~100k) is carrying audio, 100n between wiper and ground gives a lowpass filter with the wiper half-way at

2 x pi  / ( 5e4 x 100e-9 )  or about 1200 Hz... bit low. I'd start with 10n.

There are ways to de-click , but they are a bit more complicated. Or you could use a vga and control it with ( filtered high frequency ) PWM...



The Digi-POTs are carrying audio, so I am concerned about created a low or a high pass filter here if it is within the audio range of the guitar signal (ie: ~30Hz - 20kHz).

Can you explain how the click/pop is being generated?  Is it a shunt to ground, creating DC noise, during the switching maybe?  And if so, wouldn't I want a high pass filter at very low Hz in the signal path?

I had a similar issue in my home theater setup, running an Adcom amp along with an Emotiva processor.  The Adcom is a direct coupled input design, and the Emotiva shunts the output to ground during any mute process.  This created an audible click due to DC being generated on the signal path.  To solve that, I built a high pass filter centered at 2Hz, and stuck it on the amp's input. 

Could I do something similar here, on the pedal's audio output, to filter out the click?  If indeed it is the same root cause of course ...

Thanks guys ...

Go Up