Go Down

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

allanhurst

Just to make things a bit clearer....

Allan

allanhurst

or if you want to be posh...  the opamps must be rail-rail ...

Allan

Grumpy_Mike


allanhurst

Nope - but it positions everything round the centre-point of the audio electronics supply , so should be OK.

If one could identify the internal '0v' , you could use a couple of 2.5v references (TL431's?) round that to get the arduino's 5v - that would be a better approach.

But I think it'll work.

Allan

Stoopalini

Thanks for this Allan.  I'm stuck on one wall wart due to wanting the design to be usable for other pedals as well.  This is mainly my "proof of concept" to design a solution for adding MIDI to any effect pedal which uses analog POTs to control parameters.  Most pedals use 9vdc, although some use 12v and even 18v.  I'm keeping the scope here to the 9v ones though. So having the circuit not require an additional power supply is very desirable.

I have the resistors and the diode, but I don't have an opamp on hand right now to put this together.  I can certainly order one though.  

The diagram makes sense to me, except for the following connection points:  



  • Does point #1 remain "floating" (ie: not connected to anything), or do I need to find the artificial ground within the pedal's PCB and attach it there?
  • Is point #2 a connection point, or is it just the line extending on the drawing?
  • Where do point numbers 3 and 4 connect on the pedal PCB?
  • I'm assuming point 5 is the "5v" pin on the Arduino, and point 6 is the "GND" pin on the arduino, correct?


Thanks again, this is very appreciated.

allanhurst

The diagram you post is probably the easiest - the opamp is my guess at what's inside the pedal - you don't need another one! Note the box saying 'pedal audio electronics' . All inside that is my guess.

Points 1 and 2 are the (guessed)  internal  mid-rail supply generated within the pedal - it's '0v' reference.. They're not really floating, as they're derived from the 9v supply.

3 and 4 are the internal + and - supply rails within the pedal. 5 and 6 are as you say.

My diagram pedal3 in the next post makes these points clearer - but you can get away without the external opamps.

All you need are the bits ouside the pedal - the 2 digipots, 2 resistors , a 5v zener diode, and of course the arduino . You may be better using 2 220's or even 100's - I'm not sure of the arduino's consumption.
Adust so you get a steady 5v across the arduino.
Allan

Stoopalini

Ahh, ok ... got it.  I thought that represented the pedal enclosure, but I understand now you mean the existing electronics on the pedal's PCB.

So essentially, it's dropping the voltage from 9vdc to ~5vdc by splitting the drop between the 9vdc + and -, thereby keeping the center, well, centered.   If that statement makes sense, then I guess I understand the concept here.

I'll also venture a guess that after I add a display (currently planning for a two or four character 7 segment display), I'll need to recheck the voltage due to the increased load, right?

I'll give it a go and let you know.

Thanks again!

allanhurst

I think you've got the idea...  good luck.

LED displays take a fair bit of current - maybe a LCD?

Allan.

Stoopalini

My diagram pedal3 in the next post makes these points clearer - but you can get away without the external opamps.

Sorry, I just saw this.  Don't know how I missed it.

Could I use a single LM358P (dual opamp) for both sides?

LM358P Datasheet

LED displays take a fair bit of current - maybe a LCD?
I looked at an LCD, but am space constrained.  I really only need 2 characters to display the preset number.  Do you know of a small LCD which plays nicely with Arduino?  I saw the 128x128 ones, but they're too big.

CrossRoads

If you only need 2 digits, how about a small 2-digit seven segment display?
Sparkfun carries this little 4-digit bubble display, I use 2 of them on this 8-digit display board
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

allanhurst

1/  You don't really need opamps  - it just takes the guesswork out of finding r3,4 values.
2/ A LM358 won't quite do - you need  a rail-rail opamp.
3/ If you intend to use high current displays, opamps would be a good idea - but be sure they've got enough drive capability. 

LED display - the worst case is displaying '88', with 14 segments on. Allowing 5mA each that's 70mA - more than most opamps can handle..

But, of course, you could drive them directly from the supply with suitable drivers.....

I'll have a ponder...

Allan.

Just saw your post , crossroads - neat little displays.  But this is (I think) next to his pedal - 4-6 feet away? so perhaps too small - and of course the reading angle is limited.

Stoopalini

If you only need 2 digits, how about a small 2-digit seven segment display?
Sparkfun carries this little 4-digit bubble display, I use 2 of them on this 8-digit display board

Ya, that's very similar to what I was planning.  a 2 digit, 7 segment display, which operates on SPI.  The problem is I can't find a 2 digit one.  I found some 4 digits ones though.

Do you know of a 2 digit, 7 segment display, that works with SPI?  One design constraint is I only have 8 wires to go between the Arduino and the breakout box, which is where the rotary encoder with push button and the display goes.  

Rotary encoder/push button needs 5 wires: Vcc, GND, 1 data wire for button, 2 data wires for rotary encoder.
7 Segment display, with SPI, needs 5 wires, but only 3 additional:  (Vcc and GND shared with rotary encoder) then SCK, CS and SI.  

CrossRoads

Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

Stoopalini

1/  You don't really need opamps  - it just takes the guesswork out of finding r3,4 values.
2/ A LM358 won't quite do - you need  a rail-rail opamp.
3/ If you intend to use high current displays, opamps would be a good idea - but be sure they've got enough drive capability. 

LED display - the worst case is displaying '88', with 14 segments on. Allowing 5mA each that's 90mA - more than most opamps can handle..

But, of course, you could drive them directly from the supply with suitable drivers.....

I'll have a ponder...

Allan.
Ok, I'll give it a shot without the opamps 1st.  The diodes I have are rectifier diodes, so I'm ordering some 1N4733a diodes.  I figure I'll add some opamps to the order, just to have them on hand if I need them.  If the LM358 doesn't work, can you suggest one that would?

As you can tell, I'm a bit over my head when it comes to power supplies ... but learning. 

Just saw your post , crossroads - neat little displays.  But this is next next to his pedal - 4-6 feet away? so perhaps too small - and of course the reading angle is limited.
Exactly.  The device will be on my pedal board, on the floor, while I am standing.  Typically in a poorly lit environment as well.  And to boot, I am color blind :P (my 10 year old daughter has to help me with resistor identification LOL)  This is why I was looking for a 2 digit, standard size, 7-segment display.  But a small LCD would work too, if I can find one that fits. 


BTW:  Can I just say the "one post per 5 minute" rule on this forum is extremely annoying....?

Stoopalini

Here are 4 different sizes of 2-digit displays, 0.3, 0.4, 0.56, 0.8 inch:
http://www.kingbrightusa.com/category.asp?catalog_name=LED&category_name=KC2%2DDigit+7%2DSegment+Thru%2DHole+Display&Page=1
Right, I actually have some 1/2" ones on the way already.  It's the SPI interface I was struggling with.

Add MAX7219 to make it SPI.
It's available SMD & thruhole, I don't about SMD except from Digikey/Mouser
https://www.digikey.com/products/en/integrated-circuits-ics/pmic-display-drivers/729?k=max7219
Great, thanks!  I should be able to fit this into the breakout box.  Any idea on the mA draw of the MAX7219 and 2 7 segment displays? 

Go Up