140Views4Replies

Author Options:

How to make ARDUINO aware of using a MOTOR by other item/pcb ??? Answered

Picture of


Hi.

I would like to know, how can I get the information to ARDUINO ... that other item/pcb has turn on a motor ???

The PCB that the cables are coming from to the motor is power by one AAA battery. When you turn on the pcb, it sends short bursts to the motor, so it vibrates every second (for half a second).

Now I would like to know, how to connect the arduino to the motor, so that the arduino would know when the motor is on ???

Thanks


4 Replies

user
sinuzBest Answer (author)2010-08-08

You can measure the Voltage over the motor by connecting the two motor pins to the gnd and an analog input on the arduino.

Select as Best AnswerUndo Best Answer

user
zholy (author)sinuz2010-08-08

OK ... this is the code : void setup(){Serial.begin(9600);} void loop(){Serial.println(analogRead(1));} When I connect both of the motor pins to ARDUINO's gnd ... and one wire from the RED motor cable to analog 1 ... it shows me ZERO all the time (but the motor spins)??? What do I make wrong ???

Select as Best AnswerUndo Best Answer

user
sinuz (author)zholy2010-08-09

You should connect one pin to the gnd, and one to the analog i/o

Select as Best AnswerUndo Best Answer

user
steveastrouk (author)2010-08-09

You might not have the motor connection the right way round to the arduino. You should be VERY careful to make sure the Arduino is only seeing +ve voltages to the analog in pins.

Steve

Select as Best AnswerUndo Best Answer