Interfacing IR & ultra sonic sensors to onboard laptop

Hi,
I was wondering if anyone out there might possibly be able to give me
any help in a project that I am required to do for college. I am
required to design and implement an obstacle avoidance system for a
robot which has already being made. The robot has an on board laptop,
a Mini SSC II servo controller as well as a micocore 11 board for
controlling the DC motors. What I am wondering about is what would be
the easiest and cheapest way to interface my sensors to the laptop and
how difficult would it be to interface them with a USB port as both
serial and parallel ports are currently being used to control the
servo and dc motors. I have four devantech SRF04 Ultra sonic rangers
with built in circuitry as well as four OPTECK reflective object
sensors part number OPB608B. I am not sure will I need to buy a
PIC to control the sensors and the PIC to send info to the laptop or if
there is a cheaper and easier option.
Reply to
clement
Loading thread data ...
The PIC isn't a particularly expensive piece of hardware. If you don't know PIC programming (or don't want to buy/use a compiler), the real "expense" is the learning curve.
Personally, I'd stick a USB interface to a microcontroller, because the USB interface probably can't be polled fast enough for the liking of the SRF04. There are USB interfaces for about $60. Most have at least 16 I/O lines you can use to communicate with the microcontroller.
I have also not used the Dios line of controllers from Kronos Robotics
formatting link
but I've seen them recommended many times. These controllers are programming in Basic, and are quite affordable. I don't know if he offers a USB interface, but you can check.
Before you purchase a USB interface, you might want to see if there are any aailable I/O lines from the parallel port. Consider using the control register, not just the data register. There are 8 bits in the data register, and some five outputs in the control register (depends on the port).
-- Gordon Author: Constructing Robot Bases (Forthcoming) Robot Builder's Sourcebook, Robot Builder's Bonanza
clement wrote:
Reply to
Gordon McComb
formatting link

Reply to
Blueeyedpop
Actually I was thinking ActiveWire. It's half the cost of the LabJack, at $60 versus $120, though the LabJack is obviously more "ruggedized" (it has a case, whereas the ActiveWire product is an open PCB).
-- Gordon Author: Constructing Robot Bases (Forthcoming) Robot Builder's Sourcebook, Robot Builder's Bonanza
Reply to
Gordon McComb
Thanks alot for replying its much appreciated. I am thinking I would like to interface the sensors by using a PIC . I was wondering if you could suggest what type PIC would be best for this type of project and how would be the best way to go about interfacing it to the laptop. Do you know of any websites that would be of help? The problem is I don't know really how to do this at all. I'd be very thankful for any help.
Reply to
clement
I'm not much of a PIC user, so maybe someone else will weigh in there. I prefer the Atmel AVR line of microcontrollers. The AT90S2313, at about $3 each, would probably work. You might also check out BASCOM AVR, at
formatting link
It's a Basic-language compiler for the AVR line. They offer a free demo version that will work with the '2313, and should you decide to buy the program it's fairly inexpensive. Included in the docs is a schematic for wiring up a simple programming cable. The AVRs don't need bootloaders or programming boards.
How you connect the PIC or AVR or whatever to your laptop is why you're going to school! Seriously, I would consult with the instructor for ideas.
-- Gordon Author: Constructing Robot Bases (Forthcoming) Robot Builder's Sourcebook, Robot Builder's Bonanza
Reply to
Gordon McComb
pics
If you don't want to learn asm, jal is probably the easiest and cheapest = option(free). Jal is a pascal like language. Free, opensource.=20
formatting link
blinking led example=20
formatting link
Best pic.probably 16f877 or 16f877a or one of the 18fs 18f452 or 18f458
For the ultra sonics look on the devantech webpages for example programs
formatting link
For connecting to laptop it depends if it has usb and or serial and = parallel. serial and parallel iseasy to do. serial look at using a max232 or = compatable chip. For usb the ftdi chips make it pretty easy.
One advantage if you know c for the avr chips is there is a free port of = gcc that you can use.
formatting link

Below are some pic and avr links
Here are a few links I have for AVRs
some really nice and easy to use atmega128 control boards. I have used both m128 and mavaric boards. Just gewtting some mavaric2 boards for use as a robot controller.
formatting link

avr robot control boards also free operating system avrx
formatting link
ethernet board
formatting link
os, ethernet, compact flash, etc
Digital voice recorder For a build your own see Atmel app note AVR335.pdf AVR335: Digital Sound Recorder with AVR=AE and DataFlash.
All you need to add is a compact flash interface. 4 see ethernut hardware page for an example of cf.
formatting link

formatting link
for c compiler avr-gcc and tutorials , app notes
other free compiler for avr (I haven't tried it yet) is sdcc (need cygwin to run on windows)
formatting link
older version
formatting link
get the latest version here
first call for programs and software, app notes etc
formatting link
software
formatting link
support tools
formatting link
guitar tuner
formatting link
avr mp3 players
formatting link
mini dds / function = generator
formatting link
dds vfo
formatting link
50MHz frquency = counter
formatting link
temperture controller
formatting link
altimeter and = timers
formatting link
avr amatuer radio projects including 6 channel voltmeter, freq counter, function = generator,dds,beacon keyer
formatting link
midi projects
formatting link
moving message display, displays,
formatting link
mod chip, gps data parser, gps display,
formatting link
avr projects and file archive
formatting link
formatting link
seril port and = lcd
formatting link
avr links page
formatting link
Ham Radio Related Projects including: VFO Counter/Stabilizer and Programmable PLL board
formatting link
POCSAG encoder, AVR Based TNC for APRS, Radio to RS-232 interface
formatting link
servo, stepper, control
formatting link
avr = projects ranging from 3 axis magmetometer, cnc drive,
formatting link
mp3 player, I2C,keyboard driver, printf for lcd, graphic lcd
formatting link
tcpip over ethernet, avr = microkernal
formatting link
avr robot
formatting link
clock, 3 channel dac, rs232 to wireless, wireless frequency meter, rf strength meter, 8 channel pwm,
formatting link
cross assembler 8051 to = avr (not released yet)
formatting link
CAN Remote Automation and Control with = the AVR
formatting link
ultrasonic measurement
formatting link
nixie tube clock (use google to = translate) and other projects
formatting link
tools and code for lots = of diffrerent projects
formatting link
IDE Harddisk = interface for micro controllers
formatting link
telemntry and = datalogging
formatting link
metal detector,
formatting link
avr help works out uart = and port pins etc
formatting link
getting started = with avr
formatting link
getting = started with atmega 128
formatting link
getting started with = gcc on atmega 128
formatting link
projects, lcd , led light chaser, = digital and led thermometers and stepper motor driver
formatting link
control projects via gsm phone, pocketpc to rs232, graphic lcd driver
formatting link
lcd controller
formatting link
gameboy camera interface
formatting link
herky jerky robot
formatting link
formatting link
good information on = AvrTiny.+ examples and RTOS
formatting link
open source embedded systems library
formatting link
electronics, embedded systems and programming pnoyprog, canbus home automation, minithreads
formatting link
formatting link
links for I2C
formatting link
mp3 player using atmega 128
formatting link
formatting link
AVR-Assembler-Tutorial
formatting link
formatting link
projects and realitime os
formatting link
projects lcd, thermometer, clock and libraries = for lcd and one wire
formatting link
dontronics avr pages
formatting link
embedded systems links
formatting link
servo control with avr's
formatting link
avr mp3 player with fat = hdd
formatting link
ethernut , web server etc using avr
RTOS see AVR freaks
ucos
formatting link
nutos
formatting link
other rtos for avr
formatting link

also look at the compiler developer web pages for examples and rtos IAR
formatting link
formatting link
formatting link

pic.
formatting link
shitload of pic info
sdcc free c compiler for pic(beta), 8051 , avr, z80 etc
formatting link
gnu pic pic tools etc for linux, macosx, win etc
formatting link
risc os
formatting link
some simple lcd circuits = and code, voltmeter, adc, stepper driver
formatting link
pic based scope
simmstick boards from dontronics.com
formatting link
expensive for chips good projects for atmel at89c2051 (20 pin 8051 chip)
os's
formatting link
formatting link
has micro specific = examples
mplab com-atable programmer
formatting link
c compiler picant
formatting link
formatting link
Multitasking micro core Posit 1.0 for PIC based systems
formatting link
graphical icon programming
formatting link
corechart
formatting link
java for pic
formatting link
java based pic programmer
formatting link
Aino is a Java bytecodes to PIC assembly language compiler written in = Java
formatting link
flowchart programming flowcode
formatting link
have some good app notes and rf kits)
programmer for 18f series
formatting link
formatting link
pic softare including math routines etc
pic books
formatting link
square one. get thesource code.
easy to use usb-> rs232 adaptor chips
formatting link
windows, mac and linux drivers for the chips are avaialble for free from ftdi.
formatting link
are surface mount but are very easy to handle and solder. They appear to the os as a com port. drivers
formatting link
notes
formatting link
formatting link
sheets
formatting link
formatting link
formatting link
other usb links
formatting link
fastest way is a usb->rs232 cable
formatting link
ones work reliably.
Reply to
Alex Gibson
If you want to use a PIC fairly cheaply, try the Dios chips/boards from Kronos Robotics.
formatting link
I've been satisfied by everything I've gotten there. -- D. Jay Newman
Reply to
D. Jay Newman

PolyTech Forum website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.