Thursday, June 11, 2015

LDRs and how to use them in a few easy-but-effective bends

LDR's(Light Dependant Resistors), aka Photoresistors, Light Resistors, Photo Dependant Resistors, Photocell, CdS (Cadmium Sulfide), CdS Cells, Photoconductors, etc are really common in circuit bending.
top down view of LDR and various schematic symbols for LDR


Ive personally noticed that they are exceptionally common in 'circuit bent' devices/instruments offered for sale on various sites, particularly esuckBay.  I believe this is because to the uneducated/initiated, adding 'optical theremin' or 'optical trigger' or 'magic eye' etc to the description makes whatever they are selling appear more impresive.  Normally its simply someone replacing a potentiometer or fixed resistor with a LDR.  With drilling and mounting, its probably something that took them all of 2 minutes to add.  Not particularly impressive if you know what they've really done...but if you know, then you probably arent buying their INCREDIBLY overpriced junk anyway.  I mean, 800$..EIGHT HUNDRED..for an old Alesis Hr-16 they've stuck some RCA jacks connected to the sound ROM & added a pitch bend via bodgy clock oscillator?  crazy.  And it screws everyone else cause now your average retard selling his hr-16 looks at what a search for 'hr-16' on eBay returns and thinks his old drum machine is worth hundreds of dollars! This screws us all because then that guy puts a 300$ reserve on his HR when he sells it and so forth..basically skyrocketing the price of the machines on the used market. Bogus.  Apologies for the digression.

Anyways, we'll cover a few ways to add them to devices/instruments you are contructing as part of the 'easy bits' that I'm demonstrating on the blog.  The idea being if you have enough little tricky bits you can add to a instrument you constructing or bending, you can essentially make a total instrument..mixing and matching different ones for differing outcomes.
A FEW THINGS TO KEEP IN MIND IN RE LDR'S:
-Luckily- CDs and most of the other less common formulations of LDRs operate primarily in response to similar wavelength spectrum as the human eye can discern. In other words, they respond to the same kind of light we can see. So lights we see or see as brighter/darker-they will respond to in response. (lighter-less resistance; darker-more resistance)

-They're cheap: the standard CDs cells (unless they are limited in your country by environmental regulation) can cost as little as .01 USD (a penny), and generally average about .15 USD (fifteen cents)

-They DO respond to temperature: so the amount of resistance varied by the LDR in circuit can vary pretty heavily depending upon temperature variance. So, if youre using an instrument that employs one in a recording situation, you might want to keep the Air Conditioning in mind.

-They have LAG aka Latency: meaning it can take up to 1 second (a lot of time in some situations, less in others) for them to respond to changes in light impacting the cadmium sulfide ribbon.  Most LDRs average quite a bit less, to the point of being difficult to easily discern primarily, but a few can take longer. 

Just keep those things in mind when making the decision to add one to an instrument or circuit you are working on.

1. Replacing existing potentiometer or fixed resistor with LDR:
a) normally LDRs have 2 leads: they are NOT polarized (neither is positive, and doesnt matter which you use in any given situation), so, to replace a fixed resistor in any given circuit or device etc then all you have to do is simply remove the resistor and
various sizes and values of LDR

 put the two leads for the LDR in the places where the resistor's leads formerly were. simple.

b) when replacing a potentiometer, its a bit more complicated as the potentiometer has 3 potential connections (lugs, leads, etc).  However, it is also a variable resistance passive component-just like the LDR-so its not TOO complicated.  Simply determine which of the 3 connections on the potentiometer/trimmer/variable resistor is the 'wiper' (usually the middle connection).  One of the LDR leads will replace this. Then, determine which of the other leads replacement will result in the performance variance you desire via experimentation or investigation of circuit/schematic.  (this means, if you want the LDR to affect the resistance between the wiper and ground, then replace the lead leading to ground and the wiper, if the other connection ..etc)
typical application of LDR replacing potentiometer

c) Easy applications: often in circuit bending cheap toys or instruments, resistors will be used for clocks and you can replace them with the LDR via method A. This means that the amount of light striking the LDR will then determine the pitch alteration of the bent device.

2.Using as a control interface with musician/artist/device user.  This is where you will most commonly see LDRs in circuit bent devices and things like guitar pedals on Ebay.  What happens (im thinking), probably, is that some guy thinks "Well, Ive barely done anything to this toy that I bought for 3$ and I want to charge 700$ for it, but I've already stuck a cheap RCA panel on it (aka 'modular patch bay')...I know what I'll do..I'll stick a LDR in somewhere and put 'Optical control, Light Control, and/or Theremin' in the Ebay description field on the listing!!".  There are lots of options here, most of the bogus ones you'll easily see on those cheap bent Ebay things and guitar pedals are similar to the illustration above left, but you can also :

- use other means to inhibit or project light onto the LDR:  I've seen and done things  like stuck salvaged computer cooling fans in between the light and the LDR, thus creating a "wobbly" or "tremelo" effect .  There are lots of other ideas I'm not going to bother mentioning here, but really let your creativity loose, you know?
-use things like timers, pulses, and oscillators to control the light's emission: you can do things like the below right illustrated circuit which employs a lm1458 to create a repeating fading LED light so that when it hits the LDR there is a drawn-out response creating a 'sustain',  or 'tail' effect. I've also combined this with the fan idea and created a 'sorta-reverb' effect on the synth VCO I was controlling.
THAT'S ALL FOR NOW, I've gotta run but we'll return to LDRs later.



image from GetLofi's 'get your fade on' article, link below

http://getlofi.com/get-your-fade-on/

Friday, May 29, 2015

ICS You Should Know : LM324 Quad Op Amp (chip with 4 operation amplifiers in 1 package)

lm324 pinout-note Vcc (current IN) and Vee (Ground)
The LM324 is a incredibly useful chip, perhaps more useful than any others except the venerable 555 timer, 386 amp, etc. 
That it's still being made today after more than 30 years of production is all the proof needed of its usefulness.
I'm NOT going to describe what uses an Op-Amp can be put to in and of itself, because I'll cover that in another IC weekly on something like the 386 or 741.
In this case the real importance and usefulness of the 324 comes from the fact that it has FOUR (4) Op-Amps in one package.

This also makes it easy to memorize the Pinout (which is the same in the SMD and the Through-Hole versions).  The 324 has 14 pins, 7 on each side.  This may sound complicated but all you really need to remember is the middle and outside pins.  For the middle, simply remember the Vcc (current IN, +) is the 4th pin and that Vee (Ground, - ) is the 11th pin.  For the outside, simply remember that EVERY CORNER is an OUT for the amps.  Everything else is an input.  This means all you have to really remember is 3 pins: Vcc, Ground, and Out (4 corners).  Simple.

Since the 324 has been in production as long as it has, its VERY very cheap. There are knock-offs, NOS (new old stock), vintage, overstock, copies made in China, Russia, Phillipines, etc as well as inexpensive new TI (Texas Instruments) ones.  You can find good ones for as little as 10 Cents a piece (.10 USD).  Can't beat that, can you?

I use it most often for LED audio meters (LEDs light in response to loudness of sound) where some of the OpAmps are used as comparators, some to boost/amplify the signal; Lo-Pass Filter modules that I often add to guitar synth pedals, synths, and other audio circuits, and simple mixer circuits.

The thing to keep in mind is that ANYTHING that employs any opamp like the 386 or 741 can also be used with the 324 -and then combined with another circuit employing the remaining opamps in the 324 (since the 386 and 741 both have fewer opamps in their packages)

Below is an example of a filter schematic I've used employing the 324 which requires 4 opamps:
multiple mode filter with multiple outs and pots to sweep frequencies with


Thursday, May 28, 2015

How to Circuit Bend/Modify a Cheap Sampler :

modifying or bending an inexpensive "30 second greeting card sampler" adding Pitch, CV, Looping, Triggering, Input, and Output.

I noticed recently when searching for something else that a site had '30 second greeting card sampler'(s) for less than two (2) $USD!!
And IMMEDIATELY I started thinking: "There has to be a way to use that to make noise (aka music)".  So I 'offered' even less for a larger number.  I think I bought 4, although I'm not exactly sure because I ended up buying some more later once I messed up a couple of the original ones.   These Greeting Card Samplers or Greeting Card Voice or Message Recorders are available all the places you'd think they are like Amazon and Monopo-Bay as well as numerous marketing and advertising sites who sell them along with things you can put your business' name on to promote it.  They are priced in a fairly large continuum from 2 to 20$.   It's not hard to spend a couple of minutes and find them for even less than 2$ if youre looking for more than one.
Anyway, Here's what you get when you buy one of these:
30 second voice / message greeting card reorder

It's a small PCB with 2 tactile buttons (not shown in pic above) for 'play' and 'record', a generic miniature electret mic, cheap 8 ohm speaker, and 3mm red LED.  Unfortunately, the IC is covered with the good ole total bullshit black gumdrop so your guess is as good as mine on that.  Also included are 2 1.5v el44 hearing aid batteries.

Bending/Modifying

The first thing to take into account here is that ALL the wires are TOTAL shite  - I mean we're talking so bad that the first two ones I was messing with I wrote off because I thought they were DOA when it was just shorted wires on both.  When I was going through the board looking for the bend points I wanted, it was pretty normal for me to have to stop and 'jiggle' the wires until I found whatever one was shorting out that time and got it to function again.  So,
-Step 1 is to remove all the wires after noting what is what and where it went (from here out, order is arbitrary so you can do things in whatever order you prefer)

-Step  2 replace the batteries (if youre going to do this at all)
I've had a LOT of different values on these, its pretty much the only thing that varies among the boards sold as 'greeting card message recorders'-some are 6v brought to 5v by a voltage regulator and some are 3v etc.  In this case, this board runs on 3v (1.5v x2).  Note : you cannot always just add the battery voltage together. Most times yes, but sometimes the batteries are run in different ways.  


For example, If you just connect the pos to pos and neg to neg then the voltage stays the same. Its only added together when they are connected in pos-neg series-or when opposite polarities are connected to that current flows from one to the other.

click for larger version
Step 3 Add SPDT/transistor to loop the sample : Since these type of 'message recorders' are built to be triggered by a button press and need to be re-pressed (you can't simply hold down the button) -you can't just connect a toggle switch to the tactile momentary switch wires so that the connection is constant.  That would just result in a single play of the sample and youd have to switch the switch down and then up again to play it again.  The solution? Use a transistor to re-trigger over and over.
How do you do this you ask? Well, in this case I used a NPN transistor (meaning it has a Base middle leg, collector and emittor outer legs), which basically connects the two outer legs whenever current  (in this case I used a 2n2222 but any other NPN will work..probably) changes on the middle leg.
Since I needed to switch this on and off I stuck a SPDT toggle in between the middle leg and the source of trigger (the inner LED pad).  Since there was another lug on the toggle to use, I simply connected it to the tip of a audio jack so that incoming current (like CV) can be used to trigger the loop as well -as an added plus.


Step 4 adding an out (or keep the speaker, or add a switch and have both!) As noted in the photo above, simply solder two wires where the current speaker wires are.  However, its important to add a small resistance resistor (4.7ohm to 22ohm) in between the two connections on the out jack to cut down on the gain some-otherwise its going to sound like youre intentionally blowing the speaker all the time when you plug it into something.  NOTE: the polarity of the connections in the photo is just a guess, I can't remember which is pos and which is ground.  Just try for yourself-youve got a 50/50 chance so it should be easy to figure out!

Step 5 adding a Pitch Mod to alter the pitch of the sample/loop play
I used a 500k potentiometer, but almost any will work.  Try whatever sounds good to you and see what you like. You may also want to leave in the original resistor you connect the two leads (from the wiper and outside lug-whchever it doesnt matter which really-of your potentiometer) on either side of.  Anyway-see above photo for exact location of the clock resistor.  What youre doing here is a standard circuit bending trick-hijacking the clock for the circuit.  Its what tells the circuit how fast to play the sample.  In this case its a resistor but it could be a crystal or all sorts of stuff -its just a resistor in cheap stuff cuz thats the cheapest option.
So, by changing the value of the clock resistor, were changing how fast the circuit is being played, and thus, its pitch.

Step 6 adding an IN : simply connect the red (pos) line to the electret mic to the tip of a jack and the black (ground) to the sleeve lug and you're good to go! you can also either add a switch and keep the mic or keep both wired in if you want.

Here's my finished bend (first time I did it anways so kinda messy):




Saturday, May 23, 2015

NEW Hand-made Guitar Synth-Fuzz, Bit-reduction Pedal w/Optical Compressor "Atomic Fyreball"

Atomic Fyreball 


Sparkly Blue-Green!
This one was a custom order for a local musician. He uses Fuzz a LOT in his band live and Crazy-Destructo Noise a good bit in solos and intros.  He wanted a pedal that would give him those options but NOT blend into the general 'wall-o-noise' the rest of his band puts out.  With a Bass player using distortion/fuzz on his bass, another guitar player doing same, key player putting out noise in the same end of the audio spectrum, and REALLY loud drummer..well, it meant I couldn't just mod a typical fuzz pedal or make a few changes to a guitar synth schematic.  I'd have had to change them so significantly that they wouldnt actually BE those things anymore.

What was the answer?

I dunno.  But I decided MY answer would be to add an extra and totally external compressor to the effect pedal.  That way he could turn it on and turn it off depending on whether the rest of the band was playing live or if he was in the studio or playing alone.

In general, I strongly believe in providing as many options as possible with the audio devices I design and create. I think they will be more useful in more situations and to more people if that is done.  Often times, its simply adding a potentiometer (knob) and a couple of wires or a switch and some wires. It hardly ever means really doing to too much trouble...so why not?
looking down on destruction!

Anyway, in keeping with that ethos, I added the extra compression circuit-a simple optical compressor. I used as many vintage components as possible-things like vintage transistors and semiconductors and germanium diodes-and stuck the whole thing on old-school through-hole perfboard. There are two knobs to control Gain and Compression-which are all that a guitar player should really be interested in -in this case, anyway.  Since it was totally separate, I didn't feel like it was a good idea to just slap in a SPDT toggle, and instead threw in a whole other footswitch/led/in/out & true bypass-so that he could just use the compressor if he wanted to.  Certainly at least he could toggle it off with his foot and the Fuzz would come through the true bypass.

For Fuzz/Synth/General Destruction I used a version of Tim Escobedo's original Uglyface via a modified MusicPCB.com's Uglyface PCB.  He wasn't doing a lot of complicated or noticeable GuitarSynth stuff so he didn't need the additional options adding a LFO/Modulation would have offered-so I stuck with modifying the Uglyface towards Fuzz and Dstruction and away from GuitarSynth duty (it can do all 3-to varying extents, depending on the modification and resistance returned into the circuit from the control generally via potentiometer).

The result is this beauty. Im going to try and get him to let me video him using it for the video demo. Im also going to make about 10 others as there is some interest. Since only 5 of them are spoken-for already, Im going to put the other five on the http://www.newvoodoosound.com site.
If they prove really popular and sell fast, I'll make some more.
Please, if you check them out and think they're too expensive or you'd prefer some slightly different version-let me know. 
If I agree or a lot of other people agree--then I'll make & sell it that way.

WEEKLY-ICS you NEED to KNOW: Princeton PT2399:

Datasheet can be downloaded here: http://sound.westhost.com/pt2399.pdf

pt2399 pinout
This chip is used (and this is only from the top of my head) in : DOD delay pedal; Danelectro FabDelay; numerous other delay pedals, Synthrotek's Dev Delay, EKO module, EKO mkII, Cosmic Delay; GetLofi's Lo-Fi delay, Mad Bean pedal's Sparklehorse and other digital delays, the DIY-site ubiquitous Rebote Delay pedal, and on and on.

In other words-if you have a couple of hardware delays in your studio/music area, then you probably own a PT2399 at work.

There are a number of reasons for this:
-its a REALLY good self-contained, one-chip answer to audio delay.
-it doesnt require external memory like the MN-type analog BBD delays
-it doesnt require the 'dialing in' that other delays do, meaning you have to mess with a trimmer after
  building a circuit using it
-PT2399's can be CASCADED to increase delay time (time between returns)
-it allows you to add everything from Reverb to Chorus to a device with very little effort
-a fully-functional audio delay circuit can be made with it employing just a handful of passive components
-etc

Important DIY info:
There ARE onboard Op-Amps (meaning it can also do all the things opamps can do-simple synths, negative feedback amplification, etc) BUT about the heaviest load they can drive is roughly 1kohm (in my experience-I honestly dunno what the datasheet says if it says anything).

Always ALWAYS make sure the grounds are grounded: in particular, I am referring to Pin 4 (digital ground)--do NOT ignore it and assume since you have Pin 3 (Analog ground) grounded, you are OK. For a number of reasons, this is not so.  Most time, the easiest way to deal with this is to connect Pin 4 to Pin 3

Noise is something you are going to HAVE to deal with there just isn't a way to avoid some minimal noise with the chip..but normally that doesnt matter-especially when dealing with something like a guitar pedal where you can just chop the  output frequency at human-audible levels if necessary.  The normal way I deal with this is just to use a 7805-type regulator on the power and a 2.2uf (or less, whatever works for your purposes) decoupling capacitor.  After that, noise should be reduced to a easily handled level.  Just remember, if you design a device/circuit with the PT2399, do NOT leave out some means of dealing with noise simply on the assumption its digital and wont produce much

Modulation can be EASILY added -there are a LOT of different circuits and means of doing this, I dont want to say too much about it-just know it can be easily done and use your favorite search engine to figure out the way that works best for what you have in mind.

Its pretty easy on power -you wont have to worry too much about overall drain when you add a delay to your circuit via the PT2399-likely you will not need to alter your power in the circuit at all. For example, if you are using a 9v DC batter with a simple 78xx regulator and so forth for whatever you are already doing, you will not have to worry about drain if you add a PT2399 (thus adding delay) to the circuit.(in MOST cases)



Tuesday, May 12, 2015

--WEEKLY :  IC'S YOU NEED TO KNOW---





You'll see this chip a LOT in CV sequencers and bent devices.
Here's why:
It makes things like other IC's and Microcontrollers (Arduino, Rasberry Pi) able to perform the same tasks that analog physical switches can.
For example, you want your Arduino to switch on a light switch.  How can you do it? All the arduino can do is send out 0's and 1's (digital) or PWM/square wave/analog electrical signal/audio/etc..it cannot switch things.
2 options: if its just a simple thing like one light switch you might use a 2n3904 or other simple pnp/npn transistor..or you can use a 4066-and switch on/off multiple things.  In this example, you'd take the 2 leads that are attached to the light switch and connect them to either pin 1&2, 3&4, 10&11, or 8&9--those are the ends of the circuit you want to join or separate.  Then you'd connect either pin 13, 12, 5, or 6 to the Arduino/Raspberry PI/PIC which can then connect or separate the circuit by opening and closing the connection according to whether its sending an UP or DOWN signal to the (13, etc) pin on the 4066.

This, obviously, becomes incredibly useful for sequencers and circuit bends or instrument mods.

Hopefully this simple explanation of the CD4066 can help you understand the chip and gives you some ideas how to employ it fucking up things.

Link to PDF datasheet: HERE IS THE DATASHEET FROM TEXAS INSTRUMENTS FOR THE CD4066
HERE IS THE DATASHEET FOR THE HOLTEK CHIPS MENTIONED IN THE POSTS BELOW