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
Hardware Hacking
  • Challenges & Projects
  • Project14
  • Hardware Hacking
  • More
  • Cancel
Hardware Hacking
Blog The PAL-Streamer
  • Blog
  • Forum
  • Documents
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Hardware Hacking to participate - click to join for free!
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: zst123
  • Date Created: 13 Jun 2020 3:18 PM Date Created
  • Views 1267 views
  • Likes 7 likes
  • Comments 2 comments
  • hardwarehackingch
  • hardwarehackch
Related
Recommended

The PAL-Streamer

zst123
zst123
13 Jun 2020
image

Hardware Hacking

Enter Your Electronics & Design Project for a chance to win a $200 shopping cart!

Submit an EntrySubmit an Entry  Back to homepage image
Project14 Home
Monthly Themes
Monthly Theme Poll

 

The PAL-Streamer

Transmit a video stream to a PAL analog TV using low-frequency PWM

 

Goal of my project

To create a video streamer to do PAL VHF transmissions with no external components and supports using slow microcontroller clocks.

 

Even with a slow timer clock frequency, I demonstrate how to transmit a valid video stream to a PAL Analog TV on channel 3 VHF. This is done by taking advantage of higher-order harmonics from a PWM square wave signal to achieve the desired frequency. PWM is used for VHF modulation. By taking advantage of square wave odd harmonics, I can transmit at a lower frequency. PWM duty cycle is also used to simulate the amplitude. In my case, I am transmitting a slow 6.86MHz PWM output and the 9th harmonic is 61.71MHz (it is picked up on channel 3 of the TV).

 

Video demonstration

  • I demonstrate and also explain how it works in this video.

 

You don't have permission to edit metadata of this video.
Edit media
x
image
Upload Preview
image

 

https://www.youtube.com/watch?v=O6DGFEbg23w

image

 

Block diagram of the project

  • To wire this project up, only 3 GPIOs are needed.
    • PA10 = PWM output serving as the antenna
    • PA11 = USB D- pin
    • PA12 = USB D+ pin
  • This diagram shows the schematic of the project

image


Inspiration of the project

  • My initial idea was to display images on it. I wanted to make a simple & cheap analog TV transmitter from parts I had lying around.
  • I searched online and I came across @CNLohr avr_vhf project. He used an AVR ATTiny85 to generate PWM waveforms which were picked up by his TV.
  • I found it clever and genius because I didn't know that a square wave PWM could serve as AM modulation.
  • In his case, he both overclocked the MCU to 30MHz and used PLLx8 to the timer. Thus, his timer is clocked at 240MHz and with a period of 4, its output is 60MHz (approximately the frequency of CH3).

 

Technical details

  • I looked around for an alternative because I did not have a fast enough microcontroller. (ie. to transmit at CH3 of 61.25MHz, I need the timer to be clocked at minimum 2x the speed -- at least 122MHz for PWM)
  • I am not a fan of overclocking the internal oscillator because the frequency drifts easily.
  • I realised that PWM is a square wave and thus it has odd harmonics. I thought it would be creative if I could simply output a lower frequency (of which its harmonics matches the TV channel frequency).
  • In my case, through trial and error, I managed to get a clear image on the TV with a 6.86MHz PWM output. The 9th harmonic is 61.71MHz which is about CH3 frequency.
  • In theory, you can replicate this behaviour on any slow microcontroller (like an Arduino Uno which does not have PLL). Because you can take advantage of the odd harmonics to achieve the channel frequency.

Odd Harmonics.


Real-time video streamer

  • Next, I wrote a Python script to transfer image data from a PC to the microcontroller.
  • Without external components, I tried USART and it is possible, which means but the maximum baud-rate of 3 million gave me about 10 FPS.
  • The fastest way was to use DMA and USB OTG FS (Full-Speed). I simply needed to add a USB cable and 2 wires (D+/D-).
  • The MCU receives the video stream from the PC and transmits it to the TV using AM modulation via PWM. It is fast enough to transfer GIF files in real-time.

image

 

Where I sourced these components

  • Portable Analog PAL TV (Found at home in my store room)
  • STM32 NUCLEO-F411RE (Cheap microcontroller board I had around)
  • Mini USB port (Leftover from my other projects, I didn’t have a breakout board so I hand-soldered wires onto a perfboard)


Why I used these components

  • Right now, due to the global pandemic situation and stay-home measures in place, I have more free time. However, I am constrained of resources as shipping delays have made it difficult for me to source components. My goal was to use whatever I had lying around, with as few external components as possible.


Future improvements

  • Right now the Python program running on my PC supports only images and GIF files which are transferred in real-time to the microcontroller. I am planning to improve on it, perhaps by using an ffmpeg stream instead. I am still learning how to use ffmpeg and, hopefully, it can stream actual videos or even a webcam stream.
  • A square wave is usually not the way people transmit because the harmonics can actually cause interference to other channels. I am now experimenting with adding a bandpass filter to the output, so that I can have the best of both worlds
    • (1) transmitting at a slower frequency, and
    • (2) a clean sine-wave AM modulated frequency
  • For the issue on the distorted effect on the TV, in theory it can be fixed by synchronising the TV refresh rate to the PC python program. I'm still wondering how to exactly fix it because the USB transfer rate varies slightly each time it is done.


Conclusion

I hope this project inspires you to do something better.

Feel free to ask any questions or suggest improvements. If you spot any mistakes, do let me know too as I am still learning.

Thank you for reading.

  • Sign in to reply

Top Comments

  • neuromodulator
    neuromodulator over 5 years ago +2
    Very interesting project, I did something similar broadcasting FM radio. Is your code available? Have you tryed to broadcast video (maybe at low resolution)?
  • zst123
    zst123 over 5 years ago in reply to neuromodulator +1
    Cool, FM radio sounds hard because of changing frequency is more complicated. Yes my code is available on GitHub. https://github.com/zst123/PAL-Streamer So far did GIFs because of it is simple. I have…
Parents
  • neuromodulator
    neuromodulator over 5 years ago

    Very interesting project, I did something similar broadcasting FM radio. Is your code available? Have you tryed to broadcast video (maybe at low resolution)?

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • zst123
    zst123 over 5 years ago in reply to neuromodulator

    Cool, FM radio sounds hard because of changing frequency is more complicated.

     

    Yes my code is available on GitHub.

    https://github.com/zst123/PAL-Streamer

     

    So far did GIFs because of it is simple. I have an idea and I just found out about the possibility of using FFmpeg to stream but I haven't got any working videos yet.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
Comment
  • zst123
    zst123 over 5 years ago in reply to neuromodulator

    Cool, FM radio sounds hard because of changing frequency is more complicated.

     

    Yes my code is available on GitHub.

    https://github.com/zst123/PAL-Streamer

     

    So far did GIFs because of it is simple. I have an idea and I just found out about the possibility of using FFmpeg to stream but I haven't got any working videos yet.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
Children
No Data
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