Shop OBEX P1 Docs P2 Docs Learn Events
RS232 to Bluetooth dongle for the S2 — Parallax Forums

RS232 to Bluetooth dongle for the S2

Freak C.Freak C. Posts: 5
edited 2011-04-14 17:42 in Robotics
I am working on a Logo interpreter to control the S2, and I want to have the S2 work as a Logo turtle, with the S2 immediately reacting to all Logo commands.

So far, so good. A small interpreter inside the S2 carries out all Logo commands that the Logo interpeter sends. But it would be much better if the S2 was disconnected from the serial cable :smile:

Looking at stuff like the Sparkfun Bluetooth modem (http://www.sparkfun.com/products/8495), I found that at least some of them can be powered through pin 9 of the DB-9 connector. I must admit that I am unable to read the schematics of the S2 correctly. Can someone tell me if pin 9 of the S2's DB-9 connector provides enough oomph to power such a dongle, if at all?

Has anyone already experimented with these dongles? The operating environments will be schools etc, so open PCBs or soldering is not an option. The dongle should be student-proof.

Comments

  • ercoerco Posts: 20,256
    edited 2011-04-06 08:40
    The existing Fluke/IPRE board was made for the original Scribbler, and was used extensively in schools. Has Bluetooth and a camera, and uses the DB9/serial connector. It is supposedly compatible with S2, and is probably the single reason why S2 kept the serial connector instead of going USB.

    http://wiki.roboteducation.org/Hacking_the_Fluke
  • NikosGNikosG Posts: 705
    edited 2011-04-06 11:10
    Hi Freak C.,
    This is very interesting! It would be fantastic if you could achieve this challange with LOGO!
    This problem obsess my mind for a long time and I'm trying to gather information in order to buy the appropriate hardware and have a proper solution.
    From the information I have seen until now, the problem to load wirelessly a single command could be similar with the problem of Programming the Propeller Wirelessly.
    For this problem Parallax's technician and programmers have given an answer.
    Look at the "Programming the Propeller Wirelessly using the Xbee modules" in 2_24_11 Meetup Files/Reference .
    Can I ask you something? what type of Logo interpreter you use? Is your software or something else?
    Please post here if you have any progress!
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2011-04-06 11:26
    The S2's battery voltage (+9V nom.) is connected to CTS (pin 8). There's a jumper location available (P5) that can be used to shunt this voltage to pin 9 as well. Some Bluetooth modules require a regulated +5V, though, so you have to be careful which one you use. This module should work, although I've not tried it:

    -Phil
  • WhitWhit Posts: 4,191
    edited 2011-04-06 12:04
    Cool find Phil and Freak C. How are the these two different? I am going back to download the info on each... Edit - Okay, they are the same thing.

    @Freak C. Keep us posted. Neat idea.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2011-04-06 12:26
    They're not different. I completely overlooked the link in Frank's post. D'oh! Still, it's probably significant that we both arrived at the same product independently. :)

    They do seem rather pricey, though, compared to an XBee.

    -Phil
  • WhitWhit Posts: 4,191
    edited 2011-04-06 12:56
    They're not different. I completely overlooked the link in Frank's post. D'oh! Still, it's probably significant that we both arrived at the same product independently. :)

    As they say Phil - Great minds think alike...
    They do seem rather pricey, though, compared to an XBee.

    Yes, I thought the same thing. Makes the IPRE Fluke look like a good deal too (camera and all).
  • Martin_HMartin_H Posts: 4,051
    edited 2011-04-06 13:16
    Can this module assert DTR and allow the download of a new program?
  • Freak C.Freak C. Posts: 5
    edited 2011-04-14 08:03
    NikosG wrote: »
    Hi Freak C.,
    This is very interesting! It would be fantastic if you could achieve this challange with LOGO!
    This problem obsess my mind for a long time and I'm trying to gather information in order to buy the appropriate hardware and have a proper solution.
    From the information I have seen until now, the problem to load wirelessly a single command could be similar with the problem of Programming the Propeller Wirelessly.
    For this problem Parallax's technician and programmers have given an answer.
    Look at the "Programming the Propeller Wirelessly using the Xbee modules" in 2_24_11 Meetup Files/Reference .
    Can I ask you something? what type of Logo interpreter you use? Is your software or something else?
    Please post here if you have any progress!

    Let me tell you what I am working on. Many moons ago, I have written Terrapin Logo (www.terrapinlogo.info). Now that I am retired, I have started to write a more professional version of a Logo interpreter, with a GUI a little like Visual Studio, with all kinds of dockable windows like source view, breakpoints, stack trace, threads and the like - you get the idea. So far, I have connected the S2 to Logo, which was not difficult thanks to the great documentation. A small interpreter in the S2 listens to and executes Logo-like commands, so e.g. REPEAT 4 [FORWARD 100 RIGHT 90] typed in the Logo IDE lets the S2 execute a square. This is what I call slave mode, where the S2 does not carry out a program on its own. The next step is to compile and download Logo programs into the S2 so it can roam around in autonomous mode. Ideally, you would write and debug your S2 program inside the Logo IDE, having the S2 run in slave mode, then download the finished program to the S2 and have it run off into the sunset. (OK, it feels a bit strange to write an interpreter in Spin, an interpreted language, but others have written language interpreters in JavaScript as well, which is the Big Boys' Spin toy IMHO).

    Of course, a wireless connection would make a lot of sense in slave mode!

    To make things a little harder, terrapinlogo.com is not really equipped to alter the S2's hardware, so is it out of the question to open each S2 and implant an XBee unit. Therefore, I have been looking at RS232/Bluetooth dongles. The Fluke/IPRE board looks like an interesting solution as well, but I can imagine that it is easier to sell a "sealed unit" that anyone can touch without problems than an open PCB.

    PhiPi, thanks for the info about the P5 jumper! Maybe setting a jumper is possible for a non-tech distributor.

    Has anyone heard new information about the availability of the Parallax WiFi board? In a thread, I have read that they plan to offer an S2 specific version. I can just hope that it has a RS232 connector...
  • Mike GreenMike Green Posts: 23,101
    edited 2011-04-14 08:54
    Martin_H,
    It doesn't matter. Remember that the ROM bootloader uses very tight timing on the handshaking with the Propeller Tool on the PC. Unless a wireless link is specifically designed (like the soon-to-be Parallax Wifi) for downloading, it will time out when you try to download something.
  • Martin_HMartin_H Posts: 4,051
    edited 2011-04-14 17:42
    Hmm, too bad. RS-232 is slow compared to blue tooth, so I had hoped that with high enough bandwidth the timing delays could be mitigated. One thing I really like about the Lego NXT is the blue tooth program download ability.
Sign In or Register to comment.