Author |
Message |
reve

Joined: Feb 23, 2008 Posts: 149 Location: USA
|
Posted: Wed Jun 09, 2010 11:33 am Post subject:
Interfacing CVs and microcontrollers. Subject description: (again) |
 |
|
So I'd like to interface my modular CV signals to a microcontroller based LFO. The microcontroller ADC is expecting 0-5v positive. My envelopes are going 0-10 positive and my analog LFOs are +/- 5v. I'd like to handle the input as efficiently as possible, so I was hoping to pick some of your collective brains.
It seems like a voltage divider followed by a diode clamp would get the incoming voltages where I need them to be. But I also want manual control – so I would also want a pot wired to 5v and ground. And I might want multiple CV inputs.
Aaaannnnd that's where I run into trouble. As I already have four opamps on the outputs of my simple digital project, I was hoping to get out of constructing like, a DC mixer. Is there a way around that? Could I just use a couple zeners and just straight clip the voltage or something to keep inside the 0-5 box?
Doing it right is more important than doing it easy here, but... I’d like both right and easy if all y'all have any suggestions.  |
|
Back to top
|
|
 |
clee

Joined: Dec 08, 2009 Posts: 42 Location: Chicago
|
|
Back to top
|
|
 |
PickNick

Joined: Oct 16, 2009 Posts: 82 Location: BP
|
|
Back to top
|
|
 |
reve

Joined: Feb 23, 2008 Posts: 149 Location: USA
|
Posted: Fri Jun 18, 2010 11:37 am Post subject:
|
 |
|
Thanks for the responses, guys. Extra thanks to Wavemultiplier... I see now the problems with the nonlinearity in the zener solution -- it winds up working as a voltage divider. Boo. Hiss.
That said, it looks like both AVRs and PICs have internal protection diodes in place as long as you use a current limiting resistor in series. The bad is that it winds up biasing the other ADC inputs when the protection diodes kick in. :/
So here's my crazy idea: (for my scenario) we've gotta build a DC mixer, ya? So I've got an inverting opamp followed by a voltage follower. What if I used a rail to rail op amp powered by 0v/+5v as the voltage follower? A regular opamp would work for protecting the micro from overvoltage, but... it'd mess up the scaling, which needs to be real close to 0-5v.
Would that work? |
|
Back to top
|
|
 |
PickNick

Joined: Oct 16, 2009 Posts: 82 Location: BP
|
|
Back to top
|
|
 |
clee

Joined: Dec 08, 2009 Posts: 42 Location: Chicago
|
|
Back to top
|
|
 |
Rykhaard
Joined: Sep 02, 2007 Posts: 1290 Location: Canada
|
Posted: Sat Jun 19, 2010 8:23 am Post subject:
|
 |
|
Thankee for those links. I've just ordered 5 x 16F684's. I'm going to try working with this, to teach myself working with the PICKit 3 - backwards. Study the code for these devices and from THAT direction, learn how to properly work with everything, in modifying them further / etc.  |
|
Back to top
|
|
 |
clee

Joined: Dec 08, 2009 Posts: 42 Location: Chicago
|
Posted: Sat Jun 19, 2010 3:02 pm Post subject:
|
 |
|
So, don't build the circuit I posted. The 2 pots interact with each other. The clipper does work though.
Craig _________________ life in many forms...
http://clsound.com |
|
Back to top
|
|
 |
Rykhaard
Joined: Sep 02, 2007 Posts: 1290 Location: Canada
|
Posted: Sat Jun 19, 2010 3:03 pm Post subject:
|
 |
|
Wavemultiplier wrote: | So, don't build the circuit I posted. The 2 pots interact with each other. The clipper does work though.
Craig |
No worry. I've posted a request for code, at Electric Druid's website. |
|
Back to top
|
|
 |
Junk Rhythm

Joined: Jan 07, 2008 Posts: 81 Location: San Francisco, CA
|
Posted: Sat Jun 19, 2010 4:53 pm Post subject:
|
 |
|
Rykhaard wrote: | No worry. I've posted a request for code, at Electric Druid's website. |
I thought the ASM code and HEX file was included on the Electrc Druid website? _________________ [twitter] [blog] [flickr] [toppobrillo] [buzz] |
|
Back to top
|
|
 |
Rykhaard
Joined: Sep 02, 2007 Posts: 1290 Location: Canada
|
Posted: Sat Jun 19, 2010 6:21 pm Post subject:
|
 |
|
g.p.macklin wrote: | Rykhaard wrote: | No worry. I've posted a request for code, at Electric Druid's website. |
I thought the ASM code and HEX file was included on the Electrc Druid website? |
Uh oh .... maybe I were blind in the eye that would have seen it then. I sent him off email, requesting permission for his code, explaining my dilemma in learning and having ordered the 16F684's today ...
Shall see. And, I'll go back and have a look ... feeling silly if it's still up there.  |
|
Back to top
|
|
 |
|