so I'm working on making a sensor, and I just got a TI OPA2228 amplifier because the analog signal that I was getting was way too small.
now that i've wired it up, i'm having all kinds of problems. the serial output from arduino goes crazy when it's wired up to my piezo disk. it maxes out at something like 800, and it stays there, fluctuating when I push on it but otherwise stuck at that value. When I let it sit for a while, the TX light on the Arduino starts blinking about once a second, and it seems to be sending some voltage with that frequency.
No, I haven't. I have the positive lead from the piezo element going into the "+ in" pin on the amplifier, and the negative lead going to the "- in" port. Before the amplifier, I had the positive lead directly attached to the analog pin and connected to ground via a resistor.
how does one do that, and what does it accomplish?
So where did you connect the + and - supply to the amplifier?
When I let it sit for a while, the TX light on the Arduino starts blinking about once a second, and it seems to be sending some voltage with that frequency.
Without seeing the sketch you are using I can only guess that you wrote it to do this and is perfectly normal.
how does one do that, and what does it accomplish?
Biasing makes the input sit at the middle point. Connect two 100K resistors to the amp's +ve input along with your sensor. Connect the other end of one to +5V, and the other end of the other to ground.
I tried connecting the input line to ground and +5V with 100 ohm resistors (it already has the + line from the sensor going in), but that didn't solve the problem. My serial port still shows this crazy line of values that are around 800.
this is what my noise looks like.
the real question is, is it just poorly configured or is that the kind of noise that you get from this kind of amp (attached to a piezo disk, which must have a lot of residual voltage fluctuations to deal with)...
I tried connecting the input line to ground and +5V with 100 ohm resistors (it already has the + line from the sensor going in), but that didn't solve the problem
That is not what I said, please read the post again.
the real question is, is it just poorly configured
Connect two 100K resistors to the amp's +ve input along with your sensor. Connect the other end of one to +5V, and the other end of the other to ground.
Okay. So I have two 100k resistors connected to the '+IN' on the amplifier. One goes to ground, one goes to +5V. The positive lead from the piezo element is also plugged into that port.
According to the PDF, http://www.ti.com/lit/ds/sbos110a/sbos110a.pdf, that's Port 3.
The negative lead from the piezo element goes straight to ground.
The rest of the circuit is set up like the op-amp tutorials that I have read. V+ is connected to +5V on Arduino. V- is connected to ground.
The output is connected to the analog pin. It's also connected via resistor (100k) to Port 2, which is in turn connected by a resistor (10k) to ground.
The serial monitor is still showing a constant 3V-4V output. I'm running example code to read serial monitor. definitely a hardware thing, but i don't know what. If I disconnect the amplifier and just connect my piezo element to the system, everything is fine (reads voltages when disturbed, doesn't when it's sitting there).
First of all do a test, temporally connect the +ve input (pin 3 not port 3). The output of the op amp should drop to ground or just above it. If this happens then try the things below, if not you have either a faulty op amp or you have not wired it up like you think you have.
AC couple the piezo element. That is don't connect it directly to the input but put it through a capacitor. Anything around 0.47uF should do.
Add the trim pot, as shown in Fig 1 to adjust the DC input.
Add the decoupling capacitors shown in that diagram.
I don't understand. I want to amplify the signal coming from the disk. When I didn't have the amplifier, the + from piezo was connected to analog0 and connected through a resistor to ground. - from piezo was connected to ground...