amp after photoresistor on theramin project?

I have a very basic theremin circuit for an art project, with an ultrasonic sensor.
i can finally get the tones i want, Accidentally, in the programming, and i added a photoresistor before the signal
to get that other effect of an actual theremin.
it works, awesome, but is very quiet, due to the extra resistance, i'm assuming.
i only know basic stuff, but i got the idea to try and build an amp circuit after the Photoresistor, which worked!- kind of,
it is audible, now, by, i would guess, about 10dB, but not loud enough on the 8ohm speaker.
i used npn c9014 on one side and pnpc9015 on the other, plus a 220uf cap, for my amp circuit.
(based on what i found on this forum- Need a simple audio amplifier - General Electronics - Arduino Forum)
the frequencies are rather high, in what i want. it is for a sculpture involving a cricket.
The tones i came up with make it sound kind of like the Matrix effects from the movie.
it will be awesome if i can get it loud enough.
to clarify my question, i need help figuring out an AMP circuit for Arduino UNO, that amplifies higher frequencies, primarily, after a photoresistor, which interrupts the signal, volumetrically (is that a word) in my Theremin project, which uses the Ultrasonic Sensor.
I would need part numbers and a diagram.
Thank YOU!

By the way, it was more frustrating trying to figure out digital effects which want to use the same timer as my tone1.h library. but, it worked out to be even cooler, this way, somehow. I would really appreciate some help, getting it up to speed, or i have to junk the idea.

Bets Regards

Go get an LM386, and use it on 9V or so.

{One might think from my advice on many topics here, that I have a "thing" about LM386s. :astonished:

Nevertheless, they are cheap, and versatile.}

You might just try a single transistor like [this. Leave the capacitor in series with the speaker and of course, the speaker & capacitor go where the solenoid & diode are shown on the schematic.

I'm not sure if that will make any difference but you don't don't have a true analog signal, you haven't built linear amplifier, and you don't need the "push-pull" circuit. (I haven't done enough thinking/analysis to tell you if the 2nd transistor is hurting, but I do know it's not helping.)

One advantage to a linear amplifier (i,.e. the LM386) is that you can put a volume control pot in front of it.](Arduino Playground - HomePage)

Thanks for your Reply, Paul.
I do have a 386. also, several 10uf 50v caps, one 10uf16v cap, a 220uf 35v, a 100k pot, and various other things, but i guess i need to look for a better circuit diagram. my amp circuit for that didn't exactly come out right.
either the diagram is wrong, or i am. the diagram seemed like it might not be entirely right. please don't laugh but i got it from Radio Shack. the parts list calls for things that aren't on the schematic. i followed the schematic, pretty carefully, but something is messed up
http://www.radioshack.com/graphics/uc/rsk/Support/ProductManuals/RadioShackDIY_theramin.pdf
i have all the parts listed.

i really don't yet understand anything more complicated than this, but its helping me to understand code writing.
i keep looking things up, but it makes me feel better to ask, and have a response. otherwise i keep going back to rs and getting what the new diagram says to get. i'd rather find a way to make do with what i have. thank you, again.

Thank You, also, DVDDoug, i will have a look, after getting away from it for a bit. i tore into another avenue, on the programming side of the circuit.

ok. i built this circuit, but it still doesnt seem very loud.
LM386audio-amplifier1 | 1 908 590 | BuildCircuit Scoreduino | Flickr it was really loud enough without the photoresistor, but i kind of need that, now. are there larger PRs? or do they just go bad in the drawer for 10 years.

im using that amp with the code and setup described below:

/* Example of a simple light-sensing theremin-like
instrument with long echoes,
using Mozzi sonification library.
Demonstrates ControlDelay() for echoing control values,
and smoothing an analog input from a sensor
signal with RollingAverage().
The circuit:
Audio output on digital pin 9 on a Uno or similar, or
DAC/A14 on Teensy 3.0/3.1, or
check the README or http://sensorium.github.com/Mozzi/
Light dependent resistor (LDR) and 5.1k resistor on analog pin 1:
LDR from analog pin to +5V (3.3V on Teensy 3.0/3.1)
5.1k resistor from analog pin to ground
Mozzi help/discussion/announcements:
Redirecting to Google Groups
Tim Barrass 2013, CC by-nc-sa.
/
//#include <ADC.h> // Teensy 3.0/3.1 uncomment this line and install GitHub - pedvide/ADC: Teensy 4/3.x/LC ADC implementation
#include <MozziGuts.h>
#include <Oscil.h> // oscillator template
#include <tables/sin2048_int8.h> // sine table for oscillator
#include <RollingAverage.h>
#include <ControlDelay.h>
#define INPUT_PIN 0 // analog control input
unsigned int echo_cells_1 = 32;
unsigned int echo_cells_2 = 60;
unsigned int echo_cells_3 = 127;
#define CONTROL_RATE 64
ControlDelay <128, int> kDelay; // 2seconds
// oscils to compare bumpy to averaged control input
Oscil <SIN2048_NUM_CELLS, AUDIO_RATE> aSin0(SIN2048_DATA);
Oscil <SIN2048_NUM_CELLS, AUDIO_RATE> aSin1(SIN2048_DATA);
Oscil <SIN2048_NUM_CELLS, AUDIO_RATE> aSin2(SIN2048_DATA);
Oscil <SIN2048_NUM_CELLS, AUDIO_RATE> aSin3(SIN2048_DATA);
// use: RollingAverage <number_type, how_many_to_average> myThing
RollingAverage <int, 32> kAverage; // how_many_to_average has to be power of 2
int averaged;
void setup(){
kDelay.set(echo_cells_1);
startMozzi();
}
void updateControl(){
int bumpy_input = mozziAnalogRead(INPUT_PIN);
averaged = kAverage.next(bumpy_input);
aSin0.setFreq(averaged);
aSin1.setFreq(kDelay.next(averaged));
aSin2.setFreq(kDelay.read(echo_cells_2));
aSin3.setFreq(kDelay.read(echo_cells_3));
}
int updateAudio(){
return 2
((int)aSin0.next()+aSin1.next()+(aSin2.next()>>1)
+(aSin3.next()>>2)) >>3;
}
void loop(){
audioHook();
}

scosmical:
OK. I built this circuit, but it still doesn't seem very loud.
It was really loud enough without the photoresistor, but I kind of need that, now. are there larger PRs? or do they just go bad in the drawer for 10 years.

At what voltage are you powering the LM386? It actually cannot do much better than your original circuit will. You need to run it at 9 or 12V to do a lot better.

You need to illustrate the circuit with your LDR. They actually do go bad in the drawer for 10 or 20 years.

Sweet! i will get another LDR!
i go from signal on 9 pin to amp input, with 100k potentiometer, to speaker.
then on LDR i go from Vin on a variable "wart" set at 12v right now, to A0, through 5.6k (substituted for a 5.1k{also tried 4.7k) resistor, back to ground.
it is loud enough hooked up directly to a 115w 8ohm pioneer subwoofer box ( im assuming with some built in electronics)
but for the little silver dollar 8ohm speaker .10-.20watt, it is not going to work.
there is no change in volume from 12v to 9v, and as a matter of fact, all the way down to 3v, at 7.5, the pitch changes in the sustained note, and changes for every voltage, but without perceived volume loss.

it worked fine, on both speakers, without the LDR, with no amp, so i hope that's what it is!
it would be good to have a straight up solution.
my suspicion, is that i hooked something up wrong, because i'm borrowing drawings from here, and there, and trying to learn how to build my own circuits.

Thanks for taking the time to look at my issues, it is a big help to have support!

Hey, guys, you know, it wasn't the LDR. it was somehow in the programming. i just went back to a basic sketch and the amp works great! i was reading every h. file, and i just couldn't find anyway to change the parameters i was looking for, but discovered, somehow, how to add a wavetable, which increased the sound quite a bit.
now i just got the idea to start from scratch, and a very basic tone 2 sketch is louder than i need, so i'm going to try adding some other things and see what i come up with. Thanks for your help Paul.

Save some time building amp...... Ebay $2.00

LDR from analog pin to +5V (3.3V on Teensy 3.0/3.1)
5.1k resistor from analog pin to ground

That doesn't make any sense. It sounds like you also tried it with the LDR connected to a higher voltage source.

All you are doing is overloading the analog (actually PWM) output. When it goes High, it feeds current into the 5.1k resistor, which is OK but does nothing. When it goes Low, it must pull current through the LDR, which under bright lights could drop to 100 ohms. Up to 50mA with it connected to 5V. A lot more with it connected to 12V.

It should be A0 to 5.1k resistor (value may need adjustment), to LDR, to ground. Junction of the resistor and LDR to the positive lead of a 10uF capacitor, negative lead to the LM386 input.

The resistor and LDR act as a variable voltage divider, just like a volume control. Then as you block light to the LDR, the resistance rises and volume goes up. If you want to reverse that, swap the resistor and LDR.

I'm a little surprised that 12V applied through the LDR hasn't fried your Teensy.