element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Members
    Members
    • Benefits of Membership
    • Achievement Levels
    • Members Area
    • Personal Blogs
    • Feedback and Support
    • What's New on element14
  • Learn
    Learn
    • Learning Center
    • eBooks
    • 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
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Dev Tools
    • Manufacturers
    • Raspberry Pi
    • RoadTests & Reviews
    • Avnet Boards Community
    • Product Groups
  • 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
RoadTests & Reviews
  • Products
  • More
RoadTests & Reviews
Blog Riding-the-Rails with a Raspberry Pi Zero 2W: Introduction Model Train Stuff
  • Blog
  • RoadTest Forum
  • Documents
  • Events
  • RoadTests
  • Reviews
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
  • raspberry pi 2W
  • pi camera
  • Subscribe by email
  • More
  • Cancel
  • Share
  • Subscribe by email
  • More
  • Cancel
Related
Recommended

Riding-the-Rails with a Raspberry Pi Zero 2W: Introduction Model Train Stuff

colporteur
colporteur
24 Feb 2022

Welcome to the second of six blog posts in support of the Raspberry Pi Zero 2W Roadtest. The blog posts will explore different aspects of the product while attempting to engage the E14 Community members. Comments and questions to the blog posts are welcomed and encouraged. The blog posts will serve as the resources for assembling the RoadTest Review document.

The project objective is to pair a Raspberry Pi Zero 2W with a camera, assemble it on a HO scale model railroad car with a power source and stream or record video of the train in motion.

image 

I confess I don't enjoy playing with model trains. My playing or rather making with model trains involves creating animation on model railroad layouts using technology. Since I don't do trains, I engaged the model railroaded community to come up with a design to transport the Pi2W and camera assembly.

The initial napkin design was limited. The railroaders just looked at a rail car to carry the load and are done with it. I suggested that their idea was short-sighted. A camera on a rail car would be cool to take to train shows. They could video record people as the train passed and display the content on a monitor. I suspect their initial design response was to just find a solution and go back to playing with the trains. I try not to create stuff that can have practical applications post-development. After some encouragement (i.e. another round of beers on me) the railroaders started throwing out ideas and came up with a more workable solution.


image

IMAGE TITLE: Assembly 1

image

IMAGE TITLE: Assembly 2

image

IMAGE TITLE: Assembly 3

image

IMAGE TITLE: Assembly 4

image

IMAGE TITLE: Assembly 5

After looking at a number of different rail cars, it was decided the Well Car, a rail car that carries pup freight boxes worked best. My wish was to place the camera inside a passenger car or a locomotive. I know little about HO model scale. The locations I selected were not ideal because of the limited space inside the cars. Tandem Well Cars accommodated the load.

Did I mention the load has gotten bigger? The plan was to have just a PiZero2W, camera and power source. The railroaders asked to make the camera movable. Now the camera is on a motorized mount controllable from the Pi. The plan is to create a container shroud that will cover the load. Model railroaders are focused on making things look real. I will check in occasionally to follow progress while the model railroaders play with a physical implementation. 

I have pointed out the need for physical access requirements for things like power and GPIO as they consider the finished design. You can see they have asked to incorporate a motor to reposition the camera. My focus will be generating image content. Rinding the rails is not my primary focus. I have no doubt the railroad community will make the load transportable. I suggested to the physical transport designers that if the PiZero2W is not up to the task may be the load will have to be a Pi4.

The next blog post will be Riding-the-Rails with a Raspberry Pi Zero 2W: Introduction Model Pi Stuff. This will examine computer hardware/software requirements for the project, provide a short history lesson of the Pi Zero and explore the technical design decisions.

  • Sign in to reply
  • beacon_dave
    beacon_dave over 1 year ago in reply to colporteur

    Spotted this entry-level guide today:

    https://www.wowza.com/blog/complete-guide-to-live-streaming

    May be of interest.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • beacon_dave
    beacon_dave over 1 year ago in reply to colporteur

    "...Your screen idea is the first but then modelers are not thinking of technology..."

    Another use of screens would be for arrival/departure board displays like the one done in the Internet of Lego project 

    http://www.internetoflego.com/train-schedule-display-2/

    http://www.internetoflego.com/train-scheduled-automation-2/

    and digital billboards...

    http://www.internetoflego.com/billboard-espeasy-oled-display/

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • beacon_dave
    beacon_dave over 1 year ago in reply to colporteur

    If you want to stick with FFMPEG then I refer to these two books a lot:

    https://www.amazon.co.uk/Learn-Produce-Videos-FFmpeg-Minutes/dp/0998453013/ref=sr_1_1

    https://www.amazon.co.uk/FFmpeg-Basics-Multimedia-handling-encoder/dp/1479327832/ref=sr_1_2

    FFmpeg can do a lot from the command line but it can appear very cryptic to use at times. The first book is an easy-going read and will introduce you to setting correct encoding parameters etc and will introduce you to HLS and MPEG-DASH delivery however it doesn't cover live streaming and server side aspects. Jan has spent a life-time optimizing encoding parameters and writing about his findings from a content producer perspective.

    The second book covers a lot more of the bells and whistles of FFmpeg but it is more of a reference book than a dummies guide, although it does show some typical example usage as well as a breakdown of the various parameters.

    Both should help if that previous link to the Martin Riedl FFmpeg blog wasn't clear. 

     

    Jan Ozer who wrote the first book has his own training site over at: 

    https://streaminglearningcenter.com/ 

    which is probably has some of the more useful training material around all in one place these days. A lot of the site content now appears to be full-blown paid-for training (lock-down income I suspect), but you can often find some of his presentation recordings over on  Streaming Media dot com which cover a lot of the entry-level ground as well as more detailed encoding workshops.

    If you are quick though it looks like you can get access to one entry-level course for free before the end of the month:

    https://streaminglearningcenter.com/learning/introduction-to-streaming-media-for-non-technical-staff.html

    A lot of people these days producing live content on the cheap are just ingesting the video source into OBS and then outputting a RTMP stream and pushing it up to YouTube and then embedding the YouTube player in a web page. Depends if you are trying to script this or not though.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • colporteur
    colporteur over 1 year ago in reply to beacon_dave

    I'm not that familiar with streaming technologies. Do you recommend any "Streaming for Dummies" type resource material? I'm not averse to buying books on the topic but I would like to have the confidence the content is something that will help.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • beacon_dave
    beacon_dave over 1 year ago in reply to colporteur

    "...I've kludged together the code to get video but I would really like to make it display content on a browser..."

    If you replace ffplay with ffmpeg then you could live transcode the video into HLS and drop it onto a web server folder suitable for playing back in a web page as a HLS live stream.

    https://www.martin-riedl.de/2018/08/24/using-ffmpeg-as-a-hls-streaming-server-part-1/

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • 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 © 2023 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

  • Facebook
  • Twitter
  • linkedin
  • YouTube