Go to Post You can make unfounded guesses, but chances are you'll come off looking like a moron. Let's try and avoid that. - Karthik [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 26-02-2004, 13:13
chei_UCF19 chei_UCF19 is offline
Registered User
no team
 
Join Date: Feb 2004
Location: orlando
Posts: 3
chei_UCF19 is an unknown quantity at this point
Unhappy laser radar with BS2p using RS232 problems...

Hi, we're building an autonomous LADAR guided vehicle for my Senior Design team, and we're using a H.O.B. laser radar unit for our guidance. It talks to the BS2p via the RS-232 port...

the H.O.B. is programmed so that it will output data when 2 "R"'s is inputted from the keyboard (this was when we were testing it using HyperTerminal)... the data will be a single byte, and is the range value, in the form 1-9,A-Z... meaning 1=1foot, 9=9feet, A=10feet, Z=36feet... etc...

the H.O.B. unit transmission rate is 9600kbps and is using standard RS-232...
The input voltage of the HOB itself from 5V to 9V

However, the BS2p is not reading anything from the HOB when we attached it to the board's RS-232 port... We are testing this by connecting the HOB to board1 and have board1 read the data from the HOB, and send it to another BS2p board (board2) using port1. Board2 is then connected to the PC using the RS-232 port, allowing us to debug the incoming data.

here is the code that we used:

-------------------------------------------------------------------------
'{$STAMP BS2p}
'BOARD1

OutData VAR BYTE
Bmode CON 16604 'Baudemode for 9600kbps
Rpin CON 16 'RS-232 pin#
Tpin CON 1 'port1
Pace CON 500 'wait time
BigR CON 82 'DEC value of "R" in ascii


Loop

SEROUT Rpin, Bmode, [BigR] 'Sends "R" to HOB
SEROUT Rpin, Bmode, [BigR] 'Sends "R" to HOB

'I think the problem is here... when the board sends out the
'second R, is the "serin" in the next line able to recieve the
'incoming data from the HOB in time? Take note, it's using the
'same port, port 16 (RS-232) for this...

SERIN Rpin, Bmode, [OutData]
'Gets RANGE value from HOB, store in "OutData"
SEROUT Tpin, Bmode, [OutData]
'Send "OutData" out from Port1 to board2
WAIT Pace

GOTO Loop


--------------------------------------------------------------------------

Here is the code for Board2:

--------------------------------------------------------------------------
'{$STAMP BS2p}
'BOARD2

InData VAR BYTE
Bmode CON 16604 'Baudemode for 9600kbps
Tpin CON 1 'port1
Pace CON 500 'wait time




SERIN Tpin, Bmode, [InData]
'Gets value from board1, store in "InData"
DEBUG InData, CR
WAIT Pace

-------------------------------------------------------------------------
I also ran another test, without having to use the 2 boards... this time, I also connected board1 to the RC car we're using as a base... board2 was not used.

here is the code:

--------------------------------------------------------------------------
'{$STAMP BS2p}

SerData VAR BYTE
Bmode CON 16604
Rpin CON 16
Tpin CON 1
Pace CON 500
BigR CON 82
LittleR CON 114


Loop
SEROUT Rpin, Bmode, [BigR] 'Sends "R" to HOB
SEROUT Rpin, Bmode, [BigR] 'Sends "R" to HOB

SERIN Rpin, Bmode, [SerData] 'Stores HOB data to "SerData"
IF SerData>0 THEN Steer

GOTO Loop

Steer:
PULSOUT 0, 1100
PAUSE 1000
PULSOUT 0, 1900
PAUSE 1000

GOTO Loop

-------------------------------------------------------------------------
The PWM values under the "Steer" label have been tested to move the servo motor... but once again, nothing is happening... and we made sure that the HOB was pointing to an object that was atleast 4feet away....


Please help... when we run the DEBUG menu from board2, we're not getting any value at all. We have discussed this with parallax tech support, and they suggested that we might need to get a line driver, because the problem might be the voltage difference between the HOB and the board... but the HOB is using standard RS-232...



Thanks for taking the time to read this looong post... Any suggestion would be most appreciated!!!
  #2   Spotlight this post!  
Unread 26-02-2004, 13:57
Astronouth7303's Avatar
Astronouth7303 Astronouth7303 is offline
Why did I come back?
AKA: Jamie Bliss
FRC #4967 (That ONE Team)
Team Role: Mentor
 
Join Date: Jan 2004
Rookie Year: 2004
Location: Grand Rapids, MI
Posts: 2,071
Astronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud of
Re: laser radar with BS2p using RS232 problems...

icks up jaw: YOUR USING LAST YEAR'S RC???? Dude, you didn't have to ship the RC. Or use the EDU. Anyways, This is my first year, so I don't even know the language.
  #3   Spotlight this post!  
Unread 26-02-2004, 14:04
chei_UCF19 chei_UCF19 is offline
Registered User
no team
 
Join Date: Feb 2004
Location: orlando
Posts: 3
chei_UCF19 is an unknown quantity at this point
Re: laser radar with BS2p using RS232 problems...

oh no no ^_^;; ... this is for Senior Design, it's a required course for undergraduate Engineering majors in UCF... and this is the project that our sponsor wanted us to build... we've been having problems getting the HOB and the BS2p to communicate and I've used up my resources, so I'm looking for websites, like this one, "FIRST", that deals with robotics and has people with pbasic experience that might be able to offer suggestions to fix our problem... It's interesting that a similar robot was built last year, as you have mentioned... I think the main difference with our car is the H.O.B. unit
  #4   Spotlight this post!  
Unread 26-02-2004, 14:09
Random Dude Random Dude is offline
Oregon State Head FTA
AKA: Chris
no team (Oregon Robotics Tournament & Outreach Program)
 
Join Date: Aug 2002
Rookie Year: 1998
Location: Oregon
Posts: 142
Random Dude will become famous soon enoughRandom Dude will become famous soon enough
Re: laser radar with BS2p using RS232 problems...

Hmm.. Looking at the pinout of the BS2p, the RS232 pins appear to be 1 and 2. If I'm mistaken let me know and I'll keep trying to help...
  #5   Spotlight this post!  
Unread 26-02-2004, 14:10
Astronouth7303's Avatar
Astronouth7303 Astronouth7303 is offline
Why did I come back?
AKA: Jamie Bliss
FRC #4967 (That ONE Team)
Team Role: Mentor
 
Join Date: Jan 2004
Rookie Year: 2004
Location: Grand Rapids, MI
Posts: 2,071
Astronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud of
Re: laser radar with BS2p using RS232 problems...

OK, this year was a big change. THEY UPGRADED THE CONTROL SYSTEM. Biggest differences: Faster, More Memory, and uses C. See IFI's site for more details
  #6   Spotlight this post!  
Unread 26-02-2004, 15:04
Madison's Avatar
Madison Madison is online now
Dancing through life...
FRC #0488 (Xbot)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1999
Location: Seattle, WA
Posts: 5,243
Madison has a reputation beyond reputeMadison has a reputation beyond reputeMadison has a reputation beyond reputeMadison has a reputation beyond reputeMadison has a reputation beyond reputeMadison has a reputation beyond reputeMadison has a reputation beyond reputeMadison has a reputation beyond reputeMadison has a reputation beyond reputeMadison has a reputation beyond reputeMadison has a reputation beyond repute
Re: laser radar with BS2p using RS232 problems...

I think they understand that controller for the FIRST Robotics Competition is different this season than last, but many of us still have experience with the Basic Stamp chipset and its programming language. It is being used for a project that has nothing to do with FIRST so the hardware used is at their discretion.

If you let this thread sit for a bit, you'll likely find some help -- though keep in mind that you've caught us all at a very busy time.

Also, if you're not yet aware, the University of Central Florida has a team that participates in FIRST -- and many of its members participate here as well. Maybe you can get in touch with them and seek their assistance.
__________________
--Madison--

...down at the Ozdust!

Like a grand and miraculous spaceship, our planet has sailed through the universe of time. And for a brief moment, we have been among its many passengers.
  #7   Spotlight this post!  
Unread 26-02-2004, 15:21
chei_UCF19 chei_UCF19 is offline
Registered User
no team
 
Join Date: Feb 2004
Location: orlando
Posts: 3
chei_UCF19 is an unknown quantity at this point
Re: laser radar with BS2p using RS232 problems...

yeah, we have NOTHING to do with the FIRST robotics competition that goes on yearly... and M. Krass is absolutely correct.

As for the problem with the BS2p and the HOB, the missing key is the buffer, as I have discovered... I did some more research, and others have had the same problem that we're having... there has to be buffering between the two. Thanks for all of your time, and I wish you all the best of luck with your competitions!
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 18:23.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi