Virtual, variable resistors, with saved presets recallable by MIDI

Doesn't that mean that the ground of your arduino and the -ve of the wallwart are connected together? - in which case the arduino's 5v is no longer in the middle of the 9v supply, but has it's -ve at the wallwart's -ve.

If so, it misses the whole point of my 'centred' psu..

Allan

Hmm, I'm not sure? Should I try something different?

When I move the ground of the 7805 to the ground output of the PSU, the analog pot readings go wild again. It's pretty rock solid going off the 9v and ground of the wall wart though.

I do know the centered PSU did clean up the noise in the audio signal. So while the ground config may negate some of the intended benefits of the PSU, it is accomplishing the primary goal of getting rid of the noise in the guitar audio signal.

Started mounting it inside the pedal tonight. Got far enough to do a test fit, and it fits great!

Obviously I still have the long wires attached I was using for the breadboard, and I'll shorten them for the final soldering; but I wanted to make sure I didn't need to make any further adjustments to the mounting points and routing inside.

I'll use the battery compartment for the PSU, MIDI serial bypass switch, and I plan to mount a RJ45 jack on the side for connecting to the breakout box. Looks like everything will fit!

The 1/8" jack is for the midi in (you only needs pins 4 and 5 from the midi cable for input), and I made sure the USB was accessible as well, so I can continue improving the code even after it's complete and functional.

Looks jreat I- didn't think you'd get it all in.

You shouldn't need the 555. Are you using current limiting resistors with you LED dsiplay ? - otherwise you'll take far too much current ...

A medium capasitor (?100u) across the zener may help...

Allan

allanhurst:
Looks jreat I- didn't think you'd get it all in.

You shouldn't need the 555. Are you using current limiting resistors with you LED dsiplay ? - otherwise you'll take far too much current ...

Do you mean 7805 instead of 555? No, I am not using current limiting resistors. I did some reading on current limiting resistors (Sparkfun Tutorial), and then found the datasheet for the controller on the backpack used to drive the LEDs (HT16K33 Datasheet). But I don't see anything on the sheet related to forward voltage or forward current. I assume this is because the datasheet is for the chip and doesn't take into account the LEDs it's driving.

So I went and found, what I believe, is the datasheet for the LED display itself (4 character, 7-segment display datasheet), and it shows forward current as 30mA but doesn't show forward voltage.

The schematic doesn't seem to show a limiting resistor on the backpack itself.

Then I found This Tutorial Page which give some basic info on the LEDs. So if I use 2v as the forward voltage, 5v as the source voltage, and 30mA as the forward current, I come to 100ohms. The tutorial says to double the value for determining the limiting resistor ...

so I should place a 200ohm resistor in series with the 5v feeding the LED backpack?

allanhurst:
A medium capasitor (?100u) across the zener may help...

I do have some 100uF 50v capacitors here. I'll try placing one on the leads of the zener diode.

Thanks Allan!

Sorry ....... 7805 of course/

This is a bare display. You need a series R - eg 390R - in each of the cathode lines. Otherwise you'll take too much current - bet that's why you're having problems.

Allan

This is what the backpack and raw display look like.

The display is mounted on the other side, and then the pins soldered on the side in the pic.

Are you saying I need to desolder it, and place 390R resistors between the backpack pin holes and the display pins?

Or can I use a resistor on the 5v line feeding the backpack instead?

Maybe I should reach out to Adafruit for support and see what they say ....

Out of curiousity, what's the downside to using the 7805 to give 5v to the display?

The ground for the 7805 is connected to the 9v source ground, but the ground for the display is connected to the Arduino' ground. So I don't think the 2 grounds are connected, since nothing else is using the 9v supply ground except the 7805 and the PSU you designed for me.

Ive got a busy day today, but when I have time, I'll sketch out how it's all connected.

The holtek device seems to have internal current limiting on it's row drivers, so resistors not required.

I'm still confused though - I await your drawing.

Allan.

I had some time to draw it out. I hope you can read this. If the image isn't readable, I also attached it to this post as a JPG attachment.

So the ground from the 9v PSU never gets to the arduino, or the breakout box.

Ok ... as a test, I moved the 5v lead going to the "Display and Encoder" box to the 5v signal coming out of "Allan's PSU", but put a 330ohm resister in series with it ... and this cleaned it up. It's rock solid like this.

Also interesting ... I put a meter across the output of the 7805 and the ground coming from "Allan's PSU", and it read 3v. I suppose this makes sense, considering the ground is shifted coming out of the PSU. The Adafruit Display's datasheet says it'll operate on a 3.3v Arduino, although with a dimmer display.

So maybe the lower voltage is what is causing it to be stable? I measure 4.95v coming out of the PSU, and measure 4.68 after the 330ohm series resistor. I measured this with just the number "1" on the display.

With "108" being shown on the display, I get a reading of 4.23v with the 330ohm resistor.
With a 470ohm resistor, and "108" on the display, I get a reading of 4.07v

It's worth noting I also added a 100uF cap to the zener diode leads, and it's still there. I tested after adding this, and the readings were still fluctuating when the display was connected to the PSU's output.

So what do you think, leave the cap in the PSU and install a 470ohm resistor, inside the breakout box, in series with the backpack's Vcc line?

Thanks...

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

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

Is the display bright?

regards

Allan.

just read your new post...

The 3v you measure is exactly as I'd expect.
does your mod ( display via 330 to the arduino +5) mean the 7805 output isn't connected?
When you say you measure 4.96 from the psu, which one do you mean? there are 3!
Having done the mods, is the display bright? The 330 will seriously limit the display current.
I suspect much of the noise comes from the high-frequency internal multiplexing of the display.
Try adding >100uF across the output of my 5v psu, driving the display + from that, and disconnecting the 7805..

A

allanhurst:
does your mod ( display via 330 to the arduino +5) mean the 7805 output isn't connected?

Correct. I removed the 7805 when I tested with a 330ohm in series between the Arduino's (or the Allan's PSU) 5v and the Vcc wire going into the breakout box.

allanhurst:
When you say you measure 4.96 from the psu, which one do you mean? there are 3!

LOL ... I mean 4.96v coming out of "Allan's PSU" :slight_smile:

allanhurst:
Having done the mods, is the display bright? The 330 will seriously limit the display current.

Yes, it's plenty bright. I even have the code set to dim the brightness to it's lowest setting, and it's still plenty bright for my purposes. This will typically be on a dimly lit stage as well.

allanhurst:
I suspect much of the noise comes from the high-frequency internal multiplexing of the display.

Ya, a few google searches tells me these chips are known for injecting noise into the 5v supply line. Solutions for cleaning it up seems to differ depending on the specifics of the project though. There doesn't seem to be a "one size fits all" type solution for it.

allanhurst:
Try adding >100uF across the output of my 5v psu, driving the display + from that, and disconnecting the 7805..

So do you mean adding another 100uF capacitor, at the "Allan's PSU" output leads? So connected directly to the 5v and ground coming out of the PSU? Or do you mean to somehow add the cap so it's just working on the power being fed to the display? Like adding the cap inside the breakout box, between the Vcc and ground pins in there?

Here's how I have the PSU wired up currently, without the 7805. Notice the 100uF added at the front end, tied to the zener's leads. So add another one of these to the end?

Try across the +ve and -ve of the display..

Allan

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:

allanhurst:
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

Allan.

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?

Allan......

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 - .....

Allan.