Shop OBEX P1 Docs P2 Docs Learn Events
Help? Wireless data transfer from PC to BS2 — Parallax Forums

Help? Wireless data transfer from PC to BS2

FungusOpusFungusOpus Posts: 4
edited 2008-11-14 23:35 in BASIC Stamp
Hello,

I'm involved in a project building a small vehicle (looks kinda like a skateboard) that is controlled by a BASIC stamp 2 on a Board of Education (USB). As part of the project, we have a Visual Basic .NET program running on a computer that calculates some data to be used by the vehicle as it operates. How can I easily get this data sent from the VB.NET program to the BS2?

I would prefer to do it wirelessly, but we can't use the eb500 because it would use up too many I/O pins that we need for other components. We're likely using the Memory Stick Datalogger in order to store data via USB, so I'd assume that the goal is to get the required data from the VB.NET program (on the separate PC) to the USB memory attached to the BS2 (on the vehicle)... but what's the best way? Can I go wireless via Bluetooth some other way, or should I resort to a cable connection? And what will I need?

Thanks in advance, any advice will be extremely helpful.

Comments

  • SRLMSRLM Posts: 5,045
    edited 2008-11-11 06:41
    You can use some other form of wireless link besides the bluetooth module. Parallax sells some transmitters and recievers, and Sparkfun.com has quite a selection. The easiest way would probably be to have a base station uC to interface between the serial RF module and the COM port on the computer (which the VB program would read.)
  • FungusOpusFungusOpus Posts: 4
    edited 2008-11-14 07:05
    I took a look around at the Parallax and Sparkfun products, but I really don't know what will work or how to set things up. Could I get a step-by-step on what I need to do?
  • SRLMSRLM Posts: 5,045
    edited 2008-11-14 07:59
    Since your computer can't read serial strings (at least, not without a whole lot of work), you'll need a couple of things:

    A BS2 (or other uC) on the transmitter side.
    A transmitter

    A receiver
    A BS2 (or other uC) on the reciever side.
    A wire to the computer
    A computer


    The above listing also demonstrates the flow of information. Bottom up for Computer to robot, top down for robot to computer. For transmitters/recievers (transcievers would also work for bidirectional communication) look for something that takes serial strings and outputs serial strings. If I'm not mistaken, most of those at sparkfun do that, and the parallax ones do too (and are well documented for the BS2).

    You'll have to figure out how you want to get data between the base station (connected by wire) to the computer: as I said, you can use a COM port function in VB (I have no idea how to do this...) or you can get your program to interact with the debug terminal.
  • sylvie369sylvie369 Posts: 1,622
    edited 2008-11-14 11:47
    This is the site that I found the most useful for getting started with VB serial communications with a BS2:

    www.theabramgroup.com/basicstamp/

    Alternatively, you might want to look at the PLX-DAQ software here:

    www.parallax.com/tabid/441/Default.aspx

    In your case, you'd communicate with a BS2 which was connected to a transmitter, which would communicate with your robot through a receiver mounted there. If you do this, set it up with JUST the transmitter on one BS2 and the receiver on another, and get those communicating first. Then figure out how to send the data through VB and a serial cable to the transmitting BS2. Then put the pieces together.
  • FungusOpusFungusOpus Posts: 4
    edited 2008-11-14 23:22
    Thanks a lot.

    Now, I've been looking at the Parallax RF Transmitter/Receiver documentation. The receiver has five pins, but in the connection diagram only one appears to be marked as going into an I/O pin. So does the receiver only require one I/O pin and not five? (I've confirmed with my project group that our BS2 only has 3 I/O pins left.)

    We can't obtain another BASIC stamp, so I think the transmitter needs to connect to the computer. The Parallax page mentions the following: This device can be connected to a PC serial port using a MAX232 line driver. The circuit isn't supported by Parallax, but it's possible to make this connection with a few dollars of parts. I'm not sure what this means... What are these parts, and will I need them?
  • sylvie369sylvie369 Posts: 1,622
    edited 2008-11-14 23:35
    The receiver requires only one I/O pin. It's simply asynchronous serial data. The five pins are

    +5v power
    Ground
    Serial data in
    a special powerdown pin to enter a low power mode (you don't need to mess with this at all)
    a received signal strength indicator pin that puts out an analog signal indicating how strong the received signal is. You don't need to touch this one either.

    It'll only require one Stamp I/O pin, as you hoped.
Sign In or Register to comment.