Shop OBEX P1 Docs P2 Docs Learn Events
Basic stamp 2 radio — Parallax Forums

Basic stamp 2 radio

StratusStratus Posts: 12
edited 2012-12-01 10:50 in BASIC Stamp
How would I go about Building a radio using the basic stamp 2,and also, controlling the radio with an lcd and changing it's frequency digitally with pushbuttons, also how to memorize the stations.

Thank you

Comments

  • metron9metron9 Posts: 1,100
    edited 2010-08-24 22:40
  • Mike GreenMike Green Posts: 23,101
    edited 2010-08-25 07:35
    First you have to learn how to use the BS2, how to scan a keypad, how to manage an LCD, how to work with pushbuttons. There are examples of each of these things in various Stamp tutorials, Nuts and Volts Columns, etc. You have to learn to combine each of these functions and make them work together the way you want. You also have to figure out how to make the radio itself. SparkFun has an FM receiver module for sale that looks like it should be controllable by a BS2. It'll need an audio amplifier. There are plenty of examples of that on the web that you can find with a little research. You'll have to figure out how to talk to the radio module. It uses the SPI protocol which the BS2 can produce and there are plenty of examples for other devices that also use SPI.

    Start with the Resources tab on Parallax's main webpage. Read through the Nuts and Volts Columns index. Go to the Downloads page and look through the Educational Downloads section. Good starting points are "What's a Microcontroller?" and the "Basic Stamp Syntax and Reference Manual".
  • StratusStratus Posts: 12
    edited 2010-08-25 20:16
    Thank you very much for this, I have been looking for this for a very long time!
  • jgamblainjgamblain Posts: 11
    edited 2010-08-26 07:03
    Sounds like a bit of work for a beginners project. I agree with Mike that you should break it into parts, and once you have each concept figured out, you can combine them all together, one at a time until the final project is built. This eliminates nightmare of bug fixing where you are not sure if it is one module of your design, or the linking between them. Been there, done that...

    Personally, I would take this plan of attack:
    1.) learn about button inputs
    2.) scale this up to Matrix keypads.
    3.) Learn about LCD control (this will also teach you about serial, I2C, or SPI communication, good for your RX radio module)
    4.) build a dummy project that makes Button presses come up on your display
    5.) Learn about amplifier circuitry, and see if you can make something that simply makes your MP3 player or computer louder without distortion
    6.) Figure out how to control your Radio module, possibly using the debug window for input.
    7.) incorporate all of these concepts slowly, testing THOUROUGHLY in between each phase of your build.

    Good luck, and let us know if you have any great success!
  • StratusStratus Posts: 12
    edited 2010-08-28 22:18
    Thanks again, I too agree to take every piece of this project and learn it one by one. I bought the activity kit for a start.
  • StratusStratus Posts: 12
    edited 2010-09-01 22:19
    I was wondering if could use this FM receiver instead of this one http://www.sparkfun.com/commerce/product_info.php?products_id=8972, but I do not know which one is better, as in more range or less parts needed or power consumption, this particular one sounds to good to be true.

    Thank You.
  • Mike GreenMike Green Posts: 23,101
    edited 2010-09-02 10:52
    I just went through the two links you supplied. They both refer to the same FM receiver chip. The difference is that the first link is to a module containing the chip, a crystal, and a few other parts. The second link is to a "breakout board" which incorporates the module and adds a few pull up resistors, a bypass capacitor, and easier to use connections on a 0.1" grid. I'd use the breakout board.

    Do keep in mind that the documentation is fairly minimal. The chip's datasheet describes the registers in the chip, but doesn't give much information on how you'd use them. It assumes that you ought to know enough about how this type of radio works. Be prepared to experiment and to do a lot of research.
  • APSpijkermanAPSpijkerman Posts: 32
    edited 2010-09-13 04:06
    I am also working on a radio.
    I have a tuner with I2C interface from an old car radio.
    It is based around the philips TEA6810V and TEA6825T chips.

    Here is a little pic of it connected to a BS2P:
    http://apsdev.com/stampradio/rdhwd.jpg

    I am using the stampdock software as input and output:
    http://apsdev.com/stampradio/rdscr.jpg

    Right now it can tune FM channels coarsly and fine, and it indicates
    the frequency, level strength, multipath level and the stereo indicator.
    I have a function to find the next channel, and to draw a graph
    of the whole frequency band.
    But it is not completely finished yet, need to do some work on AM,
    and the other tune controls.
    And also the channel buttons dont work yet.
    If it is a little further i'll post the source code on the page.
  • sam_sam_samsam_sam_sam Posts: 2,286
    edited 2010-09-13 05:47
    Look at the second PDF file on this page this might help

    http://www.datasheetarchive.com/TEA5767-datasheet.html

    TEA5767HLPhilips Semiconductors / NXP SemiconductorsLow-power FM stereo radio for
  • APSpijkermanAPSpijkerman Posts: 32
    edited 2010-09-14 15:31
    I updated (code,pictures, text) my stamp radio project.
    You can find it here: http://apsdev.com/stampradio/
    Most things in FM seem to work now, i only need to find the right parameters for AM.

    Right now you can do a graphical scan of the entire FM channel, while
    the found channels are stored under 20 buttons.
    With a slider under the graphical scan you can also go to channels.
    And then there is a turnknob and buttons for finetuning.
    Or you can use the 'next' button to find the next channel.
    Also it has indicators to show things like the current frequency and signal strenght.

    It uses the TEA6810V and TEA6825T chips, but i had a quick peek
    at the TEAnnnn chip of the sparkfun product, and i guess if anyone has that
    product he could adapt the code to that particulair chip by just modifying
    the couple of tuner specific functions.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2010-09-14 20:51
    Wow! You've made some very impressive progress. Please be sure to keep us apprised of all further developments!

    -Phil
  • mbatesmbates Posts: 3
    edited 2012-11-28 05:55
    Mike,

    I have tried unsuccessfully for months to convert the PARALLAX FM TUNER code from BS2 to PICAXE code. Given the history of both micro platforms this should be trivial. In fact, ALL I am trying to do is have a tuner that can Execute the FreqUp,FreqDown,Volume Up and Down commands (nothing else) but the differences in the READ command syntax between platforms seems insurmountable. All the other code is so easily converted. Any thoughts on this?

    Thanks,

    Matt
  • Mike GreenMike Green Posts: 23,101
    edited 2012-11-28 06:20
    Can't help you, sorry. This is a Parallax support forum. The PICAXE is in direct competition with the Basic Stamps. We provide plenty of sample code for the use of Parallax products with Basic Stamps and the Propeller. We even provide some sample code for some competing microcontrollers like the Arduinos, but you're on your own if you want to use a PICAXE.
  • softconsoftcon Posts: 217
    edited 2012-12-01 10:50
    Parallax sells an fm radio tuner chip, and on the support page for that chip is code for both the bs2 and the propeller. I've used this chip, and can say it works very well, is simple to use, and works a charm whether on the propeller or the bs2, since this is the bs2 forum, I direct you to the following page that contains code for making the chip parallax sells work on the bs2.
    http://www.parallax.com/Store/Accessories/AllAccessories/tabid/759/CategoryID/33/List/0/SortField/0/catpageindex/4/Level/a/ProductID/749/Default.aspx
    You'll find everything you need right there, it's great fun, and so simple, my 10-year-old son put one together for a school project.
Sign In or Register to comment.