I’m using some robotics cards for a project I’m doing, and need to interface the output to a computer. First, I wanted to use a QRE1113 for a black/white sensor. I bought the Sparkfun chip digital chip, but works convolutedly. I’m looking for a way to use the Sparkfun analog chip (or something else that will give me a decent output). I just want a 1 for white and a 0 for black so I can use it for a distance measurer (put alternating white and black on the wheel, and every transition relates to a certain distance (odometer). Then, getting that info to the laptop is something I’m scared of. If I do a TTL to USB adapter, will that mess up the info?
I also have a serial motor driver card (sparkfun.com/datasheets/Robotics/SFE03-0012-UserGuide-ROB-09571-serialmotordriver.pdf) that needs to be turned on and off by signals from the laptop computer. That’s it! Thank you in advance for your time with this!
Chuck
The black and white on the wheel is a fixed distance, so each transition is x inches of movement. I’ve got audio coming in from a microphone and am syncing it with the pulses. Any way I can bypass the need for the Arduino and let the computer handle the color transition determination? I plan to make a number of these and am trying to keep the cost down!
The QRE1113 can be counter intuitive to use since you need to read the period of a pulse rather than if it is high or low. You could use RB-Pol-49 (the analogue version) in order to get an analogue reading of the reflectance of the object, Then you can determine that above a certain threshold it rad white , and below that threshold, it is black.
In order to make those reading and bring them to a computer via USB, you can simply use an Arduino microcontroller (RB-Ard-18). You can write a simple program that outputs the count of black/white transitions serially and read it with a computer program.
If you use an audio input then you should be able to read the transitions fast enough so you can avoid using a microcontroller. The analogue version will then be the most appropriate in your case you you will likely need to add some components (resistors maybe) to match the input impedance of the microphone and to produce signals that are of the appropriate magnitude.