SparkFun Forums 

Where electronics enthusiasts find answers.

General project discussion / help
Did you make a robotic coffee pot which implements HTCPCP and decafs unauthorized users? Show it off here!
By pat2
#164163
I have a project where I need to read some sensors similar to the way a mouse works. i.e, I'll be moving an instrument that will be turning some gears or wheels or whatever, and I need to read this via a hardcoded link to my laptop.
Can anyone give me a rough guide to the easiest way to approach this?
If I want to go via a USB port, are there usb kits available that also include maybe A/D D/A converters? Should I look at arduinos, or is that over engineering it?
I've done some electronics, and a lot of programming, but I've never had to create an interface to a computer before so if someone can give me some pointers to help me keep from going down the wrong route, I'd be very grateful.
Thanks
Pat.
By waltr
#164169
The arduinos approach would be the easiest and isn't really over kill.
It could be done with less but would be a much harder project.
By Renate
#164508
You definitely want to use USB.
You'll want a small micro with USB support, like an ATMega32u4.
You don't actually want a mouse because on most systems it would move the cursor like a mouse.
You want an HID, Human Interface Device (which actually covers a lot of non-human ground).
You connect either a pot to an ADC pin or a biphase pickup to a pair of GPIO pins.
On the host side, you write an application to find the right VID/PID and read the HID reports coming in.
You won't have to write a driver, only a user mode bit of code.

Yes, there is a bit of stuff involved with this, but once you get it down, you'll be swimming in HID devices.
I've got 3 on my desk right now! :P