I'm fairly new to this, so I'm probably making a mistake somewhere along the line.
I'm trying to read an input from an alarm clock that sends a signal to a motor that I've measured at 7mV and 200mA, but this is too low to read with the arduino. Is there a way to use a capacitor or a transistor to be able to send the arduino a signal when the motor is activated?
I have re-measured the voltage and it's 1V, the motor is powered by a single AA battery. I'm now confused about using a transistor to boost this signal to something I can read as an input to the arduino. All I've managed to do so far is make my transistor very warm...
1V across a motor is very plausible if the thing is switched by a transistor. If the motor is off, that should be 0V. That 0V/1V is easy enough to detect, use a comparator or OpAmp to get to a 0-5V (or 0-3.3V) signal out of that. Arduino ground to one pin of the motor, the other pin to the non-inverting input, a voltage divider giving 0.5V to the inverting input (this 10k+100k divider actually gives 0.45V, close enough).
Please read the first post in any forum entitled how to use this forum. http://forum.arduino.cc/index.php/topic,148850.0.html . Then look down to item #7 about how to post your code.
It will be formatted in a scrolling window that makes it easier to read.
Can you please post a copy of your circuit, in CAD or a picture of a hand drawn circuit in jpg, png?
A picture of the clock and where you are getting the readings will help too.
I have attached 2 png files outlining the circuit, Alarm Circuit 1 is just the alarm clock motor control circuit, the 2nd is with the transistor arrangement as I understand it from wvmarle's circuit diagram.
The idea being that the alarm will activate the relay (currently represented by the on state of the resistor in pin 13). When I simulate this code I find the LED is constantly on, and I have several 1 readings on the serial monitor. The delay is supposed to act as a system to keep the relay on for a set period (10s in this example) even after the alarm is deactivated. I was going to change this to millis() but I figured a delay would work in the short term.
A single transistor can be switched by the 1V across the motor terminals; something like this with any general purpose NPN transistor. LOW on input indicates the motor is on.
Doesn't hat circuit need some kind of protection against voltage spikes from the switching motor? Fair chance there's no flyback diode across the motor poles. A 10k resistor in the connection to A0 or so.
wvmarle:
Doesn't hat circuit need some kind of protection against voltage spikes from the switching motor? Fair chance there's no flyback diode across the motor poles. A 10k resistor in the connection to A0 or so.