Sunday, September 22, 2024

RGB Dot Matrix Display as Multi-Function Panel Display



PxMatrix on ESP8266 connected to an 32x16 RGB DOT MATRIX 1/8 SCAN Panel

  • It was always wonderful to see the numerous colour displays that display messages and animations on Dot Matrix Displays (DMD) in the commercial places.
  • One useful thing would be to take an Off-the-Shelf Display and run fully controllable custom software rather than rely on some external products to do.
  • Luckily found a display vendor who offered to give me some DMD as samples for experimentation. I was given a P10 32x16 pixel color DMD panel.
  • I have experimented with Monochrome DMDs (maybe blog about this later) but the RGB display is another world all together.
  • The Monochrome world does not have lot of open source software, the RGB world has PxMatrix, RGBMatrix and SmartMatrix.
  • As I wanted the controlling entity to be super cheap which meant use of an 8266 I had to start with PxMatrix.
  • Though there are better options than PxMatrix, the others use a more expensive controller.
  • Its better to start with the lowest cost option and then go up the cost list.
  • The Demo worked like a charm and was able to get some sample colours and shapes.
  • After experimenting with the examples, there was an internet clock example.
  • As this support a generic display library like the adafruit_gfx library, one doesn't have to spend much time adding fonts, drawing primitives, updates, etc.
  • The above image was generated by using a tiny 4x5 font that is available online.
  • And using other available libraries, because the example one would sometimes get Internet time, I was able to consistently get accurate Internet time. Internet time is provided by the Network Time Protocol (NTP) and it reaches out to servers worldwide and after determining location is able to synchronise time to very highly accurate values like a few milliseconds.
  • Once this was done, there was an interest to find out what more can be achieved by this 150 INR controller.
  • It would be so cool to have a News Station with scrolling information of various kinds.
  • So decided to added International News Feeds, Commodity rates, Stock Market rates and also a Custom Message option
  • The Newsfeed library that was found was very rudimentary and did not function well in all conditions. So using this as a base, extended it to add NewsFeeds, web scrape for Commodity Rates(Gold,Silver, etc), scrape for Stock Market Information (low rate for now) and finally provide an interface for displaying custom messages.
  • Interestingly this is a 50 kilo Byte computer and the data that comes in is a few millions of bytes. There was no way this data could be saved and processed later as is done on big computers. Added stream processing of the received packets. This controller accesses the web page over HTTPS and then on the fly analyses and extracts the relevant information and stores it for later display.
  • As this controller also supports  WIFI, a simple server for a user to  control the various features by using a standard browser like Chrome was also implemented.
  • Enclosed below the finished feature set where any mix of features can be chosen.
  • It was indeed fun to have enabled International News Feed and just watch news from all over the world scroll on the display forever.
  • As can also be seen in the video, it was a very good day for the Indian Stock Market which had a 1000+ point surge.
  • Video shows Custom Messages, Commodity rate(gold) scrolling, Stock Market Index and News Feed from an Indian Media Company: Times of India.
  • Also there is an option to enter new News feed URLs which has not been used in this video.
  • Shortcomings:
    • As it is a single core controller, sometimes there are glitches seen on the Display
      • Maybe use other ways of sending data on the controller. Need to study
    • Uses a slower method of data transfer to the Panel. Need to search alternatives.
  • Maximum of 2 panels (?) are supported.