News:

Forum may be experiencing issues.

Main Menu

TAPLFO PWM output + transistor PWM buffer issue - can't go above 5V?

Started by midwayfair, December 03, 2014, 04:55:58 PM

Previous topic - Next topic

midwayfair

xposting from DIYSB to get more input:

I'm working on a PCB that involves the TAPLFO. Datasheet is here:

http://www.electricdruid.net/datasheets/TAPLFO2Datasheet.pdf

The tremolo schematic on page 7 uses a transistor to buffer the LED from the PWM output.

The LEDs are referenced to 5V.

One thing I tried to do on the breadboard at one point was to reference the LED to +9V for one reason or another, thinking, "well, the base won't see the 9V, so I should be safe." Nope. Dead chip.

Dave Rolo's twin peaks (http://i1277.photobucket.com/albums/y492/drolobucket/TWINPEAKStremoloschematics_zps4641a0b2.png), interestingly, uses a 6V regulator to get very slightly more voltage out of the LED driver.

I don't understand why either device needs to have the voltage knocked down, even though I understand that getting 9V within sneezing distance of a digital chip is instant death. Shouldn't the only voltage on the base of the transistor be the 2.5V swing from the PWM output? Where's it "finding" enough voltage to fry itself? Similarly, even if the op amp were running on 9V, the pin would sit at 4.5V, which is still less than 9V.

It also can't just be pure supply voltage. After all, the more complicated full filter circuit in the datasheet runs on +15/-15.

I'd take a chance that I did something wrong the first time, but I'm not made of TAPLFO chips and that was one of my most expensive mistakes on a breadboard. So if anyone has insight into the why of this -- or an assurance that it's safe to do it -- I'd like to hear it.

It doesn't actually matter on the layout I'm making (the 9V and 5V traces are both within reasonable distance from where they'd need to connect), but I'm curious.

drolo

There might have been something else going on. I have tried the transistor fed by 9v and nothing happened to the chip (or I was just lucky...)
I did not see any improvement going from 5 to 9 v though. 5v seems to be plenty to drive at least one vactrol. If you have more in series it might help though.

Not sure I have the theory down right but can the voltage at the base of the transistor even be more than the base-emitter voltage drop?



RobA

I would have thought that you'd be OK with the transistor at 9V. I haven't tried it though with an MCU. I have used op-amps powered at 9V with a PWM output from the MCU at 5V and it works fine.

Would it work to put a diode clamp on the PWM output to protect the MCU? I have an ATTiny MCU on the breadboard right now that's doing PWM.  I'll give it try with that.
Affiliations: Music Unfolding (musicunfolding.com), software based effects and Rock•it Frog (rock.it-frog.com), DIY effects (coming soon).

midwayfair

Slacker also said it was fine and that he's done it in the past.

I think I must have had a stray wire touch something in that case.

Dave: that's helpful for sure to know that 9V doesn't change much. I do have two LEDs on each side (on in the vactrol and one for the indicator), and there are some times when it could stand to be a little deeper (I think if I increase the 10K to avoid ticking), but overall it's fine.

EDIT: Slacker has a good technical explanation of why 9V won't change things:

Quote from: slacker on December 03, 2014, 08:16:47 PM
Running the LED off 9 Volts probably won't make any difference. Most LEDs are at maximum brightness with about 20-30mA of current, shove too much more through them and you let out the magic smoke. Depending on the forward voltage of the LED a current limiting resistor of between about 100-200 Ohms should get you maximum brightness from 5 Volts, so using 9 Volts won't make them any brighter. If there's some reason you can't run them at maximum brightness at 5 Volts then using 9 Volts could help.
Depending on what you want more range for you might need to tweak whatever the LEDs are driving.

RobA

I tried the circuit using an ATTiny84a that's setup to do PWM at 5V output. First I tried the circuit with a diode clamp with a 10k resistor and two 1N4148 diodes with the top diode hooked to 5V and the bottom to ground. This didn't change the PWM in any visible way on the scope, so it should be OK to do this to protect the MCU.

I tired the schematic on page 7 using a 2N3904 with both 5V and 9V. They both worked fine to drive the LED and in both cases the PWM wave at the base of the transistor was sitting at a bit less than 1V.
Affiliations: Music Unfolding (musicunfolding.com), software based effects and Rock•it Frog (rock.it-frog.com), DIY effects (coming soon).

midwayfair

Rob, thanks so much for the help.

I need one last bit of help here to hopefully save me from pulling up half a breadboard to make room for the TAPLFO. Are the following roughly equivalent? I've already tested the one on the left and it worked fine, but I thought on the way home that the one on the right would save me an LED. (The PWM input is at the junction of the two 10Ks


RobA

Quote from: midwayfair on December 03, 2014, 11:52:43 PM
Rob, thanks so much for the help.

I need one last bit of help here to hopefully save me from pulling up half a breadboard to make room for the TAPLFO. Are the following roughly equivalent? I've already tested the one on the left and it worked fine, but I thought on the way home that the one on the right would save me an LED. (The PWM input is at the junction of the two 10Ks


It looks like it should be pretty close. The one LED is going to take twice the current, right? But, that should still be OK. I have the circuit still sitting on my breadboard and I've got plenty of room left to try it out. So, I'll report back after I give the two a test.
Affiliations: Music Unfolding (musicunfolding.com), software based effects and Rock•it Frog (rock.it-frog.com), DIY effects (coming soon).

RobA

It took me a bit longer to test this than it should have. It wasn't quit doing what I expected and I didn't figure it out until I realized that I had the program on the MCU setup to not sweep all the way to zero. After I fixed that, it looks to do the same thing in both the four diode and the three diode arrangements. I'd also take back what I said about the center diode taking twice the current. It looks to be more balanced than that because of the sweep between the two. There is some variation in the brightness of the common diode, but its maximum brightness does appear to be about the same as either of the other two at their max. I'd say that either of the two arrangements will do the job equally well.

It's a clever circuit by the way. I'll have to keep it in mind while I'm playing with all of this CV control stuff I'm working on if you don't mind.
Affiliations: Music Unfolding (musicunfolding.com), software based effects and Rock•it Frog (rock.it-frog.com), DIY effects (coming soon).

midwayfair

Quote from: RobA on December 04, 2014, 03:11:49 AM
It took me a bit longer to test this than it should have. It wasn't quit doing what I expected and I didn't figure it out until I realized that I had the program on the MCU setup to not sweep all the way to zero. After I fixed that, it looks to do the same thing in both the four diode and the three diode arrangements. I'd also take back what I said about the center diode taking twice the current. It looks to be more balanced than that because of the sweep between the two. There is some variation in the brightness of the common diode, but its maximum brightness does appear to be about the same as either of the other two at their max. I'd say that either of the two arrangements will do the job equally well.

It's a clever circuit by the way. I'll have to keep it in mind while I'm playing with all of this CV control stuff I'm working on if you don't mind.

Thanks so much!

All credit goes to Duck_arse, he's the one who told me to use a PNP :)

(Dave Rolo and a couple others might have mentioned it at some point, too, but DA's the first one who told me.)

drolo

Do you need to hook the indicator LED to the vactrols? I usually feed the indicator LED directly from the chip's PWM output (with a 10k or so resistor). The chip can source 20 mA and the vactrol drivers buffer so it does not cause any issues.


RobA

Quote from: drolo on December 04, 2014, 09:29:57 AM
Do you need to hook the indicator LED to the vactrols? I usually feed the indicator LED directly from the chip's PWM output (with a 10k or so resistor). The chip can source 20 mA and the vactrol drivers buffer so it does not cause any issues.
Oh! I wasn't thinking of the series LED's as indicators. I figured they were there to hold the vactrol LED's in a certain regime. I've been playing with some similar circuits for the potentiometer stuff that use strings of 1n4148 connected to the LED's  to do just that. If it's to be an indicator, then I change my vote on how well the three LED version works. There is some minor variation in the brightness of the common LED, but it I don't think it's enough to work as an indicator.

For an indicator, I agree that the PIC would be able to drive the LED directly. It's a bit of a wash for parts count because you lose an LED but gain a resistor. On the other hand, you do get to set the brightness of the indicator independently that way.
Affiliations: Music Unfolding (musicunfolding.com), software based effects and Rock•it Frog (rock.it-frog.com), DIY effects (coming soon).

midwayfair

Quote from: drolo on December 04, 2014, 09:29:57 AM
Do you need to hook the indicator LED to the vactrols? I usually feed the indicator LED directly from the chip's PWM output (with a 10k or so resistor). The chip can source 20 mA and the vactrol drivers buffer so it does not cause any issues.

If you use two you can have two indicators blinking out of time, which may or may not be cool; or you can have a two-color LED that pans red to green. Since I've dropped to one LED, though, really the only difference now is that it saves one resistor compared to taking it straight from the chip pin. Rob's right that you don't get to set the brightness of the indicator without the extra resistor, though.

RobA

Quote from: midwayfair on December 04, 2014, 02:25:24 PM
Quote from: drolo on December 04, 2014, 09:29:57 AM
Do you need to hook the indicator LED to the vactrols? I usually feed the indicator LED directly from the chip's PWM output (with a 10k or so resistor). The chip can source 20 mA and the vactrol drivers buffer so it does not cause any issues.

If you use two you can have two indicators blinking out of time, which may or may not be cool; or you can have a two-color LED that pans red to green. Since I've dropped to one LED, though, really the only difference now is that it saves one resistor compared to taking it straight from the chip pin. Rob's right that you don't get to set the brightness of the indicator without the extra resistor, though.

The two LED's pulsing out of phase does look cool and could really be more informative for some uses. The two color idea would be neat too. Keeping the two indicators would give the option of going with one, two, or bi-color and the indicator works much better in the four LED setup than the three. I think even if the three LED version indicator worked as well as in the four LED version, I'd still prefer the two indicator version. It's more fun!

Affiliations: Music Unfolding (musicunfolding.com), software based effects and Rock•it Frog (rock.it-frog.com), DIY effects (coming soon).

midwayfair

Quote from: RobA on December 04, 2014, 04:35:26 PMand the indicator works much better in the four LED setup than the three.

Wait, really? I must have missed that early. Damn, two indicators is really kinda inconvenient for my layout ... I'll see if I can make the dual work.

RobA

Quote from: midwayfair on December 04, 2014, 05:27:53 PM
Quote from: RobA on December 04, 2014, 04:35:26 PMand the indicator works much better in the four LED setup than the three.

Wait, really? I must have missed that early. Damn, two indicators is really kinda inconvenient for my layout ... I'll see if I can make the dual work.
Yeah, sorry about that. I mentioned it in my response to Dave. I hadn't realized that you were using the other LED(s) as an indicator.
Affiliations: Music Unfolding (musicunfolding.com), software based effects and Rock•it Frog (rock.it-frog.com), DIY effects (coming soon).