Shop OBEX P1 Docs P2 Docs Learn Events
Hook an antenna to your Propeller, and listen to the radio! (New shortwave prog - Page 2 — Parallax Forums

Hook an antenna to your Propeller, and listen to the radio! (New shortwave prog

2456789

Comments

  • heaterheater Posts: 3,370
    edited 2008-08-17 06:33
    Good point Phil.

    Guess you might also need a ferrite rod antenna and a capacitor to resonate with to get these signals from any distance.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    For me, the past is not over yet.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2008-08-17 21:54
    Beau Schwabe recommends a 500uH inductor for the AM broadcast band, so I set out to find a way to make one from readily-available materials. The coil is wound on a plastic sewing machine bobbin (Singer #2135), illustrated below. The bobbin comes with a spring-loaded metal spindle, which you will need to remove. To do so, push on the metal cone-shaped piece until a flat tab protrudes from the other side. With a pair of pliers, grab this tab, pull on it, and give it a quarter turn. The whole assembly will fall out, and you can discard it.

    The wire to use is 30ga. enameled magnet wire, which you can get from Radio Shack as part of a three-pack assortment (#278-1345B). (The 30ga. wire is red-colored.) You will be winding this wire onto the bobbin about half-full. (See photo below.) To start, force the wire into the bobbin's slot with a couple inches hanging outside. You can wind it by hand, or you can use a variable-speed electric drill to speed things up. In the latter case, get a #9 drill bit and force the shank end into the bobbin's hub. Chuck up the cutting end, and slowly wind the wire on. (I didn't count the turns. I first filled the spool and measured the inductance. It was about 2000uH. So then I began removing bits at a time until I hit 500. Well, actually, it was 475, but by then it was too late to put any back! So you may want to add a few turns more.)

    Once the spool is filled to the capacity shown, cut the wire, and force the loose end into the slot. Twist the two ends together to keep the wire on the spool from unraveling. Next, with a knife blade, scrape some enamel off the tips of the wire. Once you've gotten the enamel loosened, you can clean the remainder off with a fingernail. Tin the ends with solder. I soldered a two-pin header onto mine. You can also use a couple pieces of resistor wire (from at least a 1/4-watt resistor).

    Now you have a 500uH (approx.) inductor that you can use to tune in your local AM stations. I attached mine in the breadboard area of an early-model Propeller Demo Board. There's a photo below, along with detail of how the 10M feedback resistor was soldered into place. You will also want to check out my original post for corrected software and a revised schematic.

    -Phil

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    'Still some PropSTICK Kit bare PCBs left!
    247 x 600 - 40K
    600 x 480 - 40K
    600 x 561 - 91K
    339 x 243 - 42K
  • parskoparsko Posts: 501
    edited 2008-08-18 13:21
    Phil Pilgrim (PhiPi) said...
    You can wind it by hand, or you can use a variable-speed electric drill to speed things up.
    -Phil



    Or you could just use the sewing machine!!! tongue.gif

    But seriously, a good idea for a way to captivate the wire.

    I've thought a ton about this post while travelling over the past weekend. I think I'm going to do this soon, myself. I've also thought that this would be perfect for using the Prop as an RFID card reader, which was something I was going to try to do. But, without seeing your actual code, but seeing the pseudocode behind it in this post, I realize that I may not have been able to figure it out (without you doing it for me). But, with your code, it should be pretty easy. Would you agree?

    -Parsko

    ps - I also find myself more and more fascinated with inductance. Not sure what it is about it, but it consumes me every time I thing about using it for something.
  • Beau SchwabeBeau Schwabe Posts: 6,545
    edited 2008-08-18 16:09
    parsko,

    Yes, I agree, there is a certain caliber of·fascination about inductors that·sets them apart from other passive components.
    ·
    As once explained to me...· an inductor and capacitor combination is like an electromagnetic laser, the values you use determine·how far apart the "mirrors" are placed.· Energy at the same wavelength that the "mirrors" are placed will be reflected back and forth and amplified significantly, while energy that does not match the wavelength will be attenuated.·



    Phil,
    Assuming that your bobbin is about 1/4 inch diameter, and the length is also about 1/4 inch, a 500uH coil would require about 280 turns using #30 wire and cause the overall diameter to grow outward to about 1/2 an inch.
    If you use a standard coke can (2.6 inch diameter), you would only need about 58 turns of #30 wire for an equivalent coil.
    Attached is a "Work in Progress" Air-Core coil calculator that I use that will give you a good ball-park value within 5%...
    ·

    BTW) The coil shown next to the coke can would fall under the category "special case" that I have placed in the coil calculator where the 'l' and 'b' values are the same.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Beau Schwabe

    IC Layout Engineer
    Parallax, Inc.

    Post Edited (Beau Schwabe (Parallax)) : 8/18/2008 4:21:38 PM GMT
    600 x 900 - 87K
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2008-08-18 16:32
    Beau,

    Now you've got me wondering if I really have 280 turns on that coil. (I doubt it.) I could wind another one by hand and count them, but I have a feeling that this will now entail a turns counter for my electric drill. BTW, I arrived at the inductance measurement using a 74HC00 in an LC oscillator configuration and using the formula:

    ····L = 1 / (4 * pi2 f2 C)

    There's a chance, of course, that C (nominally 220pF) was a little off, but I got results with the 330uH coil that were within its tolerances.

    I like the Coke can coil, BTW. It looks very easy to reproduce. Are there any performance advantages to be gained from a larger-diameter coil?

    -Phil

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    'Still some PropSTICK Kit bare PCBs left!
  • Beau SchwabeBeau Schwabe Posts: 6,545
    edited 2008-08-18 16:47
    Phil,

    From my previous post, that's why I like to use the differential method ... uH! = uH * F1^2 / F2^2

    This way, as long as your Capacitor is the same in both tests, any variations, even temperature, get canceled out.
    All you need is a known coil value... the 74HC00 will work fine.· Just measure the frequencies between a known and an unknown.


    The larger coil,· will have a higher 'Q' only because of less metal (the wire itself) in the core region... If the 'Q' is too high in this case it may not work as well without external tuning.· By introducing metal to the coil, you increase the inductance (in some cases by more than 50%) and decrease the 'Q'.· The 'Q' is the quality factor of the coil, for radio applications where a specific frequency is used, it is desirable to have a high Q.· In applications where we want broad band tuning and we don't have a specific frequency in mind, we want the 'Q' to be lower.



    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Beau Schwabe

    IC Layout Engineer
    Parallax, Inc.
  • parskoparsko Posts: 501
    edited 2008-08-18 17:04
    Beau,


    What affect does the "wrapping" have on the inductance value ? I'm assuming that the wrapped wire is part of the actual magnet wire used in the coil. My guess is that it has a somewhat negligible effect. That is a good example of something that everyone in the world has (a can) to use to make coils!

    -Luke
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2008-08-18 17:08
    Beau,

    Thanks for those universal calculations, however being a Pepsi drinker, I expect slightly better
    performance from my coil... <smirk>

    Now to round up some #30 wire..

    OBC

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    New to the Propeller?

    Getting started with a Propeller Protoboard?
    Check out: Introduction to the Proboard & Propeller Cookbook 1.4
    Updates to the Cookbook are now posted to: Propeller.warrantyvoid.us
    Got an SD card connected? - PropDOS
  • parskoparsko Posts: 501
    edited 2008-08-18 17:09
    Phil,

    If you have the patience, you could go through the attached document where I lay out all the calculations. I did this for my RFID project. The same conepts should be applicable to this directly. I can send the original (MathCAD) file, should you have that program.

    http://forums.parallax.com/attachment.php?attachmentid=48259

    -Luke
  • Beau SchwabeBeau Schwabe Posts: 6,545
    edited 2008-08-18 17:17
    parsko,
    ·
    I don't use wrapping techniques myself, but I think it's a two fold....· by wrapping you insure that the windings below are tight and compact (increase inductance).... Also, by wrapping you create a separation between other layers which decreases the·inductance.

    Depending on the material used, wrapping·can also add capacitance by altering the·dielectric properties.· For high voltage applications, wrapping
    might be desirable to minimize or prevent coil arching.


    Edit:

    Sorry, I misread your question.... the "wrapping" that I did to secure the coil was done with a scrap piece of wire, and is negligible as far as what it contributes to the inductance.· The only thing to make sure of is that the ends of the wrapped piece of wire do not touch, or you create a transformer with a shorted coil winding.· You can always use string.
    ·
    ·
    ···

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Beau Schwabe

    IC Layout Engineer
    Parallax, Inc.

    Post Edited (Beau Schwabe (Parallax)) : 8/18/2008 5:45:22 PM GMT
  • bmentinkbmentink Posts: 107
    edited 2008-08-19 00:54
    Hi Phil,

    Great software.

    I have been trying to understand it, and have done ok until I get to the cog that does the audio out.
    In that cog you take the audio output from the mixers "a_audio" and shift it left by 20 then load up freqa with that value.
    Can you please let me know what you are trying to achieve with that bit of code? ... especially the shift left part ... thanks.

    (i.e are you trying to creat an audio modulated carrier with the cog counter which gets de-modulated by the filter on the audio out pin?)
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2008-08-19 02:17
    bmentink,

    The audio output counter is set up for DUTY mode. In this mode the carry out of PHSx is written to the pin every 12.5nsec. What results is a sequence of ones and zeroes, wherein the relative preponderance of ones is proportional to the value in FRQx. I have to shift the mixer value left by 20, before writing it to FRQx, because it's so faint. This essentailly multiplies it by 220. If I didn' t do that, you wouldn't hear anything.

    -Phil

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    'Still some PropSTICK Kit bare PCBs left!
  • RaymanRayman Posts: 13,767
    edited 2008-08-19 14:46
    Here's some options if you hate winding cores:

    1.· Just a few turns around a Digikey torroid ferrite gives 500 uH.

    2.· Inductance gyrator to simulate an inductor with an OPA340 opamp.

    I just tried them both and they work (although I think I need to bias the opamp more towards Vdd/2)
    1152 x 864 - 548K
    1152 x 864 - 534K
  • RaymanRayman Posts: 13,767
    edited 2008-08-19 14:48
    PS: Is Phil's board older or newer than mine? It looks very different!
  • Beau SchwabeBeau Schwabe Posts: 6,545
    edited 2008-08-19 15:16
    Rayman,
    ·
    Good job!...· I don't have any formulas for coils with a core other than Air, only because the permeability of the core using other materials can vary greatly.··Based on your 500uH coil you have in the picture, there is about a 200% inductance increase if you compare·it to an equivalent air core.
    ·
    "Inductance gyrator to simulate an inductor with an OPA340 opamp"·- can you provide a schematic for this?
    ·
    "Is Phil's board older or newer than mine? It looks very different" - Some of the earlier boards used an inductor for each audio channel, this was later changed to an amplifier IC mainly to provide consistent audio strength over·wider frequency ranges.· Some other features have been added as well, such as a USB connection, and a second PS/2 connector.


    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Beau Schwabe

    IC Layout Engineer
    Parallax, Inc.
  • RaymanRayman Posts: 13,767
    edited 2008-08-19 15:45
    Beau:· I'm not terribly pleased with my current circuit, so I didn't document it...· But, it's basically this one here:

    http://sound.westhost.com/dwopa.htm#inductor

    but with R1=10, C1=10nF, R2=variable 20k, set at 5K

    I think it's operating right at the lower rail though because I'm using V+=Vdd and V-=Vss...· I think this causes some distortion, so I'll have to think of a way of shifting the bias...

    There's also a diagram here:

    http://en.wikipedia.org/wiki/Operational_amplifier_applications#Inductance_gyrator
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2008-08-19 15:49
    My current Propeller project (UPENE) has me too busy to get this built.
    Any chance anyone coming to the expo is bringing this project with them?

    There's a small kitchen nearby we can tie to the cold water pipe for the earth ground.

    OBC

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    New to the Propeller?

    Getting started with a Propeller Protoboard?
    Check out: Introduction to the Proboard & Propeller Cookbook 1.4
    Updates to the Cookbook are now posted to: Propeller.warrantyvoid.us
    Got an SD card connected? - PropDOS
  • RaymanRayman Posts: 13,767
    edited 2008-08-19 16:15
    Beau Schwabe (Parallax) said...
    ·Based on your 500uH coil you have in the picture, there is about a 200% inductance increase if you compare·it to an equivalent air core.
    I'd be surprised if it were only 200%...· I did build a similar sized air core one yesterday and it was only 6 uH.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2008-08-19 16:18
    Rayman,

    That gyrator is great news! (Yes, I do hate winding coils!) I suspect a pullup (R3) from R2/C1 to Vdd is all you would need to bias it off the negative rail. Then you'd substitute R2||R3 for R2 in the formula for L. What's doubly neat about it is that R2 could theoretically be replaced by an nMOSFET, whose gate is driven by a DUTY-mode counter, to tune it for maximum output strength from the radio. I'm not terribly familiar with gyrators, but I assume one could also connect a cap from the input to ground to form a tuned circuit, right?

    BTW, yes, my Demo Board is the early "Mark I" version.

    -Phil

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    'Still some PropSTICK Kit bare PCBs left!
  • Beau SchwabeBeau Schwabe Posts: 6,545
    edited 2008-08-19 16:24
    Rayman,

    You right, I don't know what I was thinking, or where I came up with that number now.... I calculated about 4uH for an Air-Core of similar size.

    With 6uH that you measured it would be nearly an 8000% increase... Sorry


    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Beau Schwabe

    IC Layout Engineer
    Parallax, Inc.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2008-08-19 16:24
    Rayman,

    Addendum to my previous post: I suspect a pullup (R3) from R2/C1 to Vdd is all you would need to bias it off the negative rail. Then you'd substitute R2||R3 for R2 in the formula for L.

    -Phil

    The forum software wouldn't let me edit my previous post and gave me a weird error message about it being on a non-existent page.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    'Still some PropSTICK Kit bare PCBs left!
  • RaymanRayman Posts: 13,767
    edited 2008-08-19 16:31
    Oops. My gyrator may not be working at all... The radio sounds the same even with Vdd removed from the OpAmp...

    Actually, the radio still works the same without the 500 uH inductor too...· I suppose it's because I'm using a very large antenna (metal gutter drain).· I'll have to try this later at home where AM is stronger and I can use a short antenna...

    Post Edited (Rayman) : 8/20/2008 1:11:30 AM GMT
  • RaymanRayman Posts: 13,767
    edited 2008-08-20 01:12
    Well, now I'm confused because I tried it at home and just barely got something with the ferrite 500 uH inductor. Maybe it's my massive 2W 10-Meg resistor for the feedback resistor? I'll hook up a signal generator at work, if I get serious about it...
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2008-08-20 02:31
    Rayman,

    I didn't have much luck with a 10M in the breadboard area. That's why I picked A3 and A4: so an SMD resistor could be soldered "around the corner" on the Propeller chip itself.

    -Phil

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    'Still some PropSTICK Kit bare PCBs left!

    Post Edited (Phil Pilgrim (PhiPi)) : 8/20/2008 4:53:33 AM GMT
  • rjo_rjo_ Posts: 1,825
    edited 2008-08-20 03:27
    Phil,

    I just love threads like this... and right after OBC's meeting I'm going to dig into this.

    Thanks a bunch.

    Rich
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2008-08-20 03:33
    Rayman said...


    1. Just a few turns around a Digikey torroid ferrite gives 500 uH.


    Ah! That I have.. Can you be more specific about the number of turns and the wire
    you used, or should I count and guess? [noparse]:)[/noparse]

    OBC

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    New to the Propeller?

    Getting started with a Propeller Protoboard?
    Check out: Introduction to the Proboard & Propeller Cookbook 1.4
    Updates to the Cookbook are now posted to: Propeller.warrantyvoid.us
    Got an SD card connected? - PropDOS
  • RaymanRayman Posts: 13,767
    edited 2008-08-20 09:52
    OBC: Sorry, I didn't count, just took the photo...

    Phil: Guess I'll have to try this on a Proto board. No way I'm messing with my demo board! 10MEG is a pretty big value for a feedback resistor. I think I'm going to have to try smaller values...
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2008-08-20 15:01
    Rayman,

    I originally used a 470K feedback resistor but, upon Beau's recommendation, saw an improvement in performance with 10M. One nice thing about using a resistance that large is that you can solder it onto the Propeller chip and just leave it there. Causing less than a microamp of "leakage current", it's not going to interfere with normal functioning of the affected pins one iota.

    -Phil

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    'Still some PropSTICK Kit bare PCBs left!
  • RaymanRayman Posts: 13,767
    edited 2008-08-20 23:59
    Ok, I got it going on a protoboard with just my torroidal 500-uH indunctor, 47-nF capacitor, and 1-MEG feedback resistor. Got 3 stations pretty good and others with a lot of static.

    Using jumpers to make a ~2 meter antenna.

    No earth ground, the whole thing is floating under laptop power.

    No audio amp either, just basic RC filter to in-ear headphones (although the sound is a bit weak...).

    Now, I can see if my gyrator works or not!
  • VIRANDVIRAND Posts: 656
    edited 2008-08-21 00:33
    I think laptops make an awful lot of AM static, especially from their screens.

    In fact I used to use an AM radio as a diagnostic tool with computers,
    since the receiver would make different sounds depending on what programs were running or not.

    Then there's also that MP3 player program that transmits the music to a radio through the computer screen!
    www.hackaday.com/2005/12/25/tempest-for-eliza/

    Post Edited (VIRAND) : 8/21/2008 12:39:49 AM GMT
Sign In or Register to comment.