Shop OBEX P1 Docs P2 Docs Learn Events
im new and need help with a program — Parallax Forums

im new and need help with a program

bryanfuelbryanfuel Posts: 5
edited 2009-01-23 22:56 in BASIC Stamp
i have the basic stamp homework board and i am using bs2. im building a satellite and i need a program that will turn on and off systems, send back a gps report (from my tracking device), have a timer so if it does not hear from me for 15 minutes it will go to low power mode, take the coordanates from the gps and turn on a camera when the longitude and latitude become over hawaii. please help me

Comments

  • FranklinFranklin Posts: 4,747
    edited 2009-01-05 16:52
    Start by going here www.parallax.com/tabid/535/Default.aspx and downloading "Whats a microcontroller" and "Robotics with the boe-bot" These will get you started and if you have specific questions on your project please come back and ask.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Stephen
  • SRLMSRLM Posts: 5,045
    edited 2009-01-05 17:09
    I'm not sure what the maximum altitude of GPS is, but I'm pretty sure that it doesn't work above the altitude of the GPS satellites themselves...
  • Just JeffJust Jeff Posts: 36
    edited 2009-01-05 17:09
    So you need a Pseudo-code solution...
    4 blocks or modules required...
    1. Propulsion and directional (guidance/steering) control
    2. Position tracking (GPS, sun, magnetic, radio wave) also contains the gyros and accelerometers
    3. Power supply - battery monitoring, ability to enter low power mode, solar charging, ability to "wake up" when required (by BS2) and enter "full power" mode
    4. Data acquisition (data storage) and transmit/receive functions and camera control

    bryanfuel said...

    im building a satellite and i need a program that will turn on and off systems, send back a gps report (from my tracking device), have a timer so if it does not hear from me for 15 minutes it will go to low power mode, take the coordanates from the gps and turn on a camera when the longitude and latitude become over hawaii...
    ... Assuming the rocket/satellite is already in flight and near Hawaii you would do something like this...
    1. BS2 requests Power supply check (monitor for any problems) and sends results to data acquisition module
    2. BS2 requests position tracking to update position and send results to data acquisition module
    3. BS2 requests from the data acquisition module the current position and computes any required course corrections due to deviations in programmed course...·any required changes are sent to the propulsion module
    4. BS2 requests the data module take a picture and store it
    5. BS2 instructs data acquisition module to transmit all data back to ground control and receive any new instructions
    5. BS2 instructs power supply to enter low power mode for xx time to conserve battery power
    7. Wake-up and repeat

    Good luck and have fun!!!!·· yeah.gif

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔

    "Twenty years from now you will be more disappointed by the things you didn't do than by the ones you did do. So throw off the bowlines. Sail away from the safe harbor. Catch the trade winds in your sails. Explore. Dream. Discover." - Mark Twain
  • bryanfuelbryanfuel Posts: 5
    edited 2009-01-06 03:25
    to franklin: i already completed the tutorial to get the general idea

    to srlm: the gps satellites i think are much higher than the type of satellite i have

    to the hero flag: that was a ton of help but im still to new to put that into accualy code

    Post Edited (bryanfuel) : 1/10/2009 1:55:46 AM GMT
  • SRLMSRLM Posts: 5,045
    edited 2009-01-06 04:07
    How high is yours? I must eat a few of my words: apparently the GPS signal works to a pretty substantial hight: look here.
  • Just JeffJust Jeff Posts: 36
    edited 2009-01-06 18:11
    Sorry my friend but I am good at the dreaming but still working on the coding! Best of luck and keep working at it, you'll figure it out in due time.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔

    "Twenty years from now you will be more disappointed by the things you didn't do than by the ones you did do. So throw off the bowlines. Sail away from the safe harbor. Catch the trade winds in your sails. Explore. Dream. Discover." - Mark Twain
  • KB3JJGKB3JJG Posts: 95
    edited 2009-01-06 20:07
    Sounds like a homework problem or a semester concept project to me, better hope your teacher doesn't read this forum! nono.gif

    At any rate, GPS won't work in space. Orbital calculations are detemined by keplerian elements not GPS. If you were to actually launch a bird as an individual, and I emphasize IF it would be a low earth orbit bird (LEO), LEO birds move at about 17,000 mph, far to fast for gps to work. Initial keps are released before launching a leo bird, they are refined and updated after launch on a regular basis by the US govt and released in various formats.

    Once launched you can caluculate where a·leo brid will be at any givin time based on it's keps, for the most part a leo bird passes over a specific spot on the planet twice a day.







    ·
  • $WMc%$WMc% Posts: 1,884
    edited 2009-01-07 00:23
    Bryanfuel

    What is the height of Your Orbit?

    ________$WMc%________

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    The Truth is out there·········································· E=$WMc%2
  • bryanfuelbryanfuel Posts: 5
    edited 2009-01-07 02:49
    my satellite is at 650km and gps satellites are at 20200km

    satellite

    http://lss.mes.titech.ac.jp/ssp/cubesat/titech_cube/overview.html

    gps

    http://www.kowoma.de/en/gps/orbits.htm
  • KH6DADKH6DAD Posts: 4
    edited 2009-01-09 01:37
    No one has answered this young man's question. Is it possible to interface a GPS receiver to a Basic STAMP?
  • KB3JJGKB3JJG Posts: 95
    edited 2009-01-09 02:11
    I think nobody has answered his question because this young man is telling tall tales. At any rate, yes you can interface a GPS receiver to a stamp, in fact parallax even sells one and provides sample code and documentation on how to do so.
    ·
  • KH6DADKH6DAD Posts: 4
    edited 2009-01-09 08:28
    This young man is my son. I am mentoring him along toward building a Cubesat for his science fair project. I recommended he look for help here as we are under the gun and are desperately trying to make up for lost time. His call sign is KH6BRY, mine is KH6DAD, look us up on QRZ.com . He has placed in the top 3 of his school every science fair since he began and he is no slacker. Last year he won significant cash awards at the state Science Fair for his APRS tracker. It is all documented on his personal science blog http://brysci.blogspot.com .

    We already have a GPS receiver and a MicroTrak APRS board. APRS does infact work in Low Earth Orbit as demonstrated on the ISS. What we are trying to figure out is how to parse the NMEA data string from the GPS receiver, pass it through the STAMP and then mirror it back out so that it can enter the MicroTrak for transmitting. I understand this may have something to do with SERIN and SEROUT commands but we are quite confused by those.

    If anyone is willing to be a little less cynical and a little more helpful, we really need the help but have nearly run out of time. We want the STAMP to detect when it is in 1500 miles of Honolulu, and when so, turn on the ATV payload and turn it off again when it goes out of range. Of course we understand this Cubesat mockup will never ACTUALLY be in orbit, but we want to present a real operating program that could conceivably work.

    If anyone can share a link about how to accomplish this, that is what we are looking for.

    Also Hams, we are trying to interface the STAMP to a TNC (Terminal Node Controller) and help along these lines would also be appreciated.

    Aloha,

    Rich
    KH6DAD
  • SRLMSRLM Posts: 5,045
    edited 2009-01-09 16:58
    Okay, that makes more sense. The keywords here are:
    KH6DAD said...
    Of course we understand this Cubesat mockup will never ACTUALLY be in orbit

    The way it was presented, it appeared as if he wanted to actually put something in orbit. This presents lots of difficulties, and if one is intending to launch a satellite, and doesn't know some electronics then it starts on the road to tall tales. However, making a mockup is much simpler and actually possible.

    For more information about serin/serout take a look at the Basic Stamp Syntax and Reference Manual, under the appropriate section. There is quite a bit of information there, and you can also do searches for asynchronous serial communication.

    To determine when the stamp is within 1500 miles of Honolulu then you need to have an if statement with four conditions: lower than the upper GPS boundary, higher than the lower GPS, east of the Western boundary, and west of the eastern boundary. This is the principle. On the Basic stamp you'll need to expand it some, since the BS2 can't hold the entire latitude or longitude string in one variable (unless if you're willing to use just degrees for your position estimation).

    This link may be what you need for the wireless communication.
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2009-01-09 17:12
    Rich,

    I apologize for the lack of responses to your son’s messages. I know that once in awhile we do get students who want to pass a class with a high grade but wait until the last minute, post here and hope someone will do the work for them (or has done it already). Rarely do we get those who are actually willing to put effort into the more complex projects but I think your timeline might be an issue at this point as the forum members that know this material may not be on frequently enough to help you before time runs out. I will see if I can provide enough information to get you going.

    First off, let me say that a BS2p may be a better choice for what you’re trying to do, due to the size of the GPS NMEA strings. There are several articles that cover GPS using BASIC Stamps. I will link these here and if you have additional questions we can try to follow up on those after. I hope this helps. Take care.

    http://www.parallax.com/Portals/0/Downloads/docs/cols/nv/vol3/col/nv83.pdf

    http://www.parallax.com/Portals/0/Downloads/docs/cols/nv/vol4/col/nv103.pdf

    http://www.parallax.com/Portals/0/Downloads/docs/cols/nv/vol7/col/NV139.pdf

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Engineering
  • KH6DADKH6DAD Posts: 4
    edited 2009-01-09 17:38
    Wow! This information is excellent. The wireless communication link and these GPS links are exactly what we needed. Bryan is leaving for school at the moment, but when he returns he will be very pleased at all this information to review and incorporate.

    He and I will also have a discussion about his communication style, forum etiquette and especially the "...write the code for me..." line , which was definitely a contributing factor here. Onward!

    Thank You,

    Rich
    KH6DAD
  • edited 2009-01-09 17:57
    In addition to the BASIC Stamp 2p examples above, here is a link to a paper with a BASIC Stamp 2 example program that parses a GPS module's output.

    http://www.parallax.com/dl/docs/article/GPSReadings.pdf

    I found·it using this search string in Google:

    GPS site:www.parallax.com

    If you use the search without the www, you will also get Google's record of posts to forums.parallax.com. The www restricts the search to www.parallax.com.

    Although a search of the Parallax site had plenty of results, there are some instances where a given manufacture's site does not. In that case, search terms for the web at large would be a second step. Here's a Google search term that requires the entire string "BASIC Stamp 2" along with GPS.

    GPS "BASIC Stamp 2"

    This helps filter out web pages where the words BASIC and Stamp are on the page, but not together, like pages that talk about the basics of stamp collecting.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Andy Lindsay

    Education Department
    Parallax, Inc.
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2009-01-09 18:28
    Rich,

    We would of course like to see everyone get the information they need to realize their projects. What you will find for the most part is existing resources as well as a willingness to help one help themselves. We will most often provide links to existing resources, pseudo-code (in lieu of a flowchart) or short examples of code, unless something already exists to perform the task you’re looking for. I personally don’t think your son’s post was wrong in any way. But how well one communicates their goals and the details of such communication do go a long way to acquiring the assistance they are looking for. Let us know how the information linked works out and we’ll try to help you from there. As a note there are many high-altitude balloon participants on this forum. Some of them have posted their projects in our Completed Projects forum or on our main website in the Customer Applications section. Take care.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Engineering
  • KH6DADKH6DAD Posts: 4
    edited 2009-01-23 22:09
    Just to follow up with everyone, Bryan has completed his Satellite yesterday! He ended up having to make a lot of compromises due to time and money, but thanks to the resources you folks hooked us up with, we understand what we need to have and do to get it do work the way we want it too. You can see some of his build-out and final presentation board on his project journal/blog:

    Brysci.blogspot.com

    Thanks again to all the folks who helped us out with links and advice.

    Aloha from Honolulu,

    KH6DAD

    Post Edited (KH6DAD) : 1/23/2009 10:14:37 PM GMT
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2009-01-23 22:56
    Glad to hear it! We're glad he was able to see his project through and wish him the best of luck in future projects. I took a quick look at the site and there's a lot of information that may benefit other as well. Take care.

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