Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   Getting Fancy with Sensors (http://www.chiefdelphi.com/forums/showthread.php?t=26422)

ultramrw21 07-03-2004 21:35

Re: Getting Fancy with Sensors
 
Our team really hasn't found that much use in a lot of sensors, all we have is a photovoltic at the bottom of the robot. Thats really all we needed.

KenWittlief 07-03-2004 23:33

Re: Getting Fancy with Sensors
 
Quote:

Originally Posted by ultramrw21
Our team really hasn't found that much use in a lot of sensors, all we have is a photovoltic at the bottom of the robot. Thats really all we needed.


how successfull has your auton mode been so far this year? what % of the time are you getting the release ball down, or whatever your primary auton objective is?

velocipenguin 08-03-2004 02:43

Re: Getting Fancy with Sensors
 
Quote:

Originally Posted by jacob_dilles
for next year im working right now on a pic16F84...

Might I suggest switching to a PIC 16F628? It has almost the same pinout as the 16F84 and can be programmed with the same hardware, but has a hardware USART, D/A conversion, more I/O lines, and a lot more program memory. For some reason, it's also cheaper.

Quote:

Originally Posted by jacob_dilles
...in basic (yea i know; shush up) to integrate the gyros (2x) 2 banner sensors (for the wheels) and a compass.

I rather suspect a 16F84 will choke on something that complex. You won't be able to use interrupts to deal with the wheel encoders, because the 16F84 only has one external interrupt line. Are you using digital gyros, or analog ones with a pile of serial ADCs?

ultramrw21 08-03-2004 18:51

Re: Getting Fancy with Sensors
 
Actuallly, we've been very successful. We have been able to knock off both 10 point balls. The photovoltic sensor reads the white line right in front of the balls. The only obstacle is making sure the drivers that set the robot before a match know the exact angle at which to set it.

jacob_dilles 08-03-2004 19:09

Re: Getting Fancy with Sensors
 
Quote:

Originally Posted by velocipenguin
Might I suggest switching to a PIC 16F628? It has almost the same pinout as the 16F84 and can be programmed with the same hardware, but has a hardware USART, D/A conversion, more I/O lines, and a lot more program memory. For some reason, it's also cheaper.
I rather suspect a 16F84 will choke on something that complex. You won't be able to use interrupts to deal with the wheel encoders, because the 16F84 only has one external interrupt line. Are you using digital gyros, or analog ones with a pile of serial ADCs?

as i have it now, there are 3 protoboards, 2 wirewraps and a white breadboard with 2 pic 16f84's (one intrupts per) and a basic stamp 2. its tearably iniffecent, and can only be polled about twice a second.

i am extrealy eager to learn how to do anything else, but im stuck here with a bunch of mechanic-style guys and a zero tollerence electronics budget. at home i have a MEL "Epic" programer and the Pic Basic Pro software... http://www.melabs.com/ any advice on better pics would be GREAT. 16f628 i will look into tonight. much thanks...

Astronouth7303 09-03-2004 13:51

Re: Getting Fancy with Sensors
 
You do know that you didn't have to ship the RC with the bot, right? Even if you did, You could still use the EDU. Plus, the EDU doesn't need 10 pounds of stuff to turn on

FadyS. 09-03-2004 14:54

Re: Getting Fancy with Sensors
 
Quote:

Originally Posted by Astronouth7303
You do know that you didn't have to ship the RC with the bot, right? Even if you did, You could still use the EDU. Plus, the EDU doesn't need 10 pounds of stuff to turn on

We didn't ship the RC. However, we need a 12V battery to start it. Can we use a car battery just for testing purposes or should we buy a 12V battery for the bot?

Random Dude 09-03-2004 15:20

Re: Getting Fancy with Sensors
 
Quote:

Originally Posted by FadyS.
We didn't ship the RC. However, we need a 12V battery to start it. Can we use a car battery just for testing purposes or should we buy a 12V battery for the bot?


Any 12v battery will work. Though, I'd be sure to put a fuse on it "Just in case"...

Ryan M. 09-03-2004 15:30

Re: Getting Fancy with Sensors
 
Quote:

Originally Posted by Astronouth7303
You do know that you didn't have to ship the RC with the bot, right? Even if you did, You could still use the EDU. Plus, the EDU doesn't need 10 pounds of stuff to turn on

I knew it, but I wasn't there the day they shipped the robot and it left, carrying the RC with it. At least we were 'done' with our programming... ;)

jacob_dilles 09-03-2004 16:37

Re: Getting Fancy with Sensors
 
Quote:

Originally Posted by FadyS.
Hi, we're a rookie team and we're not done autonomous mode, but since we have over 3 weeks until our regional, I'm taking the time to work on autonomous mode. Now, I don't want to go overboard with sensors for autonomous but I want to know what kind of stuff is available at a local Radioshack that may be useful to autonomous. I already picked up a few switches and a potentiometer. I may pick up another potentiometer though. Also, I might pick up a few infrared phototransistors. Are these analog or digial sensors? Any other neat gizmos to pick up? I've got to admit, I love playing around with all these sensors. Hehe, "Captain, sensors are picking up a spatial anomoly! We should shut down the warp drive!!!" lol. :p

ALL switches = digital (well not exactly, theres resistor switch chains...)
potentiometer = analouge
phototransistors = digital
*other toys you can get at the shack*
photoresistors / css cells = analouge
opto-couples = digital
current sensors (K.O.P.) = analouge
gyro chip (K.O.P.) = analouge
hall effect sensor = digital

any questions on how any of these work or how to code them feel free to ask me (pm, aim, msn, icq, irc... lol)

jamapor 09-03-2004 21:06

Re: Getting Fancy with Sensors
 
Quote:

Originally Posted by Texan
Yeah, it works fine, I just don't like them because of the relative unreliabilty of them. For instance, it's impossible for us to autonomously make it up onto the platform and turn toward the bar because we bounce some. At least with gyros, they don't mess up if a wheel slips or you get hit from the side or something like that.

Anyway, encoders do work. :)

We use the ultra-sonic sensors to travel to the stairs, the gyro's to detect when we reach the stairs, and then wheel encoders while we move up the stairs. It takes the un-reliability of the ultra-sonic sensors out when we move up the stairs by using the wheel encoders.

FadyS. 09-03-2004 21:36

Re: Getting Fancy with Sensors
 
Quote:

Originally Posted by jamapor
We use the ultra-sonic sensors to travel to the stairs, the gyro's to detect when we reach the stairs, and then wheel encoders while we move up the stairs. It takes the un-reliability of the ultra-sonic sensors out when we move up the stairs by using the wheel encoders.


Well, we've pretty much finalized our autonomous mode setup and we've written up the code. These are the following "sensors" we're using:

2 * Optical Sensors
3 * Infrared Sensors
2 * Potentiometers
4 * Current Sensors
2 * Switch

Now, I've tried to make sure that the autonomous mode code is full proof so that it will work even given the mechanical imperfections of our bot such as drift and motor backdriving. Essentially, it should be plug and play or at least I hope it should. Programming for Windows is one thing but programming for a robot is a completely different animal . Being a rookie team, none of know if anything we do will work. We sent in the bot 95% complete.

I commented for almost every single line of code and I wrote up an "Autonomous Mode Manual" so that I can very quickly figure out problems if any do arise. I've broken down autonomous mode into a 6 stage process with feedback so we would know which stage the robot is executing.

Ryan M. 10-03-2004 07:04

Re: Getting Fancy with Sensors
 
Quote:

Originally Posted by jamapor
We use the ultra-sonic sensors to travel to the stairs, the gyro's to detect when we reach the stairs, and then wheel encoders while we move up the stairs. It takes the un-reliability of the ultra-sonic sensors out when we move up the stairs by using the wheel encoders.

I like it. Can I have your robot? ;)

velocipenguin 10-03-2004 11:51

Re: Getting Fancy with Sensors
 
Quote:

Originally Posted by jacob_dilles
i am extrealy eager to learn how to do anything else, but im stuck here with a bunch of mechanic-style guys and a zero tollerence electronics budget. at home i have a MEL "Epic" programer and the Pic Basic Pro software... http://www.melabs.com/ any advice on better pics would be GREAT. 16f628 i will look into tonight. much thanks...

Just so you know, Microchip offers free samples of many of their parts (including microcontrollers) through their web site. It's a great way to get small numbers of PICs for prototyping or experimental purposes.

ngreen 10-03-2004 12:02

Re: Getting Fancy with Sensors
 
Quote:

Originally Posted by velocipenguin
Just so you know, Microchip offers free samples of many of their parts (including microcontrollers) through their web site. It's a great way to get small numbers of PICs for prototyping or experimental purposes.

Yeah, they mailed me a couple 18F8520 PICmicroŽ microcontrollers from Thailand for free. Haven't had time to play with them yet though.


All times are GMT -5. The time now is 21:52.

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