Lushprojects Blog

Projects in music, video, art, technology and learning
RSS icon Home icon
  • Vactrols and replacing variable resistors with control voltages

    Posted on August 3rd, 2014 Iain No comments

    In a lot of electronic audio circuits the response is controlled by a variable resistor rather than a control voltage (CV). If you want to adapt these circuits to use in a modular configuration then you often feel it would be nice to replace or augment the variable resistor with a control voltage input. In some cases this can be quite easy – the variable resistor might just be set up as a voltage divider between two DC levels and effectively the output of the wiper is a control voltage. However it is often the case that the variable resistor is actually manipulating a waveform inside the circuit. For example, in a lot of filter designs the resonance level works on a variable resistance controlling the amount of positive feedback from the output to the input and this isn’t easily replaced with a control voltage.

    I recently got this question from the web:

    I want to add external CV [control voltage] control to an existing circuit. It’s to control the resonance of a filter where there’s already a pot to do this manually. My first idea was to use a vactrol and run the resistance from that in sequence with the pot with the pot then acting as an offset whenever there’s CV applied. However there’s a few things I’m struggling with.

    1) It’s always only going to be a positive offset, even if you feed a bipolar signal to the CV, being that the vactrol can’t output negative resistance :)
    2) What’s the strategy for managing current limits going to the vactrol? I’m familiar with *reducing* current via resistance but what if you don’t actually know what the current is going to be? How do you bring it within a usable range?
    3) The big question: is this the best way to achieve the original aim? Any other suggestions?

    This question nicely captures the classic problems in this situation – there isn’t an easy general purpose way of changing a control voltage in to a variable resistance. The simplest approach, as suggested here, is to use a vactrol. For those not familiar with the term a vactrol is a light pointing at a light dependent resistor in a sealed unit. By connecting the control voltage to the light you generate a variable resistance that depends on the control voltage while keeping the control voltage electrically isolated from the resistance.

    Vactrols are easy to use but have lots of limitations – they don’t have a well defined relationship between the CV and the resistance and the range of resistance values achieved may not match what you want in your application. Generally they also have quite slow response. There isn’t much you can do about these limitations. Some kind of preprocessing of the CV might help set the range of resistances achieved to better meet your needs. You will also want to introduce the light dependent resistor in to the circuit with some kind of additional adjustment (perhaps the existing control) to set the control-point it is working around. For example, to get a bipolar response (Q1 above) you can add a DC offset to the CV so that the bipolar signal becomes an alternating positive signal and then set the adjusting resistor to position the range of the output to be that you are interested in. You can try putting the vactrol in series with the adjusting resistor instead of in parallel.

    As far as I know most vactrols will go down close to 0 Ohms resistance when the controlling light is fully-on. This gives you the lower bound for the resistance, and hence upper bound for the in-circuit current. As just about all variable resistors also go to 0 Ohms you can pretty much add a vactrol in series or parallel with an existing variable resistor from the point of view of the minimum resistance (Q2). If you don’t want the vactrol to drop to 0 Ohms put a resistor in series with it, or manipulate the CV to limit how large the signal feeding the vactrol’s lamp gets.

    As for Q3 – no, sorry there isn’t a general way of replacing resistance-driven circuits with CVs. There are various circuits that are called voltage-to-resistance converters (eg see the LM13700 datasheet) but in reality these have complicated limitations on how they can be used and don’t fully isolate the CV from the rest of the circuit. Unless you know a lot about how the circuit you are modifying works and fully understand the limitations it is hard to retrospectively introduce these in to an existing design that uses a mechanical variable resistor. If you *really* want a solution you could have a servo-motor turning a mechanical variable resistor – I can remember a few hi-fi buff friendly amps that used this approach.

    Normally though the best you can do is to experiment with different ways of using a vactrol and learn to love their limitations. Any technical defects are called “character” and in classic audio equipment people pay good money for them!

  • Kit building – Stylophone MIDI controller

    Posted on May 18th, 2014 Iain No comments

    For my birthday a few years ago, my girlfriend gave me one of the “new model” Stylophones. I proceeded to impress her with my technical prowess by failing to find the volume control (which was turned down to minimum) and pronouncing it dead on arrival. Once we found the volume control I demonstrated my musical prowess to the point where I was banned from using it further while she was in the house.

    They are such a cute package that the urge to hack them is almost irresistible. The first problem though is how to get in – the two halves are joined with glued tabs and I am afraid that force is the only way. With luck you can keep the tabs intact enough to rejoin later.

    Once inside the electronics consist of an amplifier joined to a main board with the inevitable custom IC hidden under black resin. Seemingly, there is not a vast amount of hacking potential then. Having pulled mine open it languished for a few months while I waited for inspiration for what to do next. When Jason Hotchkiss mentioned to me that he had a kit to turn the Stylophone in to a MIDI controller it grabbed my attention. More so when he warned me it was a difficult build and he had only sold a few because his warnings on how hard it was had dissuaded potential customers. Well, this sounded like a challenge to me.

    Stylophone with MIDI add-on

    The kit comes with three different PCBs to add to the Stylophone and a large quantity of fine wire. For me it was an interesting build, certainly no harder to make than any of my video bending projects, but not a simple job either. As always Jason provides instructions that really help bring things together.

    A few hours got everything installed and working first time. I rejoined the case with tape to allow me easy access in future in case I want to change anything else.

    MIDI Stylophone Taped

    In use it is a really fun item. Playing a grand piano synth from a Stylophone is a rather crazy experience. You can whizz up and down the keyboard like a real virtuoso. An unexpected bonus (hey I don’t read the documentation) is that it contains a tilt sensor so you can do pitch-bend a modulation by turning the Stylophone. It’s a great controller when connected up to the LushOne.

  • My approach to video circuit bending

    Posted on April 11th, 2014 Iain No comments

    Video bending experimentI get asked quite often about how I approach video bending projects, so here are my thoughts. Because I am trained as an electronic engineer my approach is theoretically and technically driven as opposed to the experimental approaches that other people may use. I find this works particularly well with video bending because you need to retain the structure of the video signal if it is going to display properly.

    When starting out on a project the first thing I do is to find all the documentation I can about the unit. If I can obtain schematics or service manuals then these can be a great help. For an interesting unit I am happy to buy service manuals if they are not available for free because it saves so much time and hassle. So far it has always been a good investment. If I do get hold of good documentation then examining the circuit will often give me ideas about how things might be modified. Basically I am looking for places where key signals, like the separate RGB colour levels, can be intercepted and modified. There is more discussion on that below.

    If I don’t have a good manual then I will look at the circuit on the board and try and reverse engineer the key parts. This normally starts with identifying the main chips on the board and through the datasheets and knowledge of the normal operation working out how the signal flows through the circuit. Once you get an idea of the signal flow then you can start to focus in on areas that seem to offer the possibility of modification.

     IMG_2978web

    Bending Opportunities

    Finding bending opportunities is partly science, partly art and partly gut instinct. You want to find a signal or processing function in the circuit that is amenable to modification. A composite video signal consists of the video information (luminance and colour) combined with synchronization information (horizontal and vertical). In most cases you don’t want to over-distort the synchronization information because this will prevent the signal displaying. Finding opportunities to just modify the video information is important.

    For the video signals then a lot of units will separate video and sync information internally. If you can pull out pure luminance, hue or RGB signals from the circuit then you can make these available to process and distort through other circuits without damaging the synchronization. Just additively mixing in audio or other video signals on top of a video signal can be interesting. Some, cheaper, circuits don’t separate the video and sync information and it can be hard to bend the signals for these.

    Many video mixers also contain various gate signals that control how different parts of the same picture are processed in different ways. These are used to implement things like wipes and colour fills. Pulling out these gate signals or being able to inject new gate signals can create fantastic effects. Try xoring two gates from different mixers together and then injecting the result back in to the original circuit.

    As well as going after the signals you can go after the processing functions. A simple trick is to modify the circuit to remove the limits on how strongly a processing function affects a signal. For example if you have a circuit that controls the colour saturation then it might be possible to boost the gain of this beyond what is intended and create super-saturated and unstable colours in the output.

    Another thing I like to do is to see if it is possible to replace manual controls with control voltages. In this way you can sweep control values rapidly, even within one frame of a video, under the control of an external circuit. A lot of effects just come from feeding an audio signal in to a control voltage that varies some aspect of a video signal.

    Intellectually I find it more interesting and more satisfying to work with primarily analogue video equipment, but I guess I should add a word on digital equipment. In circuit bending on digital circuits a common technique is just to ground certain address or data signals so that the circuit starts to misbehave. The results are unpredictable, but fun. This approach carries quite a high risk that the outputs of the digital circuits will be damaged as they try and drive a grounded signal “high”. I suspect this is the cause of a lot of equipment damage caused by circuit bending attempts. One reason you can get away with it on some older equipment is that they used NMOS logic. A feature of NMOS is that it has no active pull-up device (just a resistor) so grounding the output is acceptable.

     

    Equipment Safety

    People often ask me if I have ever blown anything up while circuit bending. So far the answer is “no”. I think this is largely because I am normally working with a reasonably good idea of how the circuit is meant to operate and I understand what common electronic circuits will and won’t tolerate being done to them. However, circuit bending is a full contact sport. If you can’t tolerate the risk of destroying what you are trying to bend then you shouldn’t have opened the case.

     

    Personal Safety

    Personal safety is your responsibility. My very strong preference is to only work on equipment that is powered from a low voltage source or, if it has an internal power supply, where the high voltage elements are fully protected against accidental contact. I recommend you don’t work on designs where high voltage components might be touched.

    Older equipment will contain lead, and possibly other unpleasant chemicals. Always take appropriate precautions including through hand-washing before handling food.

     

     

    I don’t know how much it is possible to teach circuit bending. Particularly with video it is a black-art and relies heavily on experience and luck. Hopefully these hints will help those that want to give it a go though. With a lot of old analogue equipment being sold cheap just get something and start exploring.

  • Spectrum Analysis and GSM Broadcast Decoding in 2013

    Posted on November 17th, 2013 Iain No comments

    This post is about the low-cost SDR systems becoming available. I am afraid it’s not going to be very beginner friendly so I am going to assume that you have a general understanding of radio technology and SDR. In the last post I talked about the massive and expensive spectrum analyzers I used in the 1980s. In fact, even in that era I worked on SDR. Using a PDP 11 we analysed batch files of samples from radar systems to test new processing algorithms.

    So why is SDR a hot topic now? Basically a combination of new hardware and the increasing power of desktop PCs has brought powerful SDR solutions within the reach of hobbyists and low budget researchers. There are two main strands:

    Firstly, there is what we might call serious low-cost SDR. This consists of hardware boards in the spirit of something like the Arduino or Raspberries Pie which provide experimental but capable SDR platforms in a relatively low-cost package. Typically though these are not what you could call “cheap” as they still may cost hundreds or thousands of pounds. What you get is something with fairly good RF performance and perhaps the possibility of transmitting as well as receiving.

    Secondly, there is what we might call seriously-low-cost SDR. This reuses very cheap USB TV receivers as SDR receivers. It is this ultra-low-cost SDR that I am going to talk about here.

    My SDR Hardware!

    My SDR Hardware!

    Two key points make ultra-low-cost SDR possible. Firstly it was discovered that certain chipsets widely used in USB TV receivers had a much wider tuning range than was needed for TV. The chipsets can also send the intermediate frequency I and Q samples directly over USB to the host computer. Secondly it was found that the processing power on normal PCs was sufficient to perform, in real time, SDR functions on the I and Q samples coming from the USB receiver.

    I bought a dongle based on the RTL2832U+R820T chipset from Amazon for £12.50. This was a slight mistake as it was despatched from the Far East and took several weeks to arrive so my first advice would be to order locally. So what does a cheap USB TV receiver like this provide in terms of performance? According to this very useful stream of consciousness this chipset can tune from 24 – 1700 MHz. That covers FM, ham radio and GSM. It uses a 3.57 MHz intermediate frequency and has a tuning error of perhaps 30 ppm which is relatively stable for a particular dongle when it is warm.

    The intermediate frequency sampling is 8-bit and around 2MS/s is an achievable sampling rate. The dynamic range is about 45 dB. My experience is that the biggest problem is various spurious signals appearing that seem to by primarily due to interference at the intermediate frequency. There are various homebrew solutions to improve screening described on the web but I haven’t tried these.

    My 1st experiment was using SDR# running on Windows. This was easy to install using a recipe I found on the web. I just hooked up a few meters of wire to use as an antenna. I was easily able to scan the FM and air bands to receive various stations. Once the “Correct IQ” option was checked I was able to receive sounds. I also looked around 900 MHz and saw what I thought were probably GSM cells. It’s not really fair to compare my 2013 technology to the spectrum analyzers of 1986, but as a way of visualising common radio signals it serves the same purpose for 0.07% of the cost (less allowing for inflation)! On its own I find this fascinating.

    Radio 4 FM spectrum using SDR# with stereo pilot tone clearly visible

    Radio 4 FM spectrum using SDR# with stereo pilot tone clearly visible

    Though SDR# is easy to use I think the Windows environment is fairly limited for SDR and if I was starting again I would probably go straight to Linux. Most of the serious SDR tools are primarily developed for Linux.

    Having seen what looked like GSM BCCHs I was really keen to try and decode them. I found this guide which I basically followed. I didn’t want to set up a dedicated machine for SDR so I decided to go down the virtual machine route. I installed the free version of VMware player and installed Kali Linux version 1.0.5. Though Kali Linux download page has an image for VMware it is an old version so I created a new VM and installed 1.0.5 from the ISO. This was very easy. Version 1.0.5 has many SDR tools already installed and as many of the tools seem difficult to install this is a significant advantage. I was very impressed with the performance of VMware player and the ease with which it was possible to connect the USB dongle.

    Having created the virtual machine I followed the recipe linked above to decode the GSM broadcast channel. If you start from version 1.0.5 you don’t need to install GNU radio but when you install Airprobe you will need to add the additional dependencies as explained in the recipe.  The only issue I found was that apt-get didn’t like the “-y” option so omit this from the dependency install and manually accept the installation.

    The Airprobe tool used to decode the GSM BCCH seems pretty buggy and is still a work in progress. Though it has a GUI it doesn’t appear to respond to any clicks in my version so you need to set everything from the command line. The command I used was:

    ./gsm_receive_rtl.py -s 1e6 –f 948000000

    948000000 is the frequency of the GSM BCCH I found using SDR# in Hz. You can see GSM downlink channels as fairly broad peaks around 900MHz in SDR#. Check the downlink centre frequencies used by GSM to get the exact centre for any candidate.

    I immediately started getting decoded GSM cell data from Airprobe, but it seems to quickly loose sync or tuning and stop producing output. I suspect there is some kind of bug in its tracking algorithm, but it could also be a peculiarity of my configuration. When the program gets stuck use control-C in the starting terminal to kill it.

    GSM BCCH decoded using wireshark

    GSM BCCH decoded using wireshark

    Anyway, for £12.50 and a load of free software I think the ability to receive GSM cells is pretty impressive.

  • Spectrum Analysis in 1986

    Posted on November 17th, 2013 Iain No comments

    I have heard that when you use a tool your brain treats it like an extension of the body and, effectively, it becomes part of you. I don’t know if this applies to electronic test equipment, but certainly some of my strongest memories of learning practical electronics are the equipment I used in different periods.

    In 1986 I joined the Communications Lab at GEC Research as a student apprentice, or “intern” as people would probably say now. It turned out to be a fateful decision because I worked on early trials for the GSM cellular system and that defined the future direction of my career. The labs were proper research spaces with long wooden benches and lots of hand-made hardware which was cutting edge for the date. They also had a lot of fancy test equipment.

    We had a raft of impressive Tek mainframe scopes on trolleys, but sometimes more exotic equipment was needed. Doing radio work a spectrum analyzer comes in handy and the most common one around the site was the Marconi Instruments 2382. Marconi was part of GEC so it made sense to buy in the family, but I think Marconi had genuinely produced a product that had a price/performance ratio that lead the industry. Using a computer-driven display (controlled by the good old 8085 CPU) to replace the storage-tube traditionally used for spectrum analyzers reduced costs and provided exciting features like GP-IB based plotter output.

    Marconi2382 Spectrum Analyzer

    Marconi2382 Spectrum Analyzer

    The 2382 was a massive instrument of two brown boxes for the analyzer and the display. The combination was a foot tall (30cm) and nearly 2 feet deep. It was build like a tank. I am pretty sure that if it fell on you it would probably kill you. The controls included a vast field of clicky switches with embedded LEDs (no membrane keyboards for this monster). In fact my recollection of operating the device involves a lot of clicking. It had some kind of internal relay-driven attenuator and some operations would unleash vast sequences of clicks from the interior.

    I think the 2382 was regarded as pretty cheap for what it did. This piece from IEEE Electronics and Power in May 1985 says the prices start at £18,500. £18,500 in 1985! Probably enough for a small house.

    Learning to drive the 2382 was not just about learning to navigate its many controls. It also taught me a lot about how radio works in practice. Just looking at FM stations gave you a real visual model of ideas like noise, sidebands and carriers.

    Marconi Analyzer - IEEE Comms and Power May 1985

    Despite it’s bulk and cost the 2382 had one major problem – a maximum operating frequency of 400MHz. Not enough for us to use it on the GSM baseband operating at 900MHz and pretty limiting for a lot of comms use. In the comms lab we often had to use even more expensive and exotic HP Analyzers. HP was pioneering the use of screen-menu driven interfaces so though their stuff was the bees knees it never matched the 2382 in terms of button-load shock and awe.

     For those that want to dig deeper, try the Marconi 2382 Data Sheet, or the service manual for the RF unit.

  • Azymbol from Belgium – LushOne case builder extraordinaire

    Posted on November 16th, 2013 Iain No comments

    One of the joys of running LushProjects is seeing some of the imaginative work that people put in to building cases for my circuits. Recently Azymbol from Belgium sent me some photos of his LushOne system case which breaks new ground in design and craftsmanship.

    Working in MDF and recycled materials including placemats and tennis ball tins Azymbol has created a design that evokes 60s futurism displaying the controls to maximum advantage on a dramatically curved frame. The colour is applied in acrylic paint and creates carefully judged dramatic contrasts.

    Azymbol LushOne

    Azymbol LushOne

    Azymbol LushOne Front

    Azymbol LushOne Front

    Azymbol LushOne Side

    Azymbol LushOne Side

    Azymbol LushOne Back

    Azymbol LushOne Back

    Technically Azymbol has used the LushOne base, Contour and Inca modules to build the synth and a Velleman P8042 symmetric power supply he sourced himself.

    The design and build are magnificent. Bravo!

  • PCB Layout Tools – I am a KiCAD fan

    Posted on September 24th, 2013 Iain No comments

    From the postbag:

    Was thinking about a project building front panels for various DIY synth projects out of PCB material and mounting all the control components (pots, switches) on the PCB itself like on the Lush (eliminating most of the point to point wiring). What PCB design package do you use and how difficult was it to learn?

    Tom

     

    Dear Tom,

    As I’ve said elsewhere I hate point-to-point wiring so I made it a feature of LushOne to have all the components mounted on the board. I had previously used Eagle but the LushOne the board was too big for the low-cost edition. In any case, I like to use open source software when I can even though a lot of it is not that user-friendly. The LushOne was the 1st project I laid out in KiCAD and I’ve actually found it a really effective design tool.

    Like all CAD systems it has a bit of a learning curve, but generally I’ve found it easier to use than Eagle. It’s not as powerful as Eagle and lacks the scripting capabilities but it is perfectly adequate for my projects.

    The worst part of KiCAD is the Gerber viewer. I tend to use the online Gerber viewers like the one at OSHPark.

  • Building a LushOne system

    Posted on September 17th, 2013 Iain No comments
    LushOne-System

    LushOne system

    It has always been my intention that it should be possible to use the LushOne to build big systems. Now we’ve got three modules designed we’ve got the basics of a capable modular synthesizer. The building blocks available in the three modules are functionally very similar to those found in classic systems like the mini Moog and MS20. Still, it’s natural to want more of everything and it is particularly helpful to have more oscillators and more mixers in any synthesizer. Over the last few months I’ve been working on my own LushOne system.

    The physical design is very simple. It’s just a piece of plywood with holes on a grid to mount LushOne boards on spacers. The layout is set up for a 3 x 3 grid of boards. I’ve designed a special board to hold the RECOM DC to DC converter. Power is distributed by “chocolate block” terminal strips under the LushOne circuit boards. Currently there are two LushOne base modules, one LushOne Contour and two LushOne Inca modules.

    psu-pcb

    Power supply – hand made board

    The boards have been somewhat modified for my own requirements. The same MIDI input controls both LushOne Base modules. This allows four oscillators to be controlled from the keyboard. The LushOne Base modules are running the prototype version 2 software which provides additional wave shapes as well as the ability to run the OSC2 to an octave higher or lower than the main oscillator. One of the LushOne base modules has been modified so that the OSC2 output is at a signal level rather than at a control voltage level. This makes is really easy to have textured base notes with several harmonics.

    The LushOne Contour module is standard. But, one of the LushOne Inca modules has a potentiometer and photo cell fitted instead of the joystick as an alternative way to provide input.

    The additional flexibility of the system with so many oscillators and signal processors is great. When I get time I’ll write up in detail some of the modifications. At the moment I am playing with digital delays using the PT2399 chip and I really must build a second LushOne Contour to get a second ADSR.

    It may not be the prettiest synth in the world, but I think it looks cool and the bang-for-the-buck is hard to beat.

  • LushOne Base – What should we have in revision 2 firmware?

    Posted on August 11th, 2013 Iain No comments

    I’ve been prototyping some new firmware for the LushOne base revision 2. I am using my experience with the original to add features that make it easier to create an even bigger variety of sounds and to use the LushOne as a serious instrument. I also wanted to add features that would help with building the LushOne in to bigger systems.

    Here’s what I have added so far:

    • Settings memory so that selections are saved when the LushOne is powered off. LushOne will return to its previous state allowing you to pick-up from where you left off.
    • Three new waveforms for the oscillators. 30% and 15% duty-cycle square wave and combined saw/square (like the MiniMoog). New base sounds enhance the range of capabilities.
    • +/- One octave settings for OSC2 in OSC mode. Get really rich, deep tones when mixing with a LushOne Inca.
    • Selection of MIDI input channel for use in more complicated MIDI systems.
    • Ability to get MIDI velocity output as a control voltage (substitutes for the “log f” out). Allows for touch sensitivity.

    What features would you like?

  • LushOne Base – High pass filter mod

    Posted on June 20th, 2013 Iain No comments
    Changes to convert the LushOne Base filter from low-pass to high-pass

    Changes to convert the LushOne Base filter from low-pass to high-pass

    Once the LushOne had a fairly complete set of basic synthesizer functions available I always intended to built a powerful multi-oscillator and multi-filter system. You may laugh, but in the back of my mind I had the brief-case sized systems built on the boutique Mattson Mini Modular components.

    Once you start thinking about building a full system then you are going to want a high pass filter option to complement the low pass filter in the LushOne Base. Fortunately it is easy to modify the LushOne Base filter to be high pass instead of low pass. Here are the changes:

    • Omit R218 and C210 and instead link the two footprints with a wire as shown on the left.
    • Change the value of C208 to 2.2nF. This is the same value as C210 so you can do a substitution there. Obviously this capacitor is now non-polar so ignore the polarity markings on the PCB.
    • Change R221 to 4.7k
    • Change R220 to 47k

    That’s all there is to it! Sit back and enjoy some new sounds.

    Generally the low pass filter is more useful so if you only have one LushOne Base then I wouldn’t make this a permanent change. However if you want to build a system with more than one LushOne base, or if you want to take the LushOne Base schematic and build your own filter on vero-board then it’s well worth having a high pass option.

    If you are using both the filters I recommend putting the high pass first in the signal path and then the low pass. This will reduce the risk of any high-frequency noise getting though in to the output. This arrangement can produce quite natural sounding instruments from the LushOne oscillators.

    Remember that with both a high pass and a low pass filter it is rather easy to cut the signal off all together by having non-overlapping filter bands!

    Here’s a little multi-tracked sample from a dual-filter LushOne: