CD4006 based simplest digital noise source

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

Moderators: Joe., lisa, luketeaford, Kent

User avatar
snaper
Ultra Wiggler
Posts: 975
Joined: Mon Feb 10, 2014 12:29 am
Location: Magyarország

CD4006 based simplest digital noise source

Post by snaper » Wed Jul 22, 2015 4:54 am

Hi Guys,

I have two of these.
Im 100% sure, that I won't build that 266 clone, so I was just wondering that is there a simple (easy to stripboard) digital noise source schemo based on this IC?

User avatar
Zentek
Common Wiggler
Posts: 210
Joined: Tue Jun 16, 2015 5:15 pm
Location: Belgium
Contact:

Re: CD4006 based simplest digital noise source

Post by Zentek » Wed Jul 22, 2015 5:03 am

snaper wrote:Hi Guys,

I have two of these.
Im 100% sure, that I won't build that 266 clone, so I was just wondering that is there a simple (easy to stripboard) digital noise source schemo based on this IC?
If you can't get a ready made schematic, here is a link about the theory:
Linear feedback shift registers

User avatar
Altitude909
Super Deluxe Wiggler
Posts: 3361
Joined: Wed Aug 24, 2011 5:13 pm
Location: Meesheegan

Post by Altitude909 » Wed Jul 22, 2015 6:10 am

use the one out of the 909, it's 14 parts and works great. I build this on as a separate noise source for my 9090 to get rid of the phasing between the clap and snare

Image
Image
Image
Last edited by Altitude909 on Wed Jul 22, 2015 6:24 am, edited 3 times in total.

User avatar
snaper
Ultra Wiggler
Posts: 975
Joined: Mon Feb 10, 2014 12:29 am
Location: Magyarország

Post by snaper » Wed Jul 22, 2015 6:15 am

I saw this, nice one, thank you!
Was thinking about the original CGS31, without the internal oscillator and the white/pink outs...

User avatar
dot matrix madness
Wiggling with Experience
Posts: 406
Joined: Fri Aug 23, 2013 2:48 am
Location: Germany

Post by dot matrix madness » Wed Jul 22, 2015 6:35 am

Here is an even simpler solution using only one 4006 that was part of the Formant extensions. Note that the both the 4006 and the 4030 are powered from the negative rail at around -6.8 Volts.

Image

User avatar
J3RK
Super Deluxe Wiggler
Posts: 6563
Joined: Tue Dec 22, 2009 12:46 pm
Location: Seattle

Post by J3RK » Wed Jul 22, 2015 10:02 am

snaper wrote:I saw this, nice one, thank you!
Was thinking about the original CGS31, without the internal oscillator and the white/pink outs...
I have one that is basically this. (with a new input/output buffer stage) I can post it later today if you like.
Are you lemon? Does your head come to a nub?

User avatar
Graham Hinton
Super Deluxe Wiggler
Posts: 3158
Joined: Fri Jul 02, 2010 6:28 pm
Location: England
Contact:

Post by Graham Hinton » Wed Jul 22, 2015 10:37 am

dot matrix madness wrote:Here is an even simpler solution using only one 4006 that was part of the Formant extensions.
18 bits is too short. This can only give a maximum length sequence of (2^18) - 1, which when divided by the clock period gives the cycle repetition time and in this case will be in the order of seconds. This was the main problem with the National Semiconductor MN5837 Noise generator (used in Prophet 5) and which has given digital noise bad press: they can be heard "breathing".

CD4006s are obsolete and there is nothing special about them. You can use any digital shift registers and make whatever length you want. My first one was 32 bits long in TTL (before CMOS was invented) and took 11 hours to cycle, but now I just do it in software inside the smallest and cheapest PIC for about 50 pence. Hardware registers always have to have more circuitry to ensure that they do not turn on with all zeros in the register, which isn't a problem in software.

User avatar
J3RK
Super Deluxe Wiggler
Posts: 6563
Joined: Tue Dec 22, 2009 12:46 pm
Location: Seattle

Post by J3RK » Wed Jul 22, 2015 11:46 am

I partially disagree. It depends entirely on what you're looking for. I mean, if you really want fully random analog noise, then this isn't the greatest approach in the first place. A real white (or filtered) noise source would be better. If you want pseudorandom, pitched/clocked noise, a bit of a pattern can actually sound good in some contexts. (even down to 4 and 8 bit levels if you're into the Atari thing...) I find that the 18 bits the 4006 provides is more than adequate with a bit of XOR routing (ala Ken Stone, Thomas Henry, etc.) for a good pitched noise source. (great for percussion, sweeps, old game sounds, chip-tunes, etc.)

I do agree that using obsolete chips isn't the best practice, but the CD4006 is still easily obtained and for very little money. I've since switched to other CMOS shift registers for most things, but still use the 4006 on occasion. I keep 50 or so on hand at a given moment.

I'm not discouraging the use of other ICs in favor of the 4006, but it's still fairly viable at this point.

I'll agree that a cheap MCU, or better yet a small CPLD is a great idea provided the builder has the necessary prerequisite programming skills and hardware.

My CGS/TH inspired 4006 based circuit uses a 4006, 4070, an op amp, a couple of NPNs, and a few passives. Pretty simple with great results.
Last edited by J3RK on Wed Jul 22, 2015 9:50 pm, edited 1 time in total.
Are you lemon? Does your head come to a nub?

User avatar
Altitude909
Super Deluxe Wiggler
Posts: 3361
Joined: Wed Aug 24, 2011 5:13 pm
Location: Meesheegan

Post by Altitude909 » Wed Jul 22, 2015 12:03 pm

i think the point of the OP was the fact that he had 2x 4006s on hand

User avatar
snaper
Ultra Wiggler
Posts: 975
Joined: Mon Feb 10, 2014 12:29 am
Location: Magyarország

Post by snaper » Wed Jul 22, 2015 3:43 pm

J3RK wrote:
snaper wrote:I saw this, nice one, thank you!
Was thinking about the original CGS31, without the internal oscillator and the white/pink outs...
I have one that is basically this. (with a new input/output buffer stage) I can post it later today if you like.
Like;)

User avatar
snaper
Ultra Wiggler
Posts: 975
Joined: Mon Feb 10, 2014 12:29 am
Location: Magyarország

Post by snaper » Wed Jul 22, 2015 3:46 pm

Altitude909 wrote:i think the point of the OP was the fact that he had 2x 4006s on hand
Yapp.

User avatar
J3RK
Super Deluxe Wiggler
Posts: 6563
Joined: Tue Dec 22, 2009 12:46 pm
Location: Seattle

Post by J3RK » Wed Jul 22, 2015 3:59 pm

snaper wrote:
J3RK wrote:
snaper wrote:I saw this, nice one, thank you!
Was thinking about the original CGS31, without the internal oscillator and the white/pink outs...
I have one that is basically this. (with a new input/output buffer stage) I can post it later today if you like.
Like;)
Cool, I'll be home from work in a couple of hours, so I'll toss it up then. :party:
Are you lemon? Does your head come to a nub?

User avatar
J3RK
Super Deluxe Wiggler
Posts: 6563
Joined: Tue Dec 22, 2009 12:46 pm
Location: Seattle

Post by J3RK » Wed Jul 22, 2015 7:41 pm

This does the trick for me where the CD4006 is concerned. I actually had a version that used 2 NPNs for the input comparator, but I think I went back to the op amp based one because it took up less space since I already needed a DIP-8 on the board for the output op amp anyway.

You'll notice there's an extra XOR gate not in use. You could actually route/mix more data (maybe using the unused D4+4 output pin too on the 4006) then use a switch to swap it in an out. If you have a simulator handy you can see how it alters the output.

http://home.comcast.net/~r3cogniz3r/Str ... seLite.pdf

Here's something different, but might give you some ideas:

http://home.comcast.net/~r3cogniz3r/S&S-LFSR.pdf


:party:
Are you lemon? Does your head come to a nub?

User avatar
snaper
Ultra Wiggler
Posts: 975
Joined: Mon Feb 10, 2014 12:29 am
Location: Magyarország

Post by snaper » Thu Jul 23, 2015 4:35 am

J3RK wrote:This does the trick for me where the CD4006 is concerned. I actually had a version that used 2 NPNs for the input comparator, but I think I went back to the op amp based one because it took up less space since I already needed a DIP-8 on the board for the output op amp anyway.

You'll notice there's an extra XOR gate not in use. You could actually route/mix more data (maybe using the unused D4+4 output pin too on the 4006) then use a switch to swap it in an out. If you have a simulator handy you can see how it alters the output.

http://home.comcast.net/~r3cogniz3r/Str ... seLite.pdf

Here's something different, but might give you some ideas:

http://home.comcast.net/~r3cogniz3r/S&S-LFSR.pdf


:party:
THANKS!

User avatar
fluxmonkey
Super Deluxe Wiggler
Posts: 1827
Joined: Sat Oct 18, 2008 10:05 pm
Contact:

Post by fluxmonkey » Thu Jul 23, 2015 7:17 am

J3RK wrote:I do agree that using obsolete chips isn't the best practice, but the CD4006 is still easily obtained and for very little money. I've since switched to other CMOS shift registers for most things, but still use the 4006 on occasion. I keep 50 or so on hand at a given moment.

I'm not discouraging the use of other ICs in favor of the 4006, but it's still fairly viable at this point.
i'm still have as stash, so from a practical pov (and for the op's need) i agree. but is there anything about the 4006 designs that make them BETTER than other shift registers that are still in production? i'd be interested in seeing designs using current chips, but most everthing i've seen uses the 4006.
www.fluxmonkey.com

BUILDER FOR HIRE - kits or custom, email me with your needs

User avatar
J3RK
Super Deluxe Wiggler
Posts: 6563
Joined: Tue Dec 22, 2009 12:46 pm
Location: Seattle

Post by J3RK » Thu Jul 23, 2015 10:00 am

fluxmonkey wrote:
J3RK wrote:I do agree that using obsolete chips isn't the best practice, but the CD4006 is still easily obtained and for very little money. I've since switched to other CMOS shift registers for most things, but still use the 4006 on occasion. I keep 50 or so on hand at a given moment.

I'm not discouraging the use of other ICs in favor of the 4006, but it's still fairly viable at this point.
i'm still have as stash, so from a practical pov (and for the op's need) i agree. but is there anything about the 4006 designs that make them BETTER than other shift registers that are still in production? i'd be interested in seeing designs using current chips, but most everthing i've seen uses the 4006.
I think it comes down to it being 18 bit, fairly easy to use, and fairly simple to get a long enough pattern for it to seem like random noise. (for the cases where that's desirable like white noise generator replacement) I use the CD4094 quite a bit, and it's great, but it's 8 bit, so definitely not as long. They can be chained, but... There are others that are longer, but I'm not sure if they're as easy to work with.

There's also probably something to be said for the fact that the 4006 was used in the 909, and there are plenty of schematics around using it.

For me, I just happened to adapt Ken's circuit, which is an adaption of a Thomas Henry circuit if I remember what Ken told me correctly. I liked it, it sounded good, so I bought a bunch of them. It was pretty spot on for the sound I was looking for (C64ish noise). It wasn't until later that I noticed them in use in the Hexinverter X0X recreations.

It's a cool chip. Not sure why they ditched it. Probably because the only people using it were synth-DIYers. :lol:

While on the subject, I really enjoy the outputs of the 4094. One for each stage and then a serial and inverted serial output. It's pretty flexible having one pin per output. I'm working on something now where I'm running the individual outs to a DAC for voltages, and running the serial output to a differential amplifier for audio purposes. It's also fun to multiply those outputs, and feed them back for Atari 2600 sounds. :cloud:
Are you lemon? Does your head come to a nub?

slow_riot
Super Deluxe Wiggler
Posts: 4002
Joined: Tue Jun 30, 2009 8:58 pm
Location: uk

Post by slow_riot » Thu Jul 23, 2015 10:12 am

For straight up white or pink noise a PRSG done with a PIC can't be beaten.

Where older techniques are more valid IMO is where fluidity between analogue and digital domains is required, for example like the NoiseRing. I'm looking into this area myself at the moment, and though it seems like programmable ICs are the most useable solution for many purposes, once you reach levels of abstraction where your data is occurring in a hypothetical process, it does restrict interactions between the 2 domains somewhat.

Anyone want to buy a pile of CD4018s?

User avatar
J3RK
Super Deluxe Wiggler
Posts: 6563
Joined: Tue Dec 22, 2009 12:46 pm
Location: Seattle

Post by J3RK » Thu Jul 23, 2015 10:30 am

I'm curious on opinions (for audio purposes) what people think is an acceptable time before a pattern repeat. In Thomas Henry's book, and Graham's post above, they're measuring in hours. I would think by the time a few minutes pass, (maybe less even) one wouldn't be able to tell at all that the pattern has repeated.

I could see this being more important where some other data is derived from this, but for audio function I don't see who could possibly remember what noise sounds like from a minute or two prior.

When it gets down to the 4 and maybe 8 bit range, obviously a cyclical pattern emerges, especially at higher clocks/pitches.

For example, I find the 4006 based circuit I posted above to be more than adequate, and I'm guessing it's quite a bit shorter than the one(s) in the Thomas Henry Noise book. For a little perspective, I actually like the "breathing" effect in some cases. I also like the short 4(ish)-bit patterns I get out of the second circuit I posted above. Very "Combat on 2600". I can see why some people might not like that though. :hihi:
Are you lemon? Does your head come to a nub?

slow_riot
Super Deluxe Wiggler
Posts: 4002
Joined: Tue Jun 30, 2009 8:58 pm
Location: uk

Post by slow_riot » Thu Jul 23, 2015 10:41 am

I think perceivable "breathing" is the tip of the iceberg. When dealing with audible perception I think the quantum domain is relevant. A reverse biased semiconductor junction is a window straight into cosmic uncertainty on a molecular level. It is possible to perceive this, and I think that sets the bench mark under which other solutions must be judged.

But of course that comes with it's own set of problems that PSRGs can solve in some applications. My issue with a transistor noise source is the lack of control, but as far as I am aware there are not too many other ways to achieve truely *novel* states.

The Livewire Chaos Computer is interesting in that it uses 2 registers intertwined giving pattern repeats, but even then there is still a finite number of solutions.

User avatar
snaper
Ultra Wiggler
Posts: 975
Joined: Mon Feb 10, 2014 12:29 am
Location: Magyarország

Post by snaper » Tue Aug 18, 2015 12:33 am

J3RK wrote:This does the trick for me where the CD4006 is concerned. I actually had a version that used 2 NPNs for the input comparator, but I think I went back to the op amp based one because it took up less space since I already needed a DIP-8 on the board for the output op amp anyway.

You'll notice there's an extra XOR gate not in use. You could actually route/mix more data (maybe using the unused D4+4 output pin too on the 4006) then use a switch to swap it in an out. If you have a simulator handy you can see how it alters the output.

http://home.comcast.net/~r3cogniz3r/Str ... seLite.pdf

Here's something different, but might give you some ideas:

http://home.comcast.net/~r3cogniz3r/S&S-LFSR.pdf


:party:
Thanks for these.
Could somebody tell me how does it work?
There is a clock, OK, but where the bits came from?
Why do you need XORs?

User avatar
fitzgreyve
Wiggling with Experience
Posts: 496
Joined: Mon Jul 15, 2013 4:49 am
Location: UK

Post by fitzgreyve » Tue Aug 18, 2015 5:00 am

snaper wrote: Could somebody tell me how does it work?
There is a clock, OK, but where the bits came from?
Why do you need XORs?
on the 4006 in the schematic above , the clock goes in at pin 3 - the easy part.

The "bits" are shifted in at pin 6 (also going to the op-amp to become the noise output.

the state at the pin 6 input is determined by the states of various stages of the shift register (pins 13,5,4) via the XOR gates and the transistor (TUN) inverter - it's this logic function acting on the values already in the shift register that in essence generates the "randomness".

User avatar
Graham Hinton
Super Deluxe Wiggler
Posts: 3158
Joined: Fri Jul 02, 2010 6:28 pm
Location: England
Contact:

Post by Graham Hinton » Tue Aug 18, 2015 8:38 pm

J3RK wrote:I'm curious on opinions (for audio purposes) what people think is an acceptable time before a pattern repeat. In Thomas Henry's book, and Graham's post above, they're measuring in hours. I would think by the time a few minutes pass, (maybe less even) one wouldn't be able to tell at all that the pattern has repeated.
The raw digital noise is often filtered to give pink and other LF heavy versions and these will show up a repeating pattern. So will a S&H as a stroboscopic effect.

For any given length, initial state and feedback there will be many patterns that start with a preamble and then enter a repeating pattern. There will be only one "maximal length" sequence that goes through all 2^n - 1 states apart from all zeroes. Once all the register is zeroes it stops generating a pattern, that is why hardware PRGs have a power up circuit to inject some 1s in the register.

fluxmonkey wrote:i'm still have as stash, so from a practical pov (and for the op's need) i agree. but is there anything about the 4006 designs that make them BETTER than other shift registers that are still in production? i'd be interested in seeing designs using current chips, but most everthing i've seen uses the 4006.
The 4006 has the length and access to various bits along it. Most longer registers only have access to limited bits along the length, often regular and even steps. I often use the third and the last bit to obtain maximum pattern length.

User avatar
Jazzmarazz
Common Wiggler
Posts: 146
Joined: Wed Dec 04, 2013 12:39 am
Location: Traverse City, MI

Post by Jazzmarazz » Tue Aug 18, 2015 9:47 pm

Graham Hinton wrote:
dot matrix madness wrote:Here is an even simpler solution using only one 4006 that was part of the Formant extensions.
18 bits is too short. This can only give a maximum length sequence of (2^18) - 1, which when divided by the clock period gives the cycle repetition time and in this case will be in the order of seconds. This was the main problem with the National Semiconductor MN5837 Noise generator (used in Prophet 5) and which has given digital noise bad press: they can be heard "breathing".
That is an excellent point and put so nicely to boot. I have an IC design in mind that utilizes an LFSR with set/resetable seeds and polynomial. I had 16-bits in mind though. I suppose my two options are to either 1. have a dynamic or automatically changing seed/polynomial or 2. to increase the number of bits.

Although, the idea of "breathing" adds a sort of ambiance that I could appreciate.

CD4006s are obsolete and there is nothing special about them. You can use any digital shift registers and make whatever length you want. My first one was 32 bits long in TTL (before CMOS was invented) and took 11 hours to cycle, but now I just do it in software inside the smallest and cheapest PIC for about 50 pence. Hardware registers always have to have more circuitry to ensure that they do not turn on with all zeros in the register, which isn't a problem in software.
I also like the idea of a PIC implementation. If you're using SR flip flops with preset and clear, then assigning each flip flop with a defined Q is pretty simple. Then again, the PIC would still be easier yet. :P

periodic_pierre
Learning to Wiggle
Posts: 16
Joined: Thu Dec 12, 2019 8:43 am
Location: Ecosse

Re: CD4006 based simplest digital noise source

Post by periodic_pierre » Mon Jan 06, 2020 6:48 pm

First of all. Cool thread! I resurrect thee...

Second of all can someone give me some feedback on my interpretation of the 909 noise schematic?

Image

My interpretation is as follows:

It looks like everything left of D48 is the powerup seed section. XOR gate "d" will be high at its output until C46 is full then it will be low for the rest of operations. This will seed the linear feedback shift register with a string of 1s to get things going.

XOR gates b and a are obviously a clock (I wonder what speed this runs at). Has anyone tried messing with this for nice effects?

The 4006 pair then just deterministically shift round a pseudo-random looping pattern right?

nigel
Veteran Wiggler
Posts: 665
Joined: Wed Jan 16, 2013 6:49 am
Location: Melbourne, Australia

Re: CD4006 based simplest digital noise source

Post by nigel » Mon Jan 06, 2020 9:42 pm

periodic_pierre wrote:
Mon Jan 06, 2020 6:48 pm
It looks like everything left of D48 is the powerup seed section. XOR gate "d" will be high at its output until C46 is full then it will be low for the rest of operations. This will seed the linear feedback shift register with a string of 1s to get things going.

XOR gates b and a are obviously a clock (I wonder what speed this runs at). Has anyone tried messing with this for nice effects?

The 4006 pair then just deterministically shift round a pseudo-random looping pattern right?
Yes, as far as I can tell that's exactly right.
I've definitely seen shift register noise circuits that change the clock speed to get different effects. Thomas Henry has a clock speed control on the noise output of his SN76477-based SN-Voice, for example.

Post Reply

Return to “Music Tech DIY”