motor and sensor

hello, im doing my school project............i want to know about connecting sensor and motor together.. that is when sensor sense motor start wotking.

You need to tell us what type of motor you are using.

Do you just need to know it has started or know what speed?

Weedpharma

its a high torque dc motor of 12v and i want to attach pnp sensor with it......it will most probably work a when sensor starts sensing.

You have not given enough information as to the type of sensor. A link would be good. A PNP sensor means nothing.

Weedpharma

thank you sir for reply. i m giving u full detail abt the product.............

the motor i have is 12V DC 1000 RPM HIGH POWER TORQUE GEAR BOX SPEED CONTROL ELECTRIC MOTOR -> for more information refer this url:http://www.tanotis-mart.com/electronics-industrial/motor-drives/dc-motors/1806217461460

the sensor i intend to use is inductive proximity sensor url: http://www.nskelectronics.com/inductive_proximity_sensor.html

if anymore requirement please tell me

thank you

The sensor is not practical for this motor. It is more suited to detecting the presence or not of a metal object.

You have not indicated how you want to monitor the motor other than when it has started.

A simpler method would be to use a reflective sensor and a reflective strip on the shaft. This would then be sensed every revolution. If no change of state then motor is stationary.

https://content.solarbotics.com/products/photos/0249e808937738d242fe880812925e52/lrg/opb704-IMG_5291.jpg

Weedpharma

thank you for the advice i want to develop the program that run the motor i have mentioned above when the sensor(take that u have advice) sensed...........if possible please let me understand the way i able to make the program with steps .with possible digram.

i will be very grateful to you please explain in detail because its my school project and i need to explain it too.

thank you

The sensor consists of a LED that shines out. The other side is a photo transistor. The LED is connected via a 390ohm resistor to the 5 v supply. When the light is reflected back to the phototransistor, it conducts.

The phototransistor is connected to a digital port and gnd. There is also a 10k resistor from the port to 5v.

The turning shaft needs a shiny section with the rest being black.

Your program will look for a change in the input in a short time. If it changes, the motor is rotating, if not, it is stationary.

This is a common usage of the device and there is a large amount of information on its use.

Once you have a basic program written and have a problem, get back for more help.

Search in the box at top of page for "Reflective sensor".

Weedpharma

hello, thank you what about hall efect sensor it gona good project. i need your help i know the code for driving dc motor but as im beginer i m facing problem in writing the code of sensor.

if iget the code for sensor still i dont know how to mix them.........and i want my motor and sensor work with coordination that is sensor sense the south pole and motor works accordingly with variable speed please help

Hi, To be clear.

What is your application, we know it is a school project, but what is it trying to show?

You have an inductive sensor, what object is it going to sense? When it senses the object, what do you want it to do to the motor? When the sensor cannot sense the object anymore, what do you want the motor to do?

Tom..... :)

When you name the pins, e.g. sensorPin and motorPin, your loop code can look like this: void loop() { byte sensed = digitalRead(sensorPin); digitalWrite(motorPin, sensed); }

Then you can concentrate on attaching the sensor and motor. For an first test of the program logic you can connect an button to the sensorPin, and a LED to the motorPin. When the LED lights as long as the button is pressed, everything is fine so far. Then you can replace the button by your sensor, check what happens, then replace the LED by your motor driver input, check what happens. That's easy, isn't it?