latigid on Posted August 20, 2014 Report Share Posted August 20, 2014 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. :) Quote Link to comment Share on other sites More sharing options...
latigid on Posted August 23, 2014 Author Report Share Posted August 23, 2014 (edited) 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 August 23, 2014 by latigid on Quote Link to comment Share on other sites More sharing options...
latigid on Posted November 14, 2014 Author Report Share Posted November 14, 2014 (edited) Case(s) in point from MI: BAT54S diodes in Frames: Rail-to-rail op amp (AD8534) in Braids: Rail-to-rail op amp (MCP6004) in Tides (also Grids): Rail-to-rail op amp (MCP60042) in Edges: 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 November 16, 2014 by latigid on Quote Link to comment Share on other sites More sharing options...
latigid on Posted November 16, 2014 Author Report Share Posted November 16, 2014 Seems to work in simulation. (link to Falstad) 1 Quote Link to comment Share on other sites More sharing options...
latigid on Posted November 18, 2014 Author Report Share Posted November 18, 2014 I routed up a four-channel board with different power options. Just need to move a few labels around. Quote Link to comment Share on other sites More sharing options...
latigid on Posted November 18, 2014 Author Report Share Posted November 18, 2014 (edited) 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 November 18, 2014 by latigid on Quote Link to comment Share on other sites More sharing options...
latigid on Posted November 23, 2014 Author Report Share Posted November 23, 2014 Now with board-mounted pots; the 1k value shouldn't significantly affect the gain factors. The pads could be bridged if they weren't needed. Quote Link to comment Share on other sites More sharing options...
chriss Posted November 27, 2014 Report Share Posted November 27, 2014 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. Quote Link to comment Share on other sites More sharing options...
latigid on Posted November 30, 2014 Author Report Share Posted November 30, 2014 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. 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. Quote Link to comment Share on other sites More sharing options...
latigid on Posted November 30, 2014 Author Report Share Posted November 30, 2014 The DOUT R5 board has the following pinout per shift register: NC D6 D4 D2 D0 VS D7 D5 D3 D1 This needs a bit more consideration in order to connect two control boards to one SR. Quote Link to comment Share on other sites More sharing options...
latigid on Posted November 30, 2014 Author Report Share Posted November 30, 2014 A bit harder from this side! Quote Link to comment Share on other sites More sharing options...
latigid on Posted December 5, 2014 Author Report Share Posted December 5, 2014 (edited) 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 December 6, 2014 by latigid on Quote Link to comment Share on other sites More sharing options...
latigid on Posted December 8, 2014 Author Report Share Posted December 8, 2014 (edited) 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 December 8, 2014 by latigid on Quote Link to comment Share on other sites More sharing options...
latigid on Posted December 12, 2014 Author Report Share Posted December 12, 2014 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. Quote Link to comment Share on other sites More sharing options...
Phatline Posted August 3, 2016 Report Share Posted August 3, 2016 Hi i know that shematic is for AOUT.... but could i use this for Audio also? I mean i have a non Modular Audio-Source (Guitar, Synth, Drummachine) and i want it to get to Modular Gain.... is this Circuit the right choise for that? thx Quote Link to comment Share on other sites More sharing options...
latigid on Posted August 3, 2016 Author Report Share Posted August 3, 2016 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." 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. Quote Link to comment Share on other sites More sharing options...
Psykhaze Posted August 3, 2016 Report Share Posted August 3, 2016 (edited) i don't see where the switches should place jacks are those from Thonk ? Edited August 3, 2016 by Psykhaze Quote Link to comment Share on other sites More sharing options...
latigid on Posted August 3, 2016 Author Report Share Posted August 3, 2016 8 minutes ago, Psykhaze said: i don't see where the switches should place Either side of the duo LED (3-pin). 8 minutes ago, Psykhaze said: jacks are those from Thonk ? or Erthenvar etc. I think Mouser might even stock them. Anyway, they're very widely available. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.