StompFLO & OneShot in a box

Started by Matthew Sanford, July 14, 2023, 09:48:36 PM

Previous topic - Next topic

Matthew Sanford

Ok. I love, love, love the LM358 datasheet. It is the most completest datasheet I may have looked at thus far. VCO, LPF, etc., what can't it do? So many circuits! Very important it seems ok with the negative rail (take that TL072!) but -1.5v under V+ which is fine, just fine.

But the LPF with resistors adjusted for a 795hz cut off (20k instead of 16k) is what I am using the extra op amp on each package for non-inv and inv CV sides - I am planning to place them at the end of each signal chain, but if it makes sense to do it before, well, I may never know! Still, to handle shape and noise of PDM...

Posting a hastily drawn scheme, for definition top line (+CV) first Opamp IC1.1, then IC2.1 & IC 2.2, bottom line (-CV) is IC1.2, IC3.1, IC3.2. Also, -In IC1.1 (and IC1.2) pot is Transfer Ratio Balance (TRB), pot on out to ground is Transfer Balance(TB). The circuit is about as good as it can get, I may need to adjust the Vbias to get a more full inverted CV, truly it's doing more on 4.2v bias...was using the StompLFO's 5v line for it a bit, but this is a little betterish - getting resistor values more correct was a pain, but I think there is something about current in the divider and current in the resistor to -In pin, I'll get there. Still, learning lots. Now for data!





IC1.1 +CVIC1.2 -CV
TRB Ω1k9(+1k)4k9(+1k)
TR Ω4k52k75
CV out0.07v-5.1v4.85v-0.85v

Scheme!



I'm going to get the box fixed this way and get some more circuits for it to abuse before posting more on it, cause this is lackluster not having the sounds, I know.... may get the one-shot and an EF done too, more mess with it stuff
"The only knowledge is knowing you know nothing" - that Sew Crates guy

Controlled Chaos Fx

ElectricDruid

#41
Got a link for the good LM358 datasheet you're reading, please?

The TI one I found is one of their useless modern ones, where the "datasheet" is really a marketing piece trying to convince that their new "upgraded" version of some old chip is absolutely what you need.

I totally agree about the voltage range. The LM358 with its ability to output right down to ground is an excellent fit for 0-5V circuits like the StompLFO mixed with our normal 0-9V single supply from pedalworld. You can feed it 0-5V in and get 0-5V out, which is something the TL072 can't do, as you noted.

What's the purpose of the opto-isolation part? I missed the bit where you explained why that's there.

Also I'd generally want the filter first, before any split, so that I only have to have one filter instead of two. The filter has a low impedance output itself anyway, so you don't need another buffer after it. You can tap off the filter output to the invertor and you're done.

I think the problem you have with the inverted signal not being a exact copy of the normal one might be down to the very large values used in the Vref divider for the invertor. You've got 1M resistors, with a 1M going to the op-amp. Normally, you'd want the divider resistors to be "small" in comparison to the other one so that theirs is the value that dominates (the other resistor is effectively in parallel). Ten times is a typical rule of thumb, so you'd want 100K resistors for your divider, but 47K or 10K would also be fine - just as long as they're a lot less than 1M.
There's one other thing going on there, which is that you want to invert a 0-5V signal to get a 5-0V signal. E.g. you want to flip it around 2.5V (NOT the usual 4.5V Vref we'd typically use). You've taken a 4.5V Vref, and then added a extra 10K resistor to ground to divide it down a bit to get it closer to where you want it. You'd do better by creating a Vref that gave you 2.5V in the first place. This will be easier to calculate since the 1M/10k divider is in parallel with the bottom 1M of your Vref divider - much more complicated! So for 2.5V, we'd want 5/18th of the 9V we have available. The bottom resistor of our wants to be the "5" part of 5/18ths, so let's use 10K. The top resistor wants to be 18-5=13, the remaining 13/18ths, which would be 26K. 27K isn't bad, or we could use a 22K and a 10K trimmer to get it bang on.

That's all a long way of saying I'd drop the 1M/1M Vref and use 26K/10K with your 1M to +ve input, but no 10K to ground.


Edit: Sorry, one more thing - I ignored the opto-isolation part. Your schematic as drawn has some unknown (to me) voltage coming from the opto-transistor and 4K7 to the -ve input, so if you're including the opto-isolator, you'll have to account for that voltage too.


Matthew Sanford

Thanks Tom. The datasheet is the LMx58 or LM158 one here https://www.ti.com/lit/ds/symlink/lm158-n.pdf . I did see that other B and BA solely 358 one...but this other has some 15 or more circuits on it, and just ...well, felt more clear but I may be getting better at reading is all.

The opto-isolators is part of a Lounge discussion on "Cylon-Free Lightwave transmission!" or something like that, where Amptramp clued me in - his purpose was separation of grounds, which I want to try but really it's one 9v wall wart so maybe not totally separate power but instead have a couple 68 or 47Rs off the jack to each side. I'm curious if separating the grounds to only mix at the jack would affect the way these are powered? And yes, power through the transistor side with that 4k7 emitter resistor, so could affect it all too...well, it all affects it all! I am sure that I could use regular transistors or some other way to couple the two parts but just the optotransistors were so exciting to me! A faster alternative to a vactrol in a cute little package! Still going to stick vactrols on the jacks in to other pedals with the ldr side to the pot - I figure that will add the extra option of using the pot to adjust the range too.

So thank you again on the Vref part. I remembered reading about size differences and the 10x (though I forgot that specific till you mentioned it) but couldn't remember if the divider or the pin3 resistor should be the smaller part. That makes sense then why running from the 5v power off the 78l05 was seeming cleaner. I ran through many resistor combinations with and without vref caps with inconsistent results, now I know it is current issues but wasn't 'getting it'. I was thinking in it's inverted differential set up that IC would just subract the -In from the +In, but getting that +In stable was issue ridden.

Thing I thought funny was the settings of the TRB and TR pots, they basically switch values from non-inverted to inverted (well, the 4k5 part anyway, and I guess both a 1k short but that is in the other line anyway). I do feel that the inverted IC1.2 part could have those adjusted better to get it to truly be 5v-0v instead of 4.85v-0.85v, but I'll fix the vref first.

Thank you again for the Vref advice, it was the final query in my mind prior to just setting it all down as best it's going to get!
"The only knowledge is knowing you know nothing" - that Sew Crates guy

Controlled Chaos Fx

Matthew Sanford

Tom, you got me thinking...
But first, values:

IC1.1 (non-invert)
Emitter/4k7/+in node 0v-5.11v (out side)
-In/Emitter/1k node 0v-4.99v (input side)

IC1.2 (invert)
Emitter/4k7/+in node 0.92v-4.5v (out side)
-In/Emitter/1k node 0v—3.17v (input side)

So I would rather have two duals and two optos than 3 & 4. Oh and 2 pots not 4. So given IC1.1's tuned voltage out being near perfect, then I should place the LPF first like this




I was trying a 3904 as a phase splitter and getting 3 a side, but then I can send it through the follower to the inverter...anyway pondering on these



I mean, it is running acceptably (with bias correction even better I bet) but more with less feels better. I want to try the phase splitter, I like the idea of it being from one splitting point for some reason...but we'll try em both I guess, and even separate the power as far back as possible just to see.

This is my new not too pricey breadboard with this, it's first circuit adventure


"The only knowledge is knowing you know nothing" - that Sew Crates guy

Controlled Chaos Fx

PRR

#44
Quote from: Matthew Sanford on August 30, 2023, 06:43:21 PMThe datasheet is the LMx58 or LM158 one here https://www.ti.com/lit/ds/symlink/lm158-n.pdf 

Yeah. That's the old, 1980s?, LM324 sheet. A 2000 copy:
https://z3d9b7u8.stackpathcdn.com/pdf-down/L/M/3/LM324_NationalSemiconductor.pdf
Another of that ilk with multiple applications:
http://www.mit.edu/~6.301/LM101A.pdf
The LM101/301 is a '741 without a compensation capacitor. The '741 is THE easy-to-use opamp which changed the world.
Aside from datasheets, National had big application notes for first their JFETs and then their first opamps.
National Semiconductor Linear Applications Handbook 1994 (40MB PDF):
https://www.researchgate.net/profile/Cyril-Mechkov/post/Opamp-with-both-positive-and-negative-feedback/attachment/5d53d5accfe4a7968dc04c51/AS%3A791733034053632%401565775273484/download/NationalSemiconductorLinearApplicationsHandbook1994_text.pdf
  • SUPPORTER

Matthew Sanford

#45
Paul, thank you for these, I see the same circuits in the same order as on the lm358's, and the other is a huge compendium I will casually dive in to! I say casually, time, you know.

Did want to share hopefully the final for this one thanks to SLOA097 https://www.ti.com/lit/an/sloa097/sloa097.pdf?ts=1690470208209


(Edit: realized better no 10k into the follower, 1k off the out for CV+ and 10k to the inverting side, for stability's sake)
"The only knowledge is knowing you know nothing" - that Sew Crates guy

Controlled Chaos Fx

ElectricDruid

I still don't think I really get what the opto-transistor is supposed to achieve. "Avoid ground loops" sounds good in principle, but I'm not seeing how it'll actually work in practice.

Otherwise, it seems good. You could stick a electro cap on your new tweaked Vref perhaps, to help filter any noise off the power rail and keep it out of the output.

Matthew Sanford

To be honest, I don't know there is a point and that there isn't a better way, but they're $0.16 chips, and currently I think it'll work with two, 2 lm238s, 4 caps, and 13 resistors. Still...well, I guess I can work a v.3 a different way, maybe with a 2N2222 instead. I think I'll go with it this way (as long as it works well on the board) so I can move on for now.

I am wondering how many CV inputs it will handle each side. I am figuring for mine it'll power vactrols, so maybe just one or two ins on say a pt2399 delay, with one/off switches to route it to the different parts, basically put the led anodes in series.
"The only knowledge is knowing you know nothing" - that Sew Crates guy

Controlled Chaos Fx

Matthew Sanford

#48
In my mind, there is a saying in the place where some of my ancestors are from.

"THE DRUID IS ALWAYS RIGHT"

Now I took it (all in my mind, mind you) to be spiritual in nature, but have learned circuits are spiritual in nature; how many demons have been in your pedals?

That being said, it works with non-invert from LPF and inverter after. 1 LM358, 10 resistors, 3 caps. Not sure why I get crazy, but learning. Just...are the StompLFO et al CV inputs ok with a little more than 5v? I guess the 1k on the out will bring it down a little (about 5.5v top end).



Thank you Mr. Tom Druid for all of it. I'll have to figure something for these 50 PC817s, but maybe on the other end when I want wiggly voltage not resistance...


(Edit: to add shorthand but complete scheme...pots are B10k)


"The only knowledge is knowing you know nothing" - that Sew Crates guy

Controlled Chaos Fx

Matthew Sanford

I need...advice. I've made this circuit work on the breadboard board, albeit with only 1 1k resistor to an led each side.


(Note: poorly drawn +&- were corrected in Kicad)

On the vero, reworked much but I think it is all correct now, yet it is having issues. I am thinking my choice of 10k to the inverting side in parallel with 4 1ks to outs and led is causing voltage imbalance. The result is 3v (Vbias on + pin) on - & out on the inverting side with its led on and the other LPF side only lights the led (and in the LFO way) when checking the - pin for voltage (which shows correctly in accordance with the StompLFO) with the multimeter.

Should I change the inverting side's Rin, Rf, and possibly Rbias to 1k?

This section



And some board shots





I figure I'm on the right track with it, but a long awaited and joyful wedding followed by a whirlwind trip to family in OR starting tomorrow means I may not have breadboard time for a week or so, but what do you think? Balancing resistor values should make all the parts live happily together...right?
"The only knowledge is knowing you know nothing" - that Sew Crates guy

Controlled Chaos Fx

ElectricDruid

The first question that comes to mind is "Do the jacks short to ground when nothing is inserted?". If so, you've got heavy loads (1K's in parallel, so a few hundred ohms) dragging the op-amp outputs down.

I'd also like to see the LEDs driven from the PDM output ahead of the filter. A digital pulse-width drive gives a much better control of LED brightness than a variable voltage. If you hang one off the PDM output down to ground and the other from the +5V rail down to the PDM Output, they'll be inverted copies of each other. In the event that the LED current reduces the output level a bit, you could tweak the filter gain to compensate.

The rest I'll have to think about!

Matthew Sanford

#51
https://youtu.be/pox2vk4XrJQ?si=1EzdQnDKGKVSmT1B

This is it working on the breadboard set up as the circuit, so coming off each op amp output. I had it on randoms but put it back to ramp up and moved through the forms. Tile saw sound is my cousin doing tile here.

To your question no, but I ordered TS jacks with a switch on the T so I could. But if ground is the end result with all those it puts more load? Ok...I've been setting up TRS jacks like you do on the FX Filter for an expression pedal, and was wondering what a TS jack in with LFO on tip would cause shorting the 5v (ring) to ground (sleeve).

Hmmm. I had done PDM through the op amps to buffer for extra outs, so through a 22k and another with caps tied both sides of the second one. I'm not quite sure what you were meaning exactly, running outs from the StompLFO before the op amps but using the op amp to fix gain issues?

So, considering uneven parallel resistors on the out of the first, could that reduce the amount going through the 10k to the inverter and cause both sides to go wonky? I know I'm kind of leaning into it, but it's the only addition to the breadboarded circuit

Edit to add: with no grounding out jacks, would the effective parallel output resistance change as more outputs are plugged in? In that case would it be sensible to have grounded switch TS outs with higher resistor values to maintain a steady output resistance? As is gets 247 ohm but 5 10ks gives 2k so the inverting side would have a gain of 5...

Edit 2: found and fixed bridge between pins 6&7 (invert side), issues with power jack so replaced with stranded wires, plus read the data sheet and Rf should be close to pins which it isn't, so will move that, also prefers ground plane under Lm358 so may put tape under tied to pin 4. Possibly time tomorrow, otherwise next week.
"The only knowledge is knowing you know nothing" - that Sew Crates guy

Controlled Chaos Fx

Matthew Sanford

Sorry to bring it back up. I think it is all right, but the power just isn't there when plugged in - I replaced the jack but then checked the old one and the wires read 9v when plugged in, however the new one only shows 0.15v at the jack when wired to the circuit. I am guessing this means someplace I am shunting it all to ground so it shows next to nothing back to the jack... but then I wonder, would that mean it is between the jack and the next node? I have the diode in series first (like the One Shot, not the StompLFO which is what I'd put in the Kicad stuff), so if it was after the diode wouldn't it read 9v prior to that?

I'll dive back in next week, just wasn't sure if anyone would be willing to look over my solder side - I've redone it a couple different ways, so there is probably too much solder all over, so I may (for the power rails at least)  remove a bunch when I get back, clean it up. If you do look, the top row is 9v, there is a wire on the board from between the two capacitors prior to the 78L05 taking it down to pin 8 on the LM358, then a 10k from there to take Vbiase to Vin+.

I appreciate you guys so much!!! I can't wait to get confident with the PCB layout to just order those instead of using the vero I abuse so recklessly...
"The only knowledge is knowing you know nothing" - that Sew Crates guy

Controlled Chaos Fx

ElectricDruid

If there's a short somewhere between the 9V and ground rails, the diode doesn't help - see diagram.




duck_arse

I can see a metal bodied DC jack in one of those pics. that will short the supply when mounted on metal with in/out jacks.
" I will say no more "

Matthew Sanford

I'm going to clean it up, flux residue everywhere, then go over the whole thing when I get back with a magnifying glass, drag the tip of my iron between the strips for good measure.

Duck I painted liquid tape all over the box, but this issue is out of the box.
"The only knowledge is knowing you know nothing" - that Sew Crates guy

Controlled Chaos Fx

Matthew Sanford

Scared to post, have yet to box it back up, but I think I figured it out. On @Anotherjim always talking about just lay out the scheme on vero, I went for it! (with paper and pencil). I found ball point works ok but fine tip sharpie is great to draw on the vero. I put it all together but no luck till I saw data sheet power decoupling note (again, I'd read it before) and put a 100nF ceramic across pin 8 to 4 on the bottom and presto! Works. LM358 sorely needs local decoupling. I might try the board I'd cursed as scrap for a quick One-Shot home...

But first I'm going to get some other circuits together to see what fun comes from synced LFOs and inverted too, and share the sounds from the breadboard.

I wanted to share some pics as I'm proud (by comparison to past) of the layout. PCB in the future.

The back


Pre-wires


Hairy



"The only knowledge is knowing you know nothing" - that Sew Crates guy

Controlled Chaos Fx

antonis

I really like all those hammered items.. :icon_biggrin:

"I'm getting older while being taught all the time" Solon the Athenian..
"I don't mind  being taught all the time but I do mind a lot getting old" Antonis the Thessalonian..

duck_arse

do you mean hammered into the board to fit, or slanted?

I'm more worried about those iC sockets, I can see three sets of wipes that could cause trouble.
" I will say no more "

antonis

Quote from: duck_arse on November 01, 2023, 09:37:41 AMdo you mean hammered into the board to fit, or slanted?

I mean drunken/sozzled/blitzed/stonkered etc..
(they can't place themselves neither horizontal nor vertical..)
"I'm getting older while being taught all the time" Solon the Athenian..
"I don't mind  being taught all the time but I do mind a lot getting old" Antonis the Thessalonian..