Cryptocurrency and Stock Price Ticker

by Puffball101961 in Circuits > Raspberry Pi

2895 Views, 34 Favorites, 0 Comments

Cryptocurrency and Stock Price Ticker

img3.jpeg
img23.jpeg

Hi, and welcome to my process in making a Cryptocurrency and Stock price ticker using a Raspberry Pi. The project is centered around a Raspberry Pi and 2 64x32 RGB Matrix Panels, to give the ticker that authentic 'wall street' look. The software side is based on Hzeller's amazing work on the rpi-rgb-led-matrix python library. This wouldn't be possible without his and other contributors help. My project is still somewhat a Work In Progress, and is just a small hobby project that I have done, so sorry for the lack of super detailed steps. This kind of assumes that you have worked with Raspberry Pi's before and have some knowledge of electronics.

I highly encourage you to read the whole Instructable before making this so you understand how it goes together at every step.


Github repo: https://github.com/Puffball101961/matrixticker

Supplies

wave.jpg
socket.jpg
psu.jpg
hat.jpg
term.jpg
pwm.jpg

To recreate this you will need:

  • A Raspberry Pi, I used a 3A+ for its powerful enough CPU and relatively small form factor. You could use a Pi 3B or 4 but they are hard to come by and more powerful and larger than needed. I haven't tested this with a Pi Zero so use one at your own risk. I also strongly recommend getting a heatsink for the Pi's CPU.
  • A 16GB+ MicroSD card is needed, preferably a good brand such as SanDisk for endurance.
  • 2x 64x32 RGB Matrix Panels (2.5mm pitch). I used Waveshare branded panels, which come with all the connectors needed. The 3D printed case is also based around these panels, so you may need to check the measurements of your panels to the Waveshare panels to make sure they will fit.
  • 5V 10A Power supply. I used a unit that takes mains voltage and converts it to 5V DC. I don't recommend using a power brick as these aren't meant to deliver that much current through a barrel connector. You will also need a way of connecting the power supply to the wall, I used a 3 pin cable with a fused socket (see pictures). You may need to buy an appropriate fuse for the socket if it doesn't come with one.
  • Adafruit RGB Matrix HAT. I used the version with the RTC as it was the only one available at the time, however the smaller version without the RTC will work fine.
  • 2x 60mm Fans. I used 5V fans, however I would recommend using 12V fans as the 5V fans can get very loud. Running 12V fans at 5V will run them at a lower speed. If you are using 5V fans a DC Motor PWM controller or 100ohm potentiometer can slow down the fans.
  • Wires: You will need to have spade terminals that fit the screw mounts on your PSU. All wires that need to go to the power supply should be terminated with these spade terminals, including: The Micro USB cable for the Pi, the fans, RGB Matrix power cable (the Waveshare ones come with spade terminals already) and the Mains plug connector.
  • Screws of various sizes (see images for dimensions of holes)

To fabricate the case, you can 3D print it or make your own out of wood or plastic. Please check your components with the 3D files before printing to make sure they will fit.

A soldering iron and terminal crimpers are needed as well.


Obviously, coffee is mandatory

3D Print / Fabricate the Case

dim1.png
dim2.png
dim3.png

I created the case for my ticker in Fusion 360. I am not a very good modeller so if you have any suggestions let me know in the comments. In the Github repository there are STL's that have pieces of the case, the pieces were cut so they would fit on an Ender 3 build plate (235x235mm). Also in the repo is the .f3d file so you can make your own alterations. I highly encourage sharing of alterations to the case so everyone can benefit.

Steps:

1: Check the dimensions of the case to your parts. You may need to tweak the design if your parts do not fit.

2: Print one of each of the STL files.

3: Join the pieces together, I used superglue. Join the lid pieces together but do not glue them to the case. Leaving some pieces like the front detached from the rest of the case during assembly will make fitting the parts easier.

4: Finish the case how you see fit, whether that's leaving it as is, sanding it or painting it. I sanded mine then sprayed a clear coat on top.


Terminate Your Wires

spade.jpg

You must terminate all wires that go to the power supply with an appropriately sized spade connector. You will need to crimp these terminals on, however I also recommend soldering the wires to the connectors for extra strength. Ideally before you cut any cables you should see how everything will fit in your case and if your wires are long enough.

You will need to terminate the following wires:

  • Micro USB cable for the Pi
  • Fan wires/ PWM controller input wires.
  • RGB Matrix power wires (if not already terminated with a spade connector)
  • Mains power connector wires (if not already terminated with a spade connector)

1: Check what size terminal fits your power supply. It should go in easily when the terminal is unscrewed, but be held in tight when the screw is tightened.

2: Strip the wires and tin them with some solder.

3: Insert the wire into the end of the terminal and solder it to the metal.

4: Crimp the connector to the wire.

5: Check that the connection is solid.

Enable Hardware Pulses on the Adafruit HAT

adafruit-mod.jpg

To reduce flicker on the panels we need to make a slight modification to the HAT. Simply solder pins 4 and 18 together with a small piece of wire. (Image credit to Hzeller)

Prepare the SD Card

imager.png

This step will require a PC or laptop and a Micro SD card reader.

1: Insert the Micro SD card into the reader, and connect it to your PC

2: Download and install Raspberry Pi Imager from the Raspberry Pi Foundation Website (https://www.raspberrypi.com/software)

3: Select 'Raspberry Pi OS Lite (Legacy)' in the OS tab

4: Select the SD card in the device tab

5: Click the settings icon in the bottom right corner and enable SSH, and configure the Wireless LAN options with your WiFi details. Click save when done

6: Click Write

Once the imaging is done insert the Micro SD card into the Pi.

Install the Hardware

hardware.jpg
1.jpeg
2.jpeg
3.jpeg
4.jpeg

Now it's time to put the hardware in the case. The case I designed does not have a huge amount of space, so pieces must be installed logically and neatly.

1: Push the RGB Matrix panels into the front, ensuring the arrows are pointing to the right, when looking from the inside. Use some screws to hold the panels in place by pushing them through the bars at the top and bottom of the matrix cavity. Connect the 2 inner panel connectors with a ribbon cable, and connect the other ribbon cable to the left most connector (when looking from the inside). Connect the panel power cable to both panels.

2: Slide in the 3 Pin mains connector into the left side. It should click into place. If it doesn't try giving the ridges in the hole a sand to make them slightly thinner, or just glue it in.

3: Screw in the fans using small nuts and bolts. I had the fan on the right as an intake and the other fan an exhaust.

4: Screw in the Pi into the small standoffs near the right fan, and slide on the Adafruit HAT. It is easier to put in the Micro USB cable if you connect it before screwing the Pi in. Make sure the micro sd card is inserted before screwing the Pi in.

5: Connect all spade connectors to the PSU. BE CAREFUL!! Ensure you connect each wire to the correct terminal, positive to positive and so on. For the mains connector Red is Live/Positive, Black is Neutral and The Green/Yellow wire is ground. Live may be marked as a + or L, Neutral may be marked as a - or N and ground will be marked with some horizontal lines in the shape of a triangle, and a vertical line on the top. NOTE IF YOU ARE USING A PWM CONTROLLER: Instead of wiring the fans directly to the PSU, wire them to your PWM controllers motor output, and then wire the controller input to the PSU.

6: Slide the PSU in to the case. There are some notches on the bottom of the case to help align it into position. In my case I didn't have to stick it with double sided tape, but you may have to.

Turn It On!

explo.jpg

Plug in your 3 Pin connector to the socket and flick the switch. If you have assembled it correctly, the fans should start going and the Pi should have a red light and a flashing green light. Nothing should appear on the panels at this point. Hopefully there won't be any magic smoke...

Installing the Software

Find your Pi's IP address and SSH in with the default username and password: pi and raspberry respectively.

Run these commands in your terminal, one at a time, to download and install the software:

sudo apt-get update && sudo apt-get upgrade -y
sudo apt-get install git
git clone https://github.com/Puffball101961/matrixticker && cd matrixticker
sudo chmod a+x setup.sh
sudo ./setup.sh

The script should automatically configure your Pi to run the Ticker.

Updating the Software

Log into your Pi and run these commands to update the software on your ticker:

cd matrixticker
sudo chmod a+x setup.sh
sudo ./update.sh

Troubleshooting

Having Issues?

RGB Matrix Issues? Check out the Troubleshooting section at Hzeller's repo: https://github.com

Other issues: Leave a comment. I'll try help you as much as I can, remember I am only one person.

Contributing

If you end up making this I want to encourage you to share any changes you make to the code or case design. Simply open a PR on the github repository and if approved it will be merged into the repo.