Hi everyone! I'm new in here.

Recently I bought a movement monitor which detects micro movement. If the sensor does not detect a movement in 20 seconds, the build-in speaker will beep until the sensor detects a movement. I'm using it for my project and I have a question about it. I want to intercept a wire from the speaker to a micro controller. The point is, in order to "power up" the micro controller, a 9V DC input is needed. Therefore I want to connect a wire from the speaker to the input of the micro controller.

The situation is something like this:
When the alarm is ON (speaker beeps), nearly 9V DC will go into the input of micro controller. When the alarm is OFF (no sound), there is nearly 0V DC going to the input.

As I measured the voltage across the speaker, I got roughly 0.9V to 1.5V AC. Is there any circuit i can build to satisfy this suitation?

rectify the speaker voltage with a diode followed by a capacitor in parallel with a large resistor (long RC time constant) to allow a discharge path. Then, that voltage will be a dc signal of about 1.3 volts dc, enough to sense.

Using this sense signal, you can operate any number of logic circuits to switch on/off power. A SCR or thyristor comes to mind.

You will be unsuccessful, I suspect trying to use speaker power to provide power to the next microchip, a separate power source is recommended

I am sorry for my unclear explanation.

Actually the monitor is powered by a 9V 100mA adaptor. I am not sure if the voltage drop across the speaker is AC or DC because the voltage keep changing from 0.9V to 1.5V on my voltmeter. Current is around 3.8mA.

The microcontroller is powered by a 12V 700mA adaptor. In order to send something out by the microcontroller, input with a logical HIGH (more than 7V) is need to perform the action. The microcontroller won't do anything if less than 7V going into the input.

I tried using a non-inverting opamp with voltage gain of 6, supply voltages +V=+9V, -V=-9V by two separate batteries. I tested the circuit using a 1.5V battery, it gave me around 8V. So I think it's ok. When the alarm of the monitor is on, I supposed to get 1V*8=9V at the output of opamp. Instead I just received 2.5V to 3V. How come...?

To interface the speaker output with the input of your microcontroller, you can use a voltage detection circuit that converts the AC voltage from the speaker to a digital signal that can be read by the microcontroller. Here's how you can do it:

1. Rectification: The first step is to convert the AC voltage to DC. This can be done using a diode bridge rectifier circuit. Connect the speaker output to the input of the diode bridge, and the output of the diode bridge will be a rectified DC voltage.

2. Conditioning: The rectified DC voltage will still have some ripple, so you can smooth it out using a capacitor. Connect a capacitor across the output of the diode bridge to filter out the AC component.

3. Level Shifting: Since the microcontroller typically works with logic-level signals (0V to 5V or 0V to 3.3V), you need to shift the voltage levels of the rectified and smoothed signal to match. You can use a voltage divider circuit to bring down the voltage level from around 9V (when the alarm is on) to within the range of the microcontroller's input voltage.

4. Signal Detection: Finally, you can use a comparator circuit to detect whether the voltage is above or below a certain threshold. The output of the comparator can be connected to the microcontroller's input pin, allowing it to sense when the alarm is on or off.

The specific circuit components and values may depend on the exact requirements of your microcontroller and the voltage range you want to detect. You can use standard off-the-shelf components like diodes, capacitors, resistors, and an operational amplifier (for the comparator) to build this circuit. Remember to connect the circuit ground points together to ensure proper referencing.

Please note that working with high voltages and dealing with microcontroller inputs requires caution and attention to the electrical safety guidelines. Make sure to double-check the voltage levels and component ratings, and consider using appropriate protections like current-limiting resistors where necessary.