Jump to content

3-way CV range toggle


latigid on

Recommended Posts

gallery_5453_5_6890.png

 

 

 

 

 

I am thinking about a control circuit for CVs in any one of the available AOUT modules.

 

The concept involves a -10 to 0 V source derived from the DAC and an inverting amplifier. The second op amp stage can do one of three things:

 

1. Inverting buffer (voltage level = 0 to 10 V)

2. Inverting amplifier (voltage level = 0 to 5 V)

3. Inverting mixer (voltage level = -5 to 5 V)

 

This would be accomplished by an ON-OFF-ON DPDT toggle switch. Case 1 allows the voltage to pass without any further change (middle position). The second switches in a resistor in parallel with the feedback element. Using a cermet trimmer, one can get an accurate gain setting of 0.5 for unipolar 0-5 V (or any other value up to 10 V). The third adds a trimmed offset of 5 V for bipolar operation.

 

Should it work? Thoughts and criticisms are welcome.

 

:)

 

 

 

Link to comment
Share on other sites

gallery_5453_5_18672.png

 

 

Okay, another concept but now it's for CV inputs for MBCV. Again I'm abusing centre-off toggles. The idea is to maximise the scaled signal input while protecting the ADC from over- and undervoltages. Each inverting gain stage should give a final input range of 0-3.3 V.

 

The centre-off position is for 0-5 V inputs. The two stages are set for -0.66 and -1 gain. Note the (variable) resistor is out of circuit when the switch is in the middle position.

 

The other two positions are configured for -5 to 5 and 0 to 10 V inputs. One switch pole adds a +5 V offset, while the other adds in a second resistor for both conditions. So we have two gain stages of -0.66 and -0.5, again giving a final input range of 0-3.3 V.

 

The output of the second op amp is current limited and clamped between 3.3 V and 0 V. It might be useful to use BAT54S Schottky diodes as they have a low forward voltage (e.g. 320 mV at 1 mA, 400 mV at 10 mA). It might not be enough though as apparently the STM32F4 AINs shouldn't exceed Vcc (3.3 V). But Vcc max is 3.6 V? I'd appreciate some advice here. More current limiting?

 

How are the ADCs handled on the STM cores? Are some bits discarded? Is it better to limit the voltage more conservatively? I thought about rail-to-rail op amp limiting (Vcc = 3.3 V) but it seems that most chips max out at 1 volt below Vcc.

 

 

Reference threads:

http://www.muffwiggler.com/forum/viewtopic.php?t=104872

http://mutable-instruments.net/forum/discussion/938/cv-inputs-how-to-protect-them-from-negative-or-too-high-voltages/p1

http://www.eevblog.com/forum/projects/pic-input-protection-using-a-zener-diode/msg21840/?PHPSESSID=33bbdf2e2a88957db87cce882680f1ca#msg21840

http://www.nxp.com/documents/data_sheet/BAT54_SER.pdf

Edited by latigid on
Link to comment
Share on other sites

  • 2 months later...

Case(s) in point from MI:

 

 

 

BAT54S diodes in Frames:

post-5453-0-50474300-1416003265_thumb.pn

 

 

 

Rail-to-rail op amp (AD8534) in Braids:

post-5453-0-46711500-1416003553_thumb.pn

 

 

 

Rail-to-rail op amp (MCP6004) in Tides (also Grids):

post-5453-0-62048200-1416004286_thumb.pn

 

 

 

Rail-to-rail op amp (MCP60042) in Edges:

post-5453-0-62635000-1416005063_thumb.pn

 

 

 

The diodes are a bit easier to integrate but their leakage current could mean the ADC inputs go a bit too far over the allowed limits. The op amps will ensure that any over/undervoltages will be clipped to the supply (3.3 V and ground) but the input range is limited to about 0.025-3.275 V, or about 0.06-3.292 for the 8534.

 

Any preferences?

Edited by latigid on
Link to comment
Share on other sites

Well... of course the pot can't drive an op amp as the impedance is too high... I'll move them to the output. Anyone know off hand recommended pot values? I.e. what's good to drive the GPIO correctly?

 

Think again: the first op amp stage is a better place to put the pot.

Edited by latigid on
Link to comment
Share on other sites

Nice work. I like that you can switch between different input voltages. Very cool.

Last week I stumbled over the mutable instrument schematics as well. I prefer the the attenuverting scaler from the braids schematic. Should work with a MCP6002.

Christoph.

 

 

Many thanks!

 

That's a good idea for sure, but for now I prefer to keep it simple. Also attenuation to zero is much easier with a unipolar control. I don't yet know how TK will handle the software side of things and perhaps the levels will be limited in any case.

 

 

Here's another installment: a control board to work with the AIN board above.

 

 

med_gallery_5453_5_39310.png

 

med_gallery_5453_5_24219.png

 

 

 

My idea is to panel mount the AIN board via the pots, and have this at a right angle above. It includes:

 

4 sockets for AINs, connected via a ribbon to the bottom board

4 switches (ON-OFF-ON) to control the input ranges. I chose 2x 16-way IDCs which will span over two of the jumper spaces below.

4 outputs from a DOUT module. These will be either four CLOCK OUTS, or two CLOCK OUTS, one START signal and one CLOCK IN (see below). These are connected to 3.5 mm sockets but I have also used Schmitt triggers as LED drivers. The 74LVC14A chip (SMD) runs off 3.3 V but has 5V tolerant inputs, so it can be run directly from the DOUT.

1 CLOCK IN routed to two Schmitt triggers in series (logic level preserved) and the same LED as above. This is jumperable so the correct function (CLOCK IN or OUT) can be selected. I think 100k resistors should provide enough current limiting to protect the chip. The 3.3 V signal can then be connected to a DIN module for clock functions.

 

 

If I've missed anything, please let me know.

Link to comment
Share on other sites

The spacing is a bit tight with 700 mil between the pots. I've enlarged the board to 100 mm and spaced the pots 900 mil/22.9 mm apart.

With a bit of suggestion from Altitude I think it will be better to use an LM4040 reference in place of the linear Vreg.

I will also include 4427 chips on the control board to optionally select 12 V for two (or maybe all four) gates... Edit: because I will use the same board as an output module for AOUT (+atten.), CV range switch, and gates with LEDs

Edited by latigid on
Link to comment
Share on other sites

So, as the STM32F4 ADC reference is 3.0 V, the first amp stage must be decreased. I think it's safe to keep the supply rails at 3.3 V, as the STM32 pins can take up to 3.6 V. Anything above 3 V on the output will clip the top of the waveform though. A 59k feedback resistor in the first inverting stage will turn 5 V into 2.95.

 

With 59k in the first stage, a cap value of 1 pF will result in a first order filter with a corner frequency of 2.7 MHz, 10 pF would give 270 kHz, 100 pF 27 kHz etc. Fc = 1/2*pi*C*Rf. So I'd recommend a 10 pF cap here. A filter on the second stage is probably not needed but I'll leave the pads in.

 

Other recent additions (I won't bother with a picture):

 

12 and 3.3V travel through the same interconnect cable as the AINs.

5 V was replaced by an LM4040 precision reference

The 4427 driver can be powered by any voltage (over 7 V I think) via the 12V rail or an external source anywhere up to 18 V. The trigger thresholds are less than  0.8-1.0 V for off and greater than 1.5-2.4 V for on, which are easy to get from our DOUT module. The supply voltage then sets the gate level.

Switches are more centred between the jack sockets with the 2x8 DIL header at 90°.

One central mounting hole was added so the boards can be stacked one on top of the other. This could be better for small breakout boxes rather than full 19" panels.

Edited by latigid on
Link to comment
Share on other sites

One annoying error with the AIN board: changing from LM7805 to LM4040 I've misplaced the regulator (should come after the series resistor). I don't think it's fatal as there are a few spare headers for Vref. 

 

New things: here is a simulation for a 0-10/0-5/-5-+5 V offset circuit for a MAX525 based AOUT. The aim is to build a circuit following Altitude's but probably through hole for the most part. 

Link to comment
Share on other sites

  • 1 year later...

Op amps are pretty good amplifiers :)

TL07x are quite good "Swiss Army knife" chips and you can generally make an amplifier, mixer, inverter, filter etc. with just a few external components. Depending on where the audio is going, you may want a decoupling cap in there to remove DC offset.

 

...

 

While I'm here, these are the current PCBs for the "CV toggle."

 large.oblique.jpg.630477604d5b87a1ae6ead

 

I decided against the toggle switches, because they're too big and you have to pay ~$5 each for decent quality ones. Tayda have cheaper options but they're generally not well regarded. I've opted for push button DPDTs instead; because a centre-off (ON-OFF-ON) isn't possible, I used two per channel and the second pole is used to illuminate an LED, which effectively tells you what range setting you're in. I was also unhappy with the mounting -- too much space and the 90 degree ribbon connectors were awkward. Now the whole thing is 50mm wide with the processing board stacked below the panel board.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...