Society of Robots - Robot Forum

Electronics => Electronics => Topic started by: debug-bad on July 20, 2008, 05:12:12 PM

Title: Accelerometer directly to PC?
Post by: debug-bad on July 20, 2008, 05:12:12 PM
I'm new to circuit design and everything. I wanted to know, can you somehow have an accelerometer that has x y output in analog, and have it send those signals directly to your computer so your computer can handle it (it will be connected by usb or serial, dont know which)? Do I need a microcontroller for that? I don't see why I would for this.
Title: Re: Accelerometer directly to PC?
Post by: debug-bad on July 20, 2008, 05:16:18 PM
I should also add: What is a good book to learn about circuitry for designing boards (and so they can connect to your computer so you can program them)? Thanks!
Title: Re: Accelerometer directly to PC?
Post by: izua on July 20, 2008, 06:45:28 PM
well, you can't connect stuff directly to usb. every smart usb device (that communicates with a computer, usb lamps, fans and these toys excluded - unless they have software to control them) has a microcontroller in it. this thing does the communication and interprets its sensors. so if you want to read your accelerometer, you can't simply wire it to usb and expect it to work, unless it has an usb interface (but that's a completely different thing).

think about it, usb is designed to handle 127 devices in parallel. if you connect to accelerometers and they send different values, how would your pc know which value to pick? it won't be seeing a correct value, since the two voltages will interact with eachother.

the serial port is by excellence a digital port, so you can't feed it an analog value. you might have some luck with a gameport, if you want a direct analog input, however, you will need to write specialised software on the computer side.
Title: Re: Accelerometer directly to PC?
Post by: debug-bad on July 20, 2008, 07:26:22 PM
well, you can't connect stuff directly to usb. every smart usb device (that communicates with a computer, usb lamps, fans and these toys excluded - unless they have software to control them) has a microcontroller in it. this thing does the communication and interprets its sensors. so if you want to read your accelerometer, you can't simply wire it to usb and expect it to work, unless it has an usb interface (but that's a completely different thing).

think about it, usb is designed to handle 127 devices in parallel. if you connect to accelerometers and they send different values, how would your pc know which value to pick? it won't be seeing a correct value, since the two voltages will interact with eachother.

the serial port is by excellence a digital port, so you can't feed it an analog value. you might have some luck with a gameport, if you want a direct analog input, however, you will need to write specialised software on the computer side.
So should I get a microcontroller and set it up to get the signals from the accelerometer, then send it from the microcontroller to a serial or usb?
Title: Re: Accelerometer directly to PC?
Post by: airman00 on July 20, 2008, 07:31:33 PM
there are commercial products that allow an interface to the computer through USB
Look up Phidgets on Google
Title: Re: Accelerometer directly to PC?
Post by: izua on July 21, 2008, 05:05:41 AM
yes, there are commericals units as airman said. there are even wireless acceleroemters, and the receiver allows usb and a varia of other protocols. look on sparkfun for them. just one thing though - don't expect them to be cheap
Title: Re: Accelerometer directly to PC?
Post by: debug-bad on July 21, 2008, 07:56:02 PM
Can you recommend a book that will help explain how to create a circuit and all?
Title: Re: Accelerometer directly to PC?
Post by: airman00 on July 21, 2008, 08:21:06 PM
Can you recommend a book that will help explain how to create a circuit and all?

depends what microcontroller you plan to use


Robot Builders Bonanza is one of my favorite books - it teaches you a lot
Title: Re: Accelerometer directly to PC?
Post by: bulkhead on July 21, 2008, 10:01:56 PM
Here's a ~$50 solution.  Get a $40 wiimote and $10 bluetooth USB adapter

http://www.hackaday.com/2007/07/28/wiimote-car-accelerometer/ (http://www.hackaday.com/2007/07/28/wiimote-car-accelerometer/)