Shop OBEX P1 Docs P2 Docs Learn Events
BS2 to radio TNC? — Parallax Forums

BS2 to radio TNC?

MaineWebDadMaineWebDad Posts: 9
edited 2008-02-11 10:06 in BASIC Stamp
Greetings,
I'm trying to get my Basic STAMP II to talk to a 2 meter ham radio TNC. It's my understanding that the TNC is looking for ASCII code. If anyone has suggestions or information on how to do this, I'd love to hear more.

The details are:
I'm trying to put together a scientific ballooing system for launch this spring. The payload will send down APRS packets to the ground station through a 2m hand radio. There are many groups which plug a GPS unit directly into the TNC. (Some radios, like the Kenwood TH-D7, have a built-in TNC.) The TNC functions like a modem, converting the digital signal from the GPS to an AX.25 packet for broadcast down to the ground. Some people without a built-in TNC use the TinyTrack unit or something similar.

I would like to do something different. I'd like to build a flight computer using the Basic STAMP II. To do this, the BS2 must accept sensor and GPS data, then pass it along to the TNC for broadcast down to the ground. It must also accept information which is uplinked from the ground and fed to it by the TNC. (An example of uplinked data is a command to cut the payload and parachute away from the balloon.)

I've seen several websites which talk about BS2 integration into the balloon system. However none of these establish a connection with the TNC. The BS2 must receive data from the TNC and must be able to pass data to the TNC for this project to be successful.

Any and all comments and ideas welcome.

Regards,
-- Mark· KB1MSA

Comments

  • Ken GraceyKen Gracey Posts: 7,401
    edited 2006-12-27 17:22
    Hi Mark,

    This is also a keen interest of mine, and something I had hoped to accomplish over the holiday break. The licensed radios provide so much power compared to the other products. I'll be watching this thread closely and hope to also see some positive results. I can't help much right now but I'll watch and learn. I'd like to use this for my hybrid-powered robots.

    Regards,

    Ken Gracey KI6HBT
    Parallax, Inc.
  • Larry~Larry~ Posts: 242
    edited 2006-12-27 17:44

    I have been kicking around something similar at least I think.

    I wanted to use· pink modules one on a Stamp

    And use Two Senao wireless AP/ Bridge units that I have, Not sure what the pink

    Modules will allow as far as commands and such.

  • Mike CookMike Cook Posts: 829
    edited 2006-12-27 17:54
    Just an FYI:

    I bought two of these TNC modems·for a similar project a while back:

    http://www.tnc-x.com/

    I have not had time to interface them to a Basic Stamp, SX, or Propeller yet, but that was the general idea. Take a look at·his web site. There is a paper he wrote:

    TNC-X: An Expandable Microcontroller-Based Terminal Node Controller (2003)

    It has a lot of good info on how to interface this TNC modem to a micro. Most of the examples are in C but should be able to port the basic operation over to one of Parallax's products.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Mike

    Post Edited (Mike Cook) : 12/27/2006 6:00:17 PM GMT
  • Kevin WoodKevin Wood Posts: 1,266
    edited 2006-12-27 19:27
    This might give you some more ideas: www.tapr.org/kits_pic-e.html
  • MaineWebDadMaineWebDad Posts: 9
    edited 2006-12-27 19:51
    Wow - some great responses! Thanks for the TAPR link! I went and took a look. (And I sent them an inquiry.)

    The concern I would have with the TAPR approach - and I hope the Parallax people are listening in - would be the lack of the BS2 in the solution.

    Quite frankly, it's a toss-up for me, whether to go with the PIC or the BS2 as the brain of the operation. In doing a bunch of internet research, I can find more than a few good reasons for either approach.

    I'd like to use the BS2 because:
    · 1) I have some BS2 gear. (Using existing equipment tends to keep married men off the couch.)
    · 2) I have heard that BS2 is really great for prototyping.
    · 3) I will be working with high school students and freshmen/sophomore university engineering students. (Since I'll be starting at Square One with a new bunch of students each year, some projects will be in a continual prototyping stage.)
    · 4) The Parallax lessons will be great for my high school students.

    That all being said, if PIC-E is the only way to make this work, I gotta go in that direction, which will probably mean everything else I do will be PIC based as well.

    So... I'm reading these posts with GREAT interest!

    Regards,
    -- Mark· KB1MSA
  • MaineWebDadMaineWebDad Posts: 9
    edited 2006-12-28 01:12
    Ok... did some thinking...
    Enclosed is a block diagram of what I'm thinking of...
    -- Mark· KB1MSA
  • Kevin WoodKevin Wood Posts: 1,266
    edited 2006-12-28 01:15
    I was a bit hesitant about posting the link becuase of the PIC focus, but the docs are a good starting point if somebody wants to recreate the circuit using a different microcontroller. It would make a good project for an SX-Board.

    I think you're correct in wanting to use a BS2 for the students' sake. It's very easy to work with, and that's a great confidence builder.
  • Alex BellAlex Bell Posts: 17
    edited 2006-12-30 22:49
    I have been wanting to build a "one chip" packet solution around Parallax chips for a couple of years now. I have succeded in building a 1200 baud BIIS type ( ETSI 300 320) signaling system [noparse][[/noparse] Icom commercial radios were being built with 1200 baud BIIS capabilities...I think I'd rather now get into Kenwood APRS instead] around the SX-28, as a modem, and it uses a PC to assemble
    and CRC check the packets. Lately I have used BS2 to assemble and CRC check packets and hand them off to the SX-28 for
    modulation and I can do 6 characters at a time tops because I run out of memory in the BS2. Recently I bought the Javelin stamp to learn Java and get around the memory cap problem, but there is a steep learning curve. One thing I would like to do is use the Parallax GPS device, "handle" the packets with a BS2 and then send them through the SX modem device into a transmitter.
    Amateur radio used to be about designing innovations and then sharing them. Too often the packet technology has been commercialized and can then be purchased only. The Montana University System is also involved in the NASA ballooning project and various devices have been built here at the school where I teach for that project. A packet tnc will talk to a BS2 but be sure to use a "null modem" cable between the devices. Alex
  • MaineWebDadMaineWebDad Posts: 9
    edited 2006-12-31 01:19
    Thanks Alex - your comments are very much appreciated! One thing that really annoys me is that Montana's ballooning program, and many others, are using the Kenwood TH-D7A and D700 radios. However in communicating with the Kenwood people, the communication protocol with the on-board TNC is... you guessed it... PROPRIETARY!· arrr... So it seems that if one wants to use a BS2 in a payload, it will need to carry a real TNC and some non-TNC radio. Guess maybe it's time to leave the D7's on the shelf back in the lab!

    So... I know I'll be experimenting with this - I'd love to know what progress others make. And I would love it if the Parallax folks could throw some company resources behind this project - some free or loaner equipment, microgrant for consumables, etc..

    Regards,
    -- Mark· KB1MSA

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ================

    Mark Ford
    · - English Teacher, Telstar Middle/High School
    · - Coach, University of Southern Maine Scientific Ballooning Group
    · - Dad

    E-mail: markus@feathermark.org
    Ham: KB1MSA
  • codeprocodepro Posts: 22
    edited 2007-01-20 02:24
    www.tnc-x.com interfaces a PIC 16F628A to a MX614 which provides 1200 baud. A Basic STAMP II can also be interfaced to a MX614. You would need to implement the AX.25 protocol.
  • MaineWebDadMaineWebDad Posts: 9
    edited 2007-02-23 18:37
    This is an update on this project. I am working on this with a former professor from the University of Montana. We anticipate having the hardware part figured out sometime this spring, and the coding done this summer. This will then be tested at the Engineering Department of the University of Southern Maine. If it does well in testing, a flight article will be constructed and it will fly on one of the balloons flown by the USM Scientific Ballooning Group. I'll post some information here when we have some results. Many thanks to everyone, especially Ken at Parallax. It's really refreshing to see a company willing to help users develop new uses for existing products!
    Regards,
    -- Mark KB1MSA

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ================

    Mark Ford
    · - English Teacher, Telstar Middle/High School
    · - Coach, University of Southern Maine Scientific Ballooning Group
    · - Dad

    E-mail: markus@feathermark.org
    Ham: KB1MSA
  • FranklinFranklin Posts: 4,747
    edited 2007-02-23 19:03
    Mark, have you looked at the info at www.tapr.org ?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Stephen
  • MaineWebDadMaineWebDad Posts: 9
    edited 2008-02-10 11:26
    Good Morning,
    I'm writing to give a quick update. When this BS2 project started, I was coaching a new scientific ballooning group at the University of Southern Maine. In the past year, that group has become much less active. The students who were originally working on the BS2 flight computer have either become inactive or are attending meetings much less frequently.

    However I still have a deep personal interest in the BS2 flight computer. At this time, my August is looking very open. (I teach high school...) and so I plan to work on this project then. To the folks who have contributed to this effort, I apologize for the length of this project, but want to assure everyone that it has not been forgotten.

    Regards,
    -- Mark

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ================

    Mark Ford
    · - English Teacher, Telstar Middle/High School
    · - Coach, University of Southern Maine Scientific Ballooning Group
    · - Dad

    E-mail: markus@feathermark.org
    Ham: KB1MSA
  • terry_bearterry_bear Posts: 84
    edited 2008-02-10 17:33
    Mark,

    I just stumbled onto this thread, but I notice that you are still interested, and I thought I'd pass along my two cents' worth.

    The newer Stamps (that support SERIN and SEROUT) can readily be made to talk to the TNC. The Stamp handle the other tasks indicated in your block diagram (depending on how often data needs to be collected and downloaded)

    The biggest potential "gotcha" would seem to be timing between datalogging tasks and listening for commands (such as "cutdown") The Stamp doesn't have interrupt capability, so it has to stop what it's doing to listen for commands. There are ways around that, but I don't have any experience with them.

    The biggest difference, in my perception, is that PICs are programmed in assembly, which I have mental block against, and Stamps are programmed in a dialect of Basic, which I can handle.

    By the way, I may be misunderstanding the function of the TNC, but it seems to take serial data (from a computer, for instance), packetize it, send it to the transmitter, and key the transmitter. It also would seem to do the same for a received signal, that is; convert the packets back to serial data, and send it to a device.

    If this perception is in error, there may, indeed, be problems with Kenwood's proprietaty protocol, but I wouldn't think so otherwise.

    I tried the "TAPR" site, adn thereis a banner proclaiming that the kits are no longer available.

    The project would seem to be a good way to get a fair number of kids inolved, as it present a lot of different facets.

    Thoughts for the morning,

    Terry
  • Mike GreenMike Green Posts: 23,101
    edited 2008-02-10 18:09
    This website has several 1200 Baud radio modems based on the Baycom design.
    www.qsl.net/yo5ofh/projects/ham%20radio%20projects.htm

    They're all designed to "steal" power from the serial port, but can easily be modified (by removing the 5V input power conditioning and the RS232 signal buffering) to work directly from a Stamp. There are some 3rd party serial input buffers that can help get around the Stamp's limitation of not being able to listen to an input port while it's doing something else. One vendor is Protean-Logic.
    www.proteanlogic.com/Data_Sheets/rsb509c_data_sheet.htm
  • Bruce BatesBruce Bates Posts: 3,045
    edited 2008-02-11 03:28
    Folks -

    Just for the record, ALL PBASIC Stamps support the SERIN and SEROUT commands, not just "newer Stamps". The BS-1 Stamp may be limited in the baud rates permitted, but the commands themselves are indeed supported.

    Regards,

    Bruce Bates

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    There is no pleasure in having nothing to do;
    the fun is in having lots to do, and not doing it!
  • knightofoldcodeknightofoldcode Posts: 233
    edited 2008-02-11 06:09
    Mark,

    You have obviously looked into the TinyTrak series of trackers. However have you heard of, or looked into the OpenTracker series of trackers?

    The open tracker series is just that. A tracker system similar to the TinkTrak however it's source code is open source, Always a good thing in my opinion.

    They also have some interesting features that the TinyTracker doesn't. First, they have bidirectional communication to host/BS2. Which means you can do waht you are talking about doing. Plus their communication protocol is very simple as far as I can remember.

    But what I think is probably the best difference is that the OpenTracker comes in a BS2 Style package. IE, a 24 Pin DIP circuit. So it's designed to be small enough for use in a ballooning project. Also check out the rest of their site, they have alot of neat stuff for both Amateur radio, and Data communications via BS2, and OpenTrackers.

    I will say this, I have two Opentrackers, one tinytrak3, and one TinyTrak4 (Still in development/prototype) and I prefer the OpenTracker series instead of the tinytrak.

    https://www.argentdata.com/catalog/product_info.php?cPath=22&products_id=64

    Good Luck, take lots of pictures, give source code, and post all your stuff on the forums under the completed projects. I'm sure everyone would love to see it. [noparse]:D[/noparse]

    73,
    Knightofoldcode,
    KE5NZB.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=-=-=-=-=-=-=-=-=-
    This message transmitted with 100% recycled electrons.
    -=-=-=-=-=-
    Gravity doesn't exist. The Earth sucks.
    -=-=-=-=-=-
    Make a man a fire, and he will be warm for the night.
    Light the man on fire, and he will be warm for the rest of his life.
    -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=-=-=-=-=-=-=-=-=-
  • sylvie369sylvie369 Posts: 1,622
    edited 2008-02-11 10:06
    I bought an OpenTracker kit last December, and you just beat me to the punch on recommending it here. At only $32 ($40 for the 24-pin DIP version), it was an "on a whim" purchase. Besides price, the telemetry was what sold me on it (versus the TT3). I see that the TT4 does have telemetry, but it's still more expensive.

    Paul, KC9KST
    knightofoldcode said...
    Mark,

    You have obviously looked into the TinyTrak series of trackers. However have you heard of, or looked into the OpenTracker series of trackers?
Sign In or Register to comment.