Reading a low voltage input

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?

The voltage you report (7 mV) makes no sense for a motor, and your measurement is likely to be incorrect. Please check again.

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).
schematic.png

Welcome to the forum.

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.

Thanks... Tom... :) :) :)

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.

My code is as follows:

const int relayControl = 13;

void setup() {

pinMode(A0, INPUT);
pinMode(13, OUTPUT);
Serial.begin(9600);
}

void loop() {

int alarmOn = analogRead(A0);
Serial.println(alarmOn);
if (alarmOn > 0){
  digitalWrite(relayControl, HIGH);
  delay(10000);
  digitalWrite(relayControl, LOW);
} else{
  digitalWrite(relayControl, LOW);
}
}

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.

My circuit uses an OpAmp or comparator. Not a transistor. Very different thing.

Besides, those Fritzy spaghetti drawings while rather pretty are unreadable and quite useless for assessing a circuit.

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.

tr.png

1 volt can be easily detected by analogRead. No additional circuits required.

alesam: 1 volt can be easily detected by analogRead. No additional circuits required.

Well actually, a series protective resistor.

Arduino has an analog comparator built in. Excellent device for this task, try to find some tutorial for it.

Smajdalf: Arduino has an analog comparator built in. Excellent device for this task, try to find some tutorial for it.

Sure, but there is no wiring support for it. So you need deal directly with a HW. It's not a big deal but can be a problem for nub.

Hi,
Looking at your fritzy, the alarm and alarm set switches are in the negative side of the circuit.

What do you measure between the battery negative and the switched side of the motor?

It is good practice to reference to gnd, in this case the battery negative.
Then reference the Arduino gnd to the clock gnd.
As in the diagram below.

Alarm Circuit 2 edit.jpg

Tom… :slight_smile:

Hi,
1.5v will be (1.5/5.0) * 1023 = 306 count.

So change

if (alarmOn > 0)

to,

if (alarmOn < 50)

This will help prevent false triggers due to any noise.
Tom… :slight_smile:

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.

Lacking caffeine.
Alarm Circuit 2 edit 44.jpg
Tom… :slight_smile: