element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Raspberry Pi
  • Products
  • More
Raspberry Pi
Raspberry Pi Forum Synthesizing RF with a RPI GPIO Pin !
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Raspberry Pi to participate - click to join for free!
Featured Articles
Announcing Pi
Technical Specifications
Raspberry Pi FAQs
Win a Pi
Raspberry Pi Wishlist
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • Replies 18 replies
  • Subscribers 656 subscribers
  • Views 2842 views
  • Users 0 members are here
Related

Synthesizing RF with a RPI GPIO Pin !

scottiebabe
scottiebabe over 2 years ago

Soft 404

  • Sign in to reply
  • Cancel
  • scottiebabe
    scottiebabe over 2 years ago

    So neat! So far all I know is that GPIO 4 is configured to output a clock signal

    image

    I believe the software claims an unused PLL and then DMA's control words into one of the config registers to frequency modulate the carrier.

    There is also this github repo: https://github.com/F5OEO/librpitx which I guess is the low level implementation...

    • Cancel
    • Vote Up +4 Vote Down
    • Sign in to reply
    • Cancel
  • baldengineer
    baldengineer over 2 years ago

    Thanks for expanding on this concept!

    I saw your comment on the Tek forum and made a mental note to look into it later. (But then quickly forgot.)

    Do you know if there is some underlying magic? Or are they (rpitx) bit banging the GPIO just right?

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Cancel
  • scottiebabe
    scottiebabe over 2 years ago in reply to baldengineer

    Well for FM, I believe they are just adjusting a PLL's output frequency by loading new divider values.

    The output spectrum contains spurs and harmonics, so it's not a pure RF tone. So if one actually wanted to transmit into the air an appropriate bandpass filter would be needed. But for playing with test equipent or an SDR its no big deal.

    How they create AM or SSB, does feel a bit like voodoo at this point. It would seem they have devised a method to go from IQ samples to a GPIO pin state, i'm not entirely sure what that involves, must be magic! 

    An impressive amount of fun for just soldering a resistor to a GPIO pin!

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • baldengineer
    baldengineer over 2 years ago in reply to scottiebabe

    Oh wow, that's clever!

    Even more, wow, searching FT8 and Pi Zero comes up with a bunch of stuff. Like, this FT8-specific project. I had no idea people were doing anything like this with "just" the GPIO.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Cancel
  • scottiebabe
    scottiebabe over 2 years ago

    Gist failed?

    void clkgpio::SetPhase(bool inversed)
    {
    	uint32_t StateBefore = clkgpio::gpioreg[GPCLK_CNTL];
    	clkgpio::gpioreg[GPCLK_CNTL] = (0x5A << 24) | StateBefore | ((inversed ? 1 : 0) << 8) | 1 << 5;
    	//clkgpio::gpioreg[GPCLK_CNTL_2] = (0x5A << 24) | StateBefore | ((inversed ? 1 : 0) << 8) | 1 << 5;
    	clkgpio::gpioreg[GPCLK_CNTL] = (0x5A << 24) | StateBefore | ((inversed ? 1 : 0) << 8) | 0 << 5;
    	//clkgpio::gpioreg[GPCLK_CNTL_2] = (0x5A << 24) | StateBefore | ((inversed ? 1 : 0) << 8) | 0 << 5;
    }

    Well that would take care of BPSK modulation 

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • baldengineer
    baldengineer over 2 years ago in reply to scottiebabe

    Ah yes. I totally see how that is the case ....... Slight smile

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • neuromodulator
    neuromodulator over 2 years ago in reply to scottiebabe

    For AM I believe you change the duty cycle of carrier, but don't quote me on that. I don't understand why they don't use the full FM bandwidth with the RPITX.
    Other cool stuff that I've seen is that some have transmitted even colored NTSC signals. FPGAs are also pretty good at this because you can get very accurate pin control at very high speeds.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Cancel
  • gpolder
    gpolder over 2 years ago

    rpitx indeed is great, actually it is developed from pifm what was already out 10 years ago and developed by by Oliver Mattos and Oskar Weigl. I made a SSTV transmitter with pifm back in 2014:

     Raspberry Pi Slow Scan Television (SSTV) Camera 

    and:

    https://www.agri-vision.nl/portal/projects/7-raspberry-pi-sstv-camera

    • Cancel
    • Vote Up +3 Vote Down
    • Sign in to reply
    • Cancel
  • Dudley
    Dudley over 2 years ago in reply to scottiebabe

    You got the gist format wrong. This was spitting out a ton of errors that we spotted in one of our tools, so I've fixed it

    I also noticed the interface for the github gist with the instructions on how to use it has link that people outside of the company won't be able to access, so I've raised a ticket to make that interface easier to use and better documented Slight smile

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • Cancel
  • scottiebabe
    scottiebabe over 2 years ago in reply to Dudley

    Opps, I'm sorry, I barely know how to use git. Thank you for researching the correct way, I will reference your example in the future.

    PS I like how the mp3 files embedded showed up with an in page player, very cool!

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • Cancel
>
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube