Shop OBEX P1 Docs P2 Docs Learn Events
I hate to ask this... — Parallax Forums

I hate to ask this...

Richard D.Richard D. Posts: 14
edited 2008-08-29 14:34 in General Discussion
I hate to Ask but I could not help my self the price was to good to pass up. I picked up a VEX ultrasonic unit and an optical encoder unit. Hey there were on sale $5.00 each. So I got weak as much I thought it might be a bad idea giving cash to VEX but I could not pass it up.
Any ways before I start tearing into these and trying to figure out how to make them work with a Parallax Boe-Bot unit I thought I could save myself a little head ach and ask you guy on this board for some ideas. Because we all know the kids over there at the V place don’t really have a clue as to what do with out a remote in there hands. Not that I am bitter towards Vex or anything I just cant stand the Idea of parents and kids be taken for a ride is all.


Any Help at all Rich D.

Comments

  • Jon WilliamsJon Williams Posts: 6,491
    edited 2006-03-14 06:29
    Perhaps the folks at Vex would be good enough to provide technical support for their products -- after all, if they're building sensors one would assume they have interfacing information for the broad range of microcontrollers (including the BASIC Stamp) that one might use.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
  • Richard D.Richard D. Posts: 14
    edited 2006-03-14 06:56
    No Luck so far from them if I only knew who them were........

    Thank you for you're input Sir this is by far the best support one could ever ask for from a company. I have had nothing but fun and good luck with the items I purchased from Parallax I plan buying some more bs2's later this summer for a project I have in mind.



    Richard D..
  • Paul BakerPaul Baker Posts: 6,351
    edited 2006-03-14 13:56
    There is a forum for them, if you look for a thread in the Robotics forum about VEX servos, towards the bottom of the thread is a link to thier forums, it is not the same as the chat room on thier main website. Thier forum is setup as moderated answer only, only company employees are able to answer peoples questions, no way for the community to answer other peoples questions (except in that seperate chat forum, and thats practically dead).

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·1+1=10
  • Kenny GardnerKenny Gardner Posts: 169
    edited 2006-03-14 21:28
    The Ultrasonic Range Finder is a Daventech SRF-04. So, despite some of the·comments, Parallax does have a lot of info on how to interface that particular Vex sensor to a Stamp.

    Kenny
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2006-03-14 22:14
    If that Vex sensor is indeed an SRF-04, then yes, we have documentation for using it. I even wrote about that sensor in my Nuts & Volts column some time back. Just be sure to use a low-numbered pin for the echo (P0 is best), as this requires the shortest setup time and can get ready before the SRF-04 responds. In the Ping design we added a slight hold-off from the trigger pulse to allow slower micros like the BS1 to use the Ping.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
  • Richard D.Richard D. Posts: 14
    edited 2006-03-15 03:14
    Okay Now I can stick my foot in my mouth for I am a dork No answer from VEX site Well that would be because said dork (ME) posted to the work place thank for the correct place to look Paul. And thank you Kenny for what the sonar unit was base on. She works good . Now soon I shall be rid of the sunks, coons and rat's and such on my new farm it is getting old Having my German Sheperd's bring the treat's home to Dad and Mom to show us what a good job they have done.

    Thank you to all the responded, and now to figure out how the optical encoders work. Perhaps I shall write to correct place at vex after I eat my humble pie.


    Richard
  • pcrobotpcrobot Posts: 103
    edited 2006-03-15 13:01
    I know a guy on The Robotics Club of Yahoo! used a VEX ultrasonic unit on his BOE-Bot... sometime in December '05, I think.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Robotics
    ro-bot-ics (noun)
    the science or technology of robots, their design, manufacture, application, use, etc.
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2006-03-15 13:52
    It is really awkward, but robotics for learners is really only as good as the support.
    Knowledgible people that can explain things are harder to come by. After all silicon is just 20 cents worth of sand, right?

    It really doesn't matter how great the hardware is if no one can tell you how to use it.

    Of course when the hardware is great and the support is great, all is well.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "When all think alike, no one is thinking very much.' - Walter Lippmann (1889-1974)

    ······································································ Warm regards,····· G. Herzog [noparse][[/noparse]·黃鶴 ]·in Taiwan

    Post Edited (Kramer) : 3/16/2006 8:14:40 AM GMT
  • Kenny GardnerKenny Gardner Posts: 169
    edited 2006-03-15 20:39
    If that Vex sensor is indeed an SRF-04

    Yup. The first thing I did with all my Vex stuff was take them apart and sure enough, the Sonar is just an SRF-04 Range Finder in a fancy case. So, for that reason, I didn't buy any more cause I've got enough Daventech's and Pings (but they don't have fancy housings smilewinkgrin.gif ).

    ·
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2006-03-15 20:41
    I wonder when those fancy housings are going to come with fancy support! tongue.gif·· I had a look at the web site and there seems to be no actual technical documentation for the sensor, e.g., input/output behavior.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
  • Richard D.Richard D. Posts: 14
    edited 2006-03-16 06:59
    Well the code needed a little tweaking but the unit is up and running so for 5 bucks what the heck and I get a cool housing to boot .


    Thanks again for the help.

    Richard D
  • Kenny GardnerKenny Gardner Posts: 169
    edited 2006-03-16 20:55
    Jon,

    The docs come with the Sensor.

    You can't use this sensor with the Vex unless you buy the $100 programming kit. Which makes sense cause it requires programming to read the input. But, it works just fine with the Stamp.

    But, the docs don't tell you how to use it! They just describe what it does and how the speed of sound works and all that.

    Kenny
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2006-03-16 22:40
    ... "the docs don't tell you how to use it!"· Wow, sounds like a great deal! tongue.gif· Oh well, you've got it working now and that's all that matters.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
  • MobSyMobSy Posts: 1
    edited 2006-03-25 16:12
    (For the rest of us who are wondering how this could be done!!!)
    I just tried using VEX ultrasonic range finder with BSII and it is working (forgive me if I do not use proper terms I am actually a medical doctor.) Here is what I did

    Notes:
    I have Basic Stamp II homework board
    In following steps VDD, VSS, P0 and P1 are on Basic Stamp II board, while input/output are VEX sensor lead ends

    Process:
    1. Connected VDD to Red wire on Input
    2. Connected VDD to Red wire on Output
    3. Connected VSS to Black wire on Input
    4. Connected VSS to Black wire on Output
    5. Connected a wire from P1 to Input Yellow wire (for start measurement command)
    6. Connected a wire from P0 to Output Orange wire (for PULSIN command to check the pin state, sensor will keep this pin high as long as it does not get the echo back, don't know what will happen if echo never returns)
    7. This is all what needs to be done, see the image below (hope it makes sense)

    Now we need to write this program (frankly it is mostly a copy paste from http://www.acroname.com/robotics/info/examples/srf04-1/srf04-1.html site with a few modifications)

    '{$STAMP BS2}
    '{$PBASIC 2.5}
    '
    ' Devantech SRF04 Example
    '
    
    wDist VAR Word
    wFeet VAR Word
    wRemInches VAR Word
    INIT CON 1
    ECHO CON 0
    
    ' CONVERSION FACTORS:
    '
    ' The PULSIN command returns the round-trip echo time in 2us units
    ' which is equivalent to the one-way trip time in 1us units.
    '
    ' distance = (echo time) / (conversion factor)
    '
    ' use 74 for inches (73.746us per 1 in)
    ' use 29 for centimeters (29.033us per 1 cm)
    '
    
    convfac CON 74 ' use inches
    
    
    '---------------------------------------------
    
    main:
    
            GOSUB sr_sonar
            wFeet = wDist / 12
            wRemInches = wDist - (wFeet * 12)
            DEBUG HOME, DEC wDist, " Inches ", DEC wFeet , " Feet ", DEC wRemInches, " Inches"
            PAUSE 200
            GOTO main
    
    
    sr_sonar:
    
            PULSOUT INIT,5 ' 10us init pulse
            PULSIN ECHO,1,wDist ' measure echo time
            wDist=wDist/convfac ' convert to inches
            PAUSE 10
            RETURN
    
    sr_sonar_2:
    
            PULSOUT INIT,5 ' 10us init pulse
            OUTPUT INIT ' dummy command (delay)
            RCTIME ECHO,1,wDist ' measure echo time
            wDist=wDist/convfac ' convert to inches
            PAUSE 10
            RETURN
    
    



    It is working for me, let me know if you have any questions

    Post Edited (MobSy) : 3/25/2006 4:22:54 PM GMT
    324 x 243 - 34K
  • rybitskirybitski Posts: 7
    edited 2007-12-05 03:44
    I know that parallax makes a "digital encoder" and they have a lot of support for it, but with only 8 "ticks" it is just not accurate enough (and you have to use the stock wheels).

    The problem:
    I have 2 vex optical encoders (90 ticks per rotation) and I am trying to figure out how write the program for them to work. I tried using the provided sample code and calibrations from parallax but since the vex encoder has 90 ticks per rotation instead of 8 it doesn't really work. I am COMPLETELY new to programming with basic and it is very confusing to me right now. I just need to know how to write a program to have motor 1 spin for 1 rotation (90 ticks). Can anyone help me with this program? Any help would be GREATLY appreciated! Thank you.
  • steve_bsteve_b Posts: 1,563
    edited 2007-12-05 17:29
    You might first try understanding your Stamp first.
    Parallax is good enough to allow you to download many of their published books from their website.
    The best one to start with is "What's A Microcontroller". I think everyone has faired well after they've had the chance to go through this book.

    Give that a try and you'll be better off for it...especially if you're going to continue using the Stamp in future projects!

    CHeers

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    <FONT>Steve



    What's the best thing to do in a lightning storm? "take a one iron out the bag and hold it straight up above your head, even God cant hit a one iron!"
    Lee Travino after the second time being hit by lightning!
  • DufferDuffer Posts: 374
    edited 2008-08-27 22:56
    http://www.superdroidrobots.com/product_info/SRF04.htm

    Simple Google search on "SRF04". Real rocket science!

    Duffer
  • FranklinFranklin Posts: 4,747
    edited 2008-08-28 01:17
    www.acroname.com/examples/10019/10019.html

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Stephen
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2008-08-29 14:34
    Sorry guys…James’ messages keep getting deleted because he keeps cross posting. He has already posted this question in another forum.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Engineering
Sign In or Register to comment.