Digging deep into Turing Lock issues

From circuitbending to homebrew stompboxes & synths, keep the DIY spirit alive!

Moderators: Kent, Joe., luketeaford

User avatar
windspirit
Super Deluxe Wiggler
Posts: 3192
Joined: Thu Sep 20, 2012 11:43 pm
Location: krellifornia

Digging deep into Turing Lock issues

Post by windspirit »

<RANT> Hello, as many of you know I have made a lot of Turing Machines (at this point probably more than 30) as well as designing several expanders. One of the main reasons that I stopped making them is that there was a wide variation in locking behaviours and I spent a lot of time debugging to figure out what was wrong. In this process I have become very well acquainted with the Turing Machine circuit and the various bugs/ bug fixes and quirks associated with it. I truly love this module (thanks Tom for sharing it with all of us!) Now I have come across a new bug that I simply can't wrap my brain around and I think I need all of your help fixing it. </RANT>

Many of us know that locking malfunctions are due to undesirable transistor gain properties due to differences in different transistors (their "beta coefficient" if you will.) With faulty transistors the gain is so high that it will cause glitches in the comparator circuitry that is responsible for locking, creating little spikes on the comparator output that will cause the TM to flip a bit. Currently there are 2 common ways of fixing this:

1) choose a new transistor until you find one that locks properly.

2) reduce the gain of the noise circuit going into the comparator by soldering a 1M resistor across R31.

Normally I dont even solder the transistor in to the circuit, I save it for last so that I can try out a bunch of different transistors until I find one with good characteristics.

Concerning option 2 I don't like doing this because it will reduce the range of the prob. knob that will yield randomness, effectively making large dead-zones on the sides of the prob. knob travel where locking stays active.

But here is my problem: on a new Turing Machine that I am building I always get locking working on one side and locking not working on the other side no matter which transistor that I choose.

Below is a copy of the noise amplifier circuitry followed by a picture of the switching/ comparator circuit that the noise circuit is feeding.

Image

Image

The circuit is pretty straightforward. Basically you should have noise going pretty close to the rails feeding the op amp comparator, then the prob. knob sets the threshold for the comparator to give a sort of random logic signal which determines whether or not the next bit will be flipped whenever a clock signal advances the bits in the shift register.

Looking at the noise transistor you can see a capacitor going into the amplifier circuitry which is supposed to remove the DC bias being applied to the signal. Therefore the transistor (at least to my understanding) should have NO dc bias and should be a completely symmetrical signal. This would contradict the behaviour that I am seeing on the scope when I look at the output of the comparator.

This is the comparator output (pin 14 of the TL074) when the prob. knob is all the way CW (locked):

Image

Here is the same output when the prob. knob is all the way CCW (anti-locked) :

Image

I have noticed that pressing my finger on the transistor makes a small difference but does not completely clean up the signal.

Image

As you can see, the comparator never completely achieves anti-lock. I have tried a whole slew of things in order to fix this issue. All of the scope shots taken are on a Turing in which I have removed the CD4016 and T2, so the comparator circuit is not driving any other circuitry. I tried replacing R29 with a 1M pot to see if any other resistor values would cancel the DC bias. I shorted R23 so that the comparator threshold would get as close to +12V as possible for anti-lock (I tried R35 first but then realized that the circuit was backwards compared to how I imagined it, +12 is anti-lock and -12 is lock.) I raised the value of R22 to provide more gain for the comparator threshold. I messed around a whole lot with the transistor gain circuitry in terms of changing the resistor values.

Also it is worth mentioning that I noticed different tl074s act differently. I was trying some out that would give me locking glitches on the lock side of the prob. knob, but none that made the anti-lock issue go away. I will try to find that TL074 again and post some pictures.

I am at a serious loss as to how to fix this issue. I think as a last resort I can place a trim-pot across R31 and trim it so that the noise just barely doesn't touch the rails and the the locking dead-zones are kept to a minimum but I would much rather fix the source of the problem.

Thank you for reading and for any advice you can give.
User avatar
woodster
Super Deluxe Wiggler
Posts: 1359
Joined: Mon Mar 05, 2012 9:36 am
Location: UK

Post by woodster »

I do find this intriguing and will follow your progress with interest.
I've built two Turing Machines, and one of them in particular is quite finicky in it's locking behavior.
I've not had the time to spend too long swapping out components etc, and it's not been that bad that it's driven me to distraction or anything, just a minor irritation I suppose.
Saying that, I've not had too much time to actually use my system in anger anyway of late.
Hopefully this will change soon.
If so, at that point a solution to the problem would feature much higher on my radar.
Good luck with your mission :tu:
nigel
Ultra Wiggler
Posts: 844
Joined: Wed Jan 16, 2013 6:49 am
Location: Melbourne, Australia

Post by nigel »

What is the signal at IC4 pin 7? Pin 8?
User avatar
BugBrand
Knowledge of Bugs
Posts: 7884
Joined: Tue Jul 15, 2008 11:59 am

Post by BugBrand »

Some thoughts::

I tend to prefer to make WNoise be roughly +/-5V amplitude - so, yes, a trimmer (eg. R31) could help. Or, even, add zeners to limit amplitude at the output.. (though that may well skew the randomness somewhat)

You'd then adjust the comp. levels from Change and IC1A to cover the ranges +/-5.5V (or so - that'd give, in theory, just above the range of the white noise)

I think you're better off working at those amplitudes than futzing around by the power rails.

[wonder if output of IC4D should be rectified - swings -12 to +12 feeding the IC5 pin13 - which should expect 0 to +12]

Noise source is fairly standard - if you are getting DC offset then you could likely bring C10 down (think I tend to go 100n) and could also AC couple the output from IC4 pin 8.



No, I don't really know the circuit - just looking at the schems..
User avatar
windspirit
Super Deluxe Wiggler
Posts: 3192
Joined: Thu Sep 20, 2012 11:43 pm
Location: krellifornia

Post by windspirit »

Ok, I have been working quite a bit on this and I think that I may have found another clue. I was doing what Bug suggested to lower the amplitude of both the comparator threshold and the noise to around +/- 5V to avoid getting close to any boundary conditions. However, no matter what values of resistor that I put in the final noise amp (IC4C, output is pin 8 of the tl074) the noise still hits the rails. I currently have a 1k resistor as R33 and a 1M resistor as R32, so the amp should be attenuating the noise by 1000 (IE Gain of the amp = .001) but I still am getting -10 to 10V swings at the noise output even though the input is less than 1V p-p.

I checked and the positive op amp input for IC4D has a good connection to ground.

Any thoughts?
User avatar
BugBrand
Knowledge of Bugs
Posts: 7884
Joined: Tue Jul 15, 2008 11:59 am

Post by BugBrand »

If you're still getting (effectively) rail to rail output from IC4C, and you've really set it to attenuate by 1000, then it suggests some trace is broken and making it run as a comparator.

In correct operation then you would almost certainly need that 2nd amplification (not attenuation!) stage to get up to around +/-5V. My own standard usage is something like x470 on each opamp stage (from memory).
glitched01
Wiggling with Experience
Posts: 330
Joined: Wed Nov 03, 2010 5:16 pm
Location: US
Contact:

Post by glitched01 »

Maybe I'm not adding anything you don't already know, windspirit, but those iTead Studio boards are pretty fragile.

I've built 4: one of which had the locking issue, another had low-noise, and the other two came out fine. In the ones where I had to troubleshoot, it became a lost-cause after removing a component or two--the board definitely lost its continuity.

I'd be happy to hear what could make this build more robust and worry-free. (But it's still among the best DIY projects around!)
User avatar
waveglider
Super Deluxe Wiggler
Posts: 1281
Joined: Thu Feb 28, 2013 12:49 am
Location: Los Angeles

Post by waveglider »

I had the exact same issue on a few builds and it drove me nuts.
One I did manage to 'fix' by swapping the TL074 and transistors from a different batch but I had the same noise to the rails issue and had no idea what was causing it.
User avatar
forbin
Common Wiggler
Posts: 133
Joined: Wed Aug 18, 2010 8:29 am
Location: Fremantle, Western Australia

Post by forbin »

I did post a reply on Saturday but didn't notice that the forum wasn't active and lost all the typing... :bang:

Anyway Take 2...

Firstly I am NOT that familiar with the circuit so take these suggestions as general advice....

You may be experiencing problems with overloading the "common mode input range" this is where the difference between the -ve and +ve input of the opamp exceed a specified voltage. Some opamps are worse than others and sometimes you can even get an extreme issues called Phase Reversal.

I had some strange problems with a build I did of Ian Fritz's Wavolver and I was testing it bit by bit as I was going. Some of the opamps on TL074 were at the rails and so it seemed to do strange things to some of the other opamps on the same package. BugBrands advice to limit all the signal levels within the design to say +-9V with +-12V power rails is a very wise one.

It is probably also worth introducing some hysteresis into the comparator circuit for some extra stability. I would recommend the free LTSPice tool to test the behavior of the design...

see: http://www.milton.arachsys.com/nj71/ind ... bsubmenu=2
User avatar
forbin
Common Wiggler
Posts: 133
Joined: Wed Aug 18, 2010 8:29 am
Location: Fremantle, Western Australia

Post by forbin »

Had a better look at lunchtime while eating my sandwich and whilst previous post was good information I think the crux of your problem might be that the IC4D is driving the CMOS switch (IC5A pin 13) with ~ -10V sometimes... The CMOS switch is operating from 0V -> 12V so isn't really going to like having -10V or so applied to it's control pin... You really need a diode in here at the very least! I suspect that the opamp is driving hard into protection diodes that clamp to supply rails on the CMOS switch... It would probably explain -ve behaving differently to the +ve...

No really sure why a switch is used here really as it seems to be used as a logic multiplexor...
User avatar
BugBrand
Knowledge of Bugs
Posts: 7884
Joined: Tue Jul 15, 2008 11:59 am

Post by BugBrand »

forbin wrote:It is probably also worth introducing some hysteresis into the comparator circuit for some extra stability. I would recommend the free LTSPice tool to test the behavior of the design...
Yes, could be worth tacking a 1M or so resistor between IC4D pins 12 & 14.


As I mentioned, yeah, bipolar control into 4066 doesn't look nice - but seems plenty have been built with that (and think the 4066 does have basic protection) -- easy to snip the trace and wire in a diode with resistor to ground - just to be sure..
User avatar
windspirit
Super Deluxe Wiggler
Posts: 3192
Joined: Thu Sep 20, 2012 11:43 pm
Location: krellifornia

Post by windspirit »

Actually I ended up reducing the voltage of the noise source on a build, then I tested it and I STILL was getting locking errors in anti-lock. I looked at the comparator output on my scope and noticed that there were very small spikes that crossed the logic threshold, so I soldered a 100k resistor between the comparator output and noise source input (pins 12 and 14 on the tl074) and it seems to have solves the problem. Now I just need to reduce the comparator threshold amplitude to make sure that everything is golden.
User avatar
windspirit
Super Deluxe Wiggler
Posts: 3192
Joined: Thu Sep 20, 2012 11:43 pm
Location: krellifornia

Post by windspirit »

For any of you who have this problem (anti-lock not working, aka prob knob full counter clockwise and pattern still changes over time) here is a picture of what I did. It worked on 3 separate turing machines that I had this problem with, some I had to adjust R6 to make sure that the prob knob's action was within desirable parameters (locking only on the sides and fluid increase of randomness towards the middle instead of all at once.) I's say start with R6 at the suggested 150k value and then adjust as necessary (I had to change it to 180k for the other Turing.)

Anyways this is a 100k resistor. Sorry for the ugly looking flux blobs, the flash makes it look much worse.

Image
User avatar
glennfin
Ultra Wiggler
Posts: 873
Joined: Sun Apr 19, 2015 1:19 pm
Location: Winston Salem, NC
Contact:

Post by glennfin »

Thank you for researching/testing this... I just finished building the "trio" and I'm finding some unexpected results... ... I'll be following this thread with great interest. :confused:
klangbauer
Common Wiggler
Posts: 83
Joined: Wed May 29, 2013 3:52 am
Location: Germany

Post by klangbauer »

Build two machines. Noise transistors produces very differnt output signal levels. At the moment the noise signal is around 1,5Vpp. Very less at the input of comperator. The working space of comperator is now very small to get random controll of 4016.
But locking at both ends it is very stabel and without any artefacts, scope shows a clean dc signal for locking level.
But no minus signal comes ot of comperator, it ends always at ground. I think it is because the 4016 diodes ...?
074 is going a little bit warm I think it is also because of 4016 and "working hard against" ....!
Stable locking is a question of noise signal versus threshold of pot.
Hysteresis tested but no effect.
Any suggestion?
What is a good noise singal level?
Next I remove 4016 and check output of comperator.
User avatar
windspirit
Super Deluxe Wiggler
Posts: 3192
Joined: Thu Sep 20, 2012 11:43 pm
Location: krellifornia

Post by windspirit »

Ideally either the noise will cover most of the range of the comparator (+/- 10V) or the range of the comparator will be changed to match the noise as bug was suggesting.
klangbauer
Common Wiggler
Posts: 83
Joined: Wed May 29, 2013 3:52 am
Location: Germany

Post by klangbauer »

I tested a zener BZX55/10 instead a transistor for noise. It produces constant output in all 4 machines. Then adjust noiselevel at max +-5V. Lowered poti out a little bit and get a good result at comperator out. Both lock ends are without artefact but not 100% stabel, still fluktuations. But this makes no effect for use of Turing and the death zone is a little bit more alive and changes over longer periods can be produced.
Also built a diode/resistor between comperator out an 4016. Comperator out is now unchanged and TL 074 din´t warm up as before.
At the moment I´am happy with the result.

www.klangbaukoeln.de
Last edited by klangbauer on Fri Jul 31, 2015 3:27 am, edited 1 time in total.
User avatar
windspirit
Super Deluxe Wiggler
Posts: 3192
Joined: Thu Sep 20, 2012 11:43 pm
Location: krellifornia

Post by windspirit »

Good job man! If you feel like posting instructions for others who have problems with the randomness circuit please enlighten us!
User avatar
mats_j
Common Wiggler
Posts: 122
Joined: Fri Feb 08, 2013 12:08 pm
Location: Stockholm, Sweden

Post by mats_j »

I built two of these, and both of them have the faulty locking syndrome on one side.

So from what I gather in this thread there is no certain remedy for this, and the case is that some work and some don't?
klangbauer
Common Wiggler
Posts: 83
Joined: Wed May 29, 2013 3:52 am
Location: Germany

Post by klangbauer »

... what side your are talking?
Anyway, lower R33 to 220k and see what happens...noise source reduced...
do so till your locking nobs locks on both sides; and read this thread again and again, it is worth.
User avatar
windspirit
Super Deluxe Wiggler
Posts: 3192
Joined: Thu Sep 20, 2012 11:43 pm
Location: krellifornia

Post by windspirit »

I've used the remedy that I posted a picture of twice now with success. If you solder the resistor in place and try it out and it doesnt fix your problem it should be pretty easy to cut it off.
klangbauer
Common Wiggler
Posts: 83
Joined: Wed May 29, 2013 3:52 am
Location: Germany

Post by klangbauer »

I draw all ideas form this thread in schematic V2.5 from Tom Whitwell.
Attachments
rand_seq_Edits8-2015.jpg
rand_seq_Edits8-2015.jpg (196.93 KiB) Viewed 895 times
midirobot
Common Wiggler
Posts: 155
Joined: Sun Nov 30, 2014 3:09 am

turing

Post by midirobot »

hello,

what an helpful thread!!
was running same problems as windspirit,
replacing r33 by a 220k resistor did the job.

thank to you guys=)
User avatar
windspirit
Super Deluxe Wiggler
Posts: 3192
Joined: Thu Sep 20, 2012 11:43 pm
Location: krellifornia

Post by windspirit »

thanks for sharing your success :). These days when I fix a turing the locking issues all require a different soLution. I chock it up to minor differences in the chips/ transistors being used. Recently I had a big order of Bytes expanders + upgrades: 5 turings, 5 different locking issues, 5 different solutions. Im excited to think that the new turing has fixed a lot of these bugs :)
DSC
Super Deluxe Wiggler
Posts: 2295
Joined: Thu Apr 11, 2013 11:54 pm

Post by DSC »

Is your Bytes expander compatible with the new turing?
Last edited by Flatscan on Tue Jan 05, 2021 3:46 am, edited 1 time in total.
Reason: undoing the damage
Post Reply

Return to “Music Tech DIY”