electro-music.com   Dedicated to experimental electro-acoustic
and electronic music
 
    Front Page  |  Radio
 |  Media  |  Forum  |  Wiki  |  Links
Forum with support of Syndicator RSS
 FAQFAQ   CalendarCalendar   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   LinksLinks
 RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in  Chat RoomChat Room 
 Forum index » DIY Hardware and Software
8bit random generator
Post new topic   Reply to topic Moderators: jksuperstar, Scott Stites, Uncle Krunkus
Page 1 of 1 [5 Posts]
View unread posts
View new posts in the last week
Mark the topic unread :: View previous topic :: View next topic
Author Message
PHOBoS



Joined: Jan 14, 2010
Posts: 5591
Location: Moon Base
Audio files: 705

PostPosted: Wed Nov 05, 2014 12:54 pm    Post subject: 8bit random generator
Subject description: Noise source + ADC
Reply with quote  Mark this post and the followings unread

I was wondering about how to achieve several random bits from a noise source. My initial thought was to create
a couple of bandpass filters followed by comparators, but then I wondered what would happen if you add the noise
to an ADC. So I did a quick test and that seemed to work quite nice as a random bit generator Very Happy.

So here's the full circuit consisting of 3 parts: a noise source, the ADC and a sync generator.
The noise source is pretty standard however I noticed that it was quite sensitive to noise on the powerline which
the ADC was producing so I used a transistor and a zenerdiode to create a 10V voltage stabilizer. The 2SC2682 is
something I had laying around but you could use something else, it doesn't have to produce a lot of current
so a standard NPN should do.
U1a and U1b amplify the noise signal and U1c acts as a buffer. U1d is a comparator to create a random CLK source.

The ADC has a schmitt trigger inverter between pins 4 and 19 which can be used to create an internal oscillator.
There is a switch for 2 speeds (LFO, audio) and a switch to select an external oscillator (might be fun with a VCO).
The ADC works on 5V which means the output levels won't be high enough for other circuits that I power with 12V.
So I used an ULN2803 (darlington array) as level shifters. Downside is that it inverts (which is why the LEDs are
connected between the outputs of the ADC and +5V) but for a random generator it doesn't matter.

Because the ADC takes 72 CLK cycles for every conversion you can't just use the CLK to sync it to something else.
So it first get's divided by 9 (U4a) and then divided again (U4b) which creates 4 outputs that are in sync with the outputs.
Well the tempo is the same, it only gets in sync after bit 0 of the ADC turns from low to high.


8bit Random generator (ADC Noise).gif
 Description:
 Filesize:  96.33 KB
 Viewed:  600 Time(s)
This image has been reduced to fit the page. Click on it to enlarge.

8bit Random generator (ADC Noise).gif



_________________
"My perf, it's full of holes!"
http://phobos.000space.com/
SoundCloud BandCamp MixCloud Stickney Synthyards Captain Collider Twitch YouTube
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
PHOBoS



Joined: Jan 14, 2010
Posts: 5591
Location: Moon Base
Audio files: 705

PostPosted: Thu Apr 23, 2015 1:39 pm    Post subject: Reply with quote  Mark this post and the followings unread

Finished this one Cool
(only needed the knobs and a 1/8" socket)


ADC noise - 03.jpg
 Description:
 Filesize:  96.73 KB
 Viewed:  246 Time(s)
This image has been reduced to fit the page. Click on it to enlarge.

ADC noise - 03.jpg



ADC noise - 04.jpg
 Description:
 Filesize:  78.45 KB
 Viewed:  300 Time(s)
This image has been reduced to fit the page. Click on it to enlarge.

ADC noise - 04.jpg



ADC noise - 05.jpg
 Description:
 Filesize:  78.45 KB
 Viewed:  223 Time(s)
This image has been reduced to fit the page. Click on it to enlarge.

ADC noise - 05.jpg



ADC noise - 06.jpg
 Description:
 Filesize:  86.17 KB
 Viewed:  217 Time(s)
This image has been reduced to fit the page. Click on it to enlarge.

ADC noise - 06.jpg



_________________
"My perf, it's full of holes!"
http://phobos.000space.com/
SoundCloud BandCamp MixCloud Stickney Synthyards Captain Collider Twitch YouTube
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
J3RK



Joined: Jun 05, 2006
Posts: 123
Location: Seattle

PostPosted: Fri Apr 24, 2015 9:13 am    Post subject: Reply with quote  Mark this post and the followings unread

Very nice! I just did something similar, but in reverse. Noise>Comparator>LFSR>R/2R to get CVs out of noise. (kinda NoiseRingish)

Cool
Back to top
View user's profile Send private message
cbfishes



Joined: Mar 01, 2015
Posts: 24
Location: Alto, Michigan

PostPosted: Fri Apr 24, 2015 12:16 pm    Post subject: Reply with quote  Mark this post and the followings unread

This looks awesome! I don't think I understand the ADC/8bit part, but I think I mostly get the noise creation and random clock. That's cool!

Any audio? Would love to hear what this sounds like

_________________
making stuff that makes sounds is awesome!



Music/fishing/adventures blog CB Fishes



music.chrisbeckstrom.com

Back to top
View user's profile Send private message Visit poster's website
PHOBoS



Joined: Jan 14, 2010
Posts: 5591
Location: Moon Base
Audio files: 705

PostPosted: Sun May 10, 2015 7:48 am    Post subject: Reply with quote  Mark this post and the followings unread

thanks Very Happy

cbfishes wrote:
This looks awesome! I don't think I understand the ADC/8bit part, but I think I mostly get the noise creation and random clock. That's cool!

Any audio? Would love to hear what this sounds like

The ADC converts the noise generator (which is just a random voltage) into 8 bits. 0V results in 00000000,
5V in 11111111 (actually it's inverted) and of course you get every binary value in between. Because the
voltage is random the bits are random too. I could also connect an external voltage to it instead of the noise generator.

It's not a Flash ADC so it doesn't happen instantly but all the bits change when the CLK goes high,
so I can change the speeds of when the bits change. So it's like a S&H except that the output isn't
a voltage but an 8 bit binary value.

It doesn't really produce any audio, well I could turn the speed up which would result in 8 bits of digital noise.
But it's just a way to create 8 random bits which can be used to control something else.

_________________
"My perf, it's full of holes!"
http://phobos.000space.com/
SoundCloud BandCamp MixCloud Stickney Synthyards Captain Collider Twitch YouTube
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic Moderators: jksuperstar, Scott Stites, Uncle Krunkus
Page 1 of 1 [5 Posts]
View unread posts
View new posts in the last week
Mark the topic unread :: View previous topic :: View next topic
 Forum index » DIY Hardware and Software
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Forum with support of Syndicator RSS
Powered by phpBB © 2001, 2005 phpBB Group
Copyright © 2003 through 2009 by electro-music.com - Conditions Of Use