Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

some kind of optical sensor

Status
Not open for further replies.

ee838l

New Member
I’m working on an automatic lawn irrigation system for my house. Anyway, I need some kind of optical sensor that will connect to my PC through the USB port. The purpose of this device would be to count revolutions of a wheel connected to the pump. The wheel is black and I will paint a small white spot on it for the sensor to work.

Sounds easy, but need a recommendation on a good and cheap optical sensor that will do the job. Also, how exactly to connect the sensor to the USB port and how to write the driver for this device? I have the skills (electronics, programming) but I would really appreciate any pointers to the specific information: optical sensors, connecting them to USB, and writing simple software for this kind of device.

Thank you,
Lance.
 

bmcculla

New Member
If you go to digikey.com and just hit go on the search without entering any text it'll give you a list of everyting they have. Under the sensors and transducers section they have opto interrupters. You should be able to find one that fits your needs.

As for the USB. I'd recommend a serial to USB converter. Either as an IC or as a dongle. These devices are super easy to use. They look like RS232 to the device and you can program for them like the serial port. If you want a true USB device look for a microcontroller with built in USB. I'd recommend Silicon Labs' (Silabs.com) usb microcontroller. They have great development kits. They also have good examples that should let you get up and running quickly.

In both of the above cases you need a microcontroller to read your sensor and then send the data to the computer.

Brent
 

tansis

New Member
An old mouse should provide a suitable opto sensor and slotted disc :idea:
 

ee838l

New Member
Re:

Thanks for the great suggestions!

I think it will be easy to take apart a USB joystick and connect some kind of “shorting” device parallel to the switches. The joystick driver will take care of the rest :D

Do you think it’s a good idea? What type of device would you recommend to short the switches? solid-state relay, reed relay, etc.

Thanks!

PS. Tansies, you recommend using an opto interrupter from an old mouse. How can I find out the specs of that device (polarity, pin-out), or are they all basically the same?
 

tansis

New Member
With a bit of luck you should find a makers mark and a product code on the device
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Top