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.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
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 (http://www.kronosrobotics.com/), 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:

Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
http://www.labjack.com

Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Blueeyedpop wrote:

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
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

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.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
clement wrote:

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 www.mcselec.com. 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! <g> Seriously, I would consult with the instructor for ideas.
-- Gordon Author: Constructing Robot Bases (Forthcoming) Robot Builder's Sourcebook, Robot Builder's Bonanza
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

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. http://sourceforge.net/projects/jal http://www.voti.nl/jal/index_1.html jhttp://www.voti.nl/jal/doc/exa.html http://www.voti.nl/blink/n_index.html blinking led example http://www.piclist.com/techref/piclist/jal/index.htm http://www.piclist.com/techref/microchip/language/jal/index.htm
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 http://www.robot-electronics.co.uk/shop/Examples.htm
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. www.avrfreaks.com
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. www.bsdmicro.com
avr robot control boards also free operating system avrx http://www.barello.net/index.htm
ethernet board www.ethernut.de 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 and DataFlash.
All you need to add is a compact flash interface. 4 see ethernut hardware page for an example of cf. www.ethernut.de
http://www.avrfreaks.net/ 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) http://sourceforge.net/projects/sdcc/ older version http://sdcc.sourceforge.net / http://sdcc.sourceforge.net/sdcctarbin.html http://sdcc.sourceforge.net/snap.php get the latest version here
first call for programs and software, app notes etc http://www.atmel.com/atmel/products/prod23.htm http://www.atmel.com/atmel/products/prod203.htm software http://www.atmel.com/atmel/products/prod202.htm support tools
http://www.myplace.nu/avr/gtuner/index.htm guitar tuner http://www.myplace.nu/mp3/main2.shtml http://www.myplace.nu/mp3/index2.htm avr mp3 players
http://www.myplace.nu/avr/minidds/index.htm mini dds / function generator
http://www.try-net.or.jp/%7Ejr6end/e/oK.html dds vfo
http://www.myplace.nu/avr/countermeasures/index.htm 50MHz frquency counter
http://www.myplace.nu/avr/thermo/index.htm temperture controller
http://www.geocities.com/CapeCanaveral/6368/index.html altimeter and timers
http://www.qsl.net/zl1bpu/micro/ avr amatuer radio projects including 6 channel voltmeter, freq counter, function generator,dds,beacon keyer
http://www.modulus.wavesynth.com/projects/avr_projects.htm midi projects
http://gheos.com/avr/ moving message display, displays,
http://members.tripod.com/Stelios_Cellar/AVR/my_avr_projects.htm playstation mod chip, gps data parser, gps display, http://come.to/Stelios_Cellar avr projects and file archive http://members.tripod.com/Stelios_Cellar/AVR/2001seminar/seminar.htm
http://www.mysunrise.ch/users/pfleury/avr-circuits.html seril port and lcd
http://www.ipass.net/~hammill/newavr.htm avr links page
http://members.iinet.net.au/~richardh/VK6BRO.htm Ham Radio Related Projects including: VFO Counter/Stabilizer and Programmable PLL board
http://users.rcn.com/carlott/projects.html POCSAG encoder, AVR Based TNC for APRS, Radio to RS-232 interface
http://www.barello.net/AvrProjects/ servo, stepper, control
http://www.openh.org/softwaremap/trove_list.php?form_cat=20 avr projects ranging from 3 axis magmetometer, cnc drive,
http://bray.velenje.cx/avr/ mp3 player, I2C,keyboard driver, printf for lcd, graphic lcd
http://invalid.ed.ntnu.no/~jonah/el/ tcpip over ethernet, avr microkernal
http://www.fictoor.nl/irbot/ avr robot
http://projects.cappels.org/ clock, 3 channel dac, rs232 to wireless, wireless frequency meter, rf strength meter, 8 channel pwm,
http://r.webring.com/hub?ring=avr&id=92&go cross assembler 8051 to avr (not released yet)
http://caraca.sourceforge.net/ CAN Remote Automation and Control with the AVR
http://mikrocontroller.cco-ev.de/en/projekte.php ultrasonic measurement
http://www.spettel.de/nixie/ nixie tube clock (use google to translate) and other projects
http://mikrocontroller.cco-ev.de/en/download.php tools and code for lots of diffrerent projects
http://home.cybervillage.de/heesch/english/ide.htm IDE Harddisk interface for micro controllers
http://www.flyheli.de/english/etelemetrypages.htm telemntry and datalogging
http://r.webring.com/hub?ring=avr&id=44&go metal detector,
http://koti.mbnet.fi/jhappone/fi/avrhelp.html avr help works out uart and port pins etc
http://home.gci.net/~botgoodies/GettingStartedAVR.html getting started with avr http://home.gci.net/~botgoodies/GettingStartedAm128.html getting started with atmega 128 http://home.gci.net/~botgoodies/GCC128Mode.html getting started with gcc on atmega 128
http://home.planet.nl/~meurs274/ projects, lcd , led light chaser, digital and led thermometers and stepper motor driver
http://www.serasidis.gr/ control projects via gsm phone, pocketpc to rs232, graphic lcd driver
http://www.qnet.fi/oalapenttila/protossi/lcd_controller/lcd_controller.htm lcd controller
http://www.frii.com/~dherr/gbcam.html gameboy camera interface http://www.frii.com/~dherr/ herky jerky robot
http://www.ibrtses.com/embedded/avr.html
http://www.mcumaster.com/AVRTiny/index.html good information on AvrTiny.+ examples and RTOS
http://liquorice.sourceforge.net/ open source embedded systems library
http://www.lancos.com/ electronics, embedded systems and programming pnoyprog, canbus home automation, minithreads
http://www.geocities.com/CapeCanaveral/Launchpad/3632 /
http://yusoft.kulichki.com/english/pic/index.htm links for I2C
http://www.mpfreezone.com/body_index.html mp3 player using atmega 128 http://www.mpfreezone.com/Player/Hardware/hardware.html
http://www.avr-asm-tutorial.net/ AVR-Assembler-Tutorial
http://www.angelfire.com/clone/plc/index.html
http://utenti.lycos.it/dcg/avr.html projects and realitime os
http://www.microsyl.com/ projects lcd, thermometer, clock and libraries for lcd and one wire
http://www.dontronics.com/atmel.html dontronics avr pages
http://micro.filetap.com/ embedded systems links
http://www.drolez.com/hardware/ servo control with avr's
http://geocities.com/pieterconradie007/mp3.htm avr mp3 player with fat hdd
http://www.ethernut.de/index.html ethernut , web server etc using avr
RTOS see AVR freaks
ucos http://www.ucos-ii.com/contents/products/ucos-ii/ports-misc.html
nutos http://www.ethernut.de/en/software.html
other rtos for avr http://www.google.com/search?sourceid=mozclient&ie=10646&oe=10646&q=avr+rtos
also look at the compiler developer web pages for examples and rtos IAR http://www.iar.com / Imagecraft http://www.imagecraft.com / Bascom http://www.mcselec.com/download_avr.htm
pic.
www.piclist.com shitload of pic info
sdcc free c compiler for pic(beta), 8051 , avr, z80 etc http://sdcc.sourceforge.net /
gnu pic pic tools etc for linux, macosx, win etc http://gputils.sourceforge.net / http://www.gnupic.org / http://www.geocities.com/gnupic / http://homepages.ihug.co.nz/~jamjars/michael/software.html risc os
http://www.geocities.com/mindtan2000/PIC.html some simple lcd circuits and code, voltmeter, adc, stepper driver
http://www.bitscope.com/ pic based scope
simmstick boards from dontronics.com www.dontronics.com expensive for chips good projects for atmel at89c2051 (20 pin 8051 chip)
os's http://homepages.ihug.co.nz/~jamjars/michael/software.html http://www.geocities.com/SiliconValley/Network/3656/posit/posit.html
http://www.myke.com/lcd.htm http://home.iae.nl/users/pouweha/lcd/lcd.shtml has micro specific examples
mplab com-atable programmer http://www.newfoundelectronics.com/warp-13a.htm
c compiler picant www.picant.com http://www.picant.com/c2c/c.html http://www.picant.com/c2c/libraries.html http://www.picant.com/c2c/examples.html Multitasking micro core Posit 1.0 for PIC based systems http://www.picant.com/posit/posit.html
graphical icon programming www.elabtronics.com corechart http://www.elabtronics.com/products_cat_CoreChart.htm http://www.elabtronics.com/resources_downloads.htm
java for pic
http://robots.net/article/679.html java based pic programmer http://jpictools.sourceforge.net /
Aino is a Java bytecodes to PIC assembly language compiler written in Java http://personal.eunet.fi/pp/jokinen /
flowchart programming flowcode http://www.rentron.com/Flowcode.htm (renetron have some good app notes and rf kits)
programmer for 18f series http://members.naspa.net/djs/software/pic18f.html
http://www.dattalo.com pic softare including math routines etc
pic books http://www.sq-1.com square one. get thesource code.
easy to use usb-> rs232 adaptor chips http://www.dontronics.com/dlp.html The windows, mac and linux drivers for the chips are avaialble for free from ftdi. http://www.ftdichip.com/FTDriver.htm They are surface mount but are very easy to handle and solder. They appear to the os as a com port. drivers http://www.ftdichip.com/FTDriver.htm app notes http://www.ftdichip.com/FTApp.htm schematics http://www.ftdichip.com/FTSchema.htm data sheets http://www.ftdichip.com/FTProduct.htm http://www.dontronics.com/dlp.html http://www.dontronics.com/giga.html
other usb links http://www.lvr.com/usb.htm http://www.beyondlogic.org/usb/ftdi.htm The fastest way is a usb->rs232 cable http://www.dontronics.com/usb_232.html these ones work reliably.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Alex Gibson wrote:

If you want to use a PIC fairly cheaply, try the Dios chips/boards from Kronos Robotics.
http://www.kronosrobotics.com/
I've been satisfied by everything I've gotten there. -- D. Jay Newman
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

Polytechforum.com is a website by engineers for engineers. It is not affiliated with any of manufacturers or vendors discussed here. All logos and trade names are the property of their respective owners.