Introduction: Numismatic Clock
REAL is the brazilian currency since 1994 and for celebrate its 25th aniversary, last year (2019) the Casa da Moeda (brazilian mint) made a commemorative 1 REAL coin with a hummingbird in the obverse (not the usual effigy of the republic).
The hummingbird was the image on the 1 REAL bill when the currency was launched 25 yers ago. The 1 REAL bill is no longer produced.
You can change the JPG files to show another currency (euro, pesos, dolar, etc) and it will work in the same way.
- Raspberry Pi board
-TFT 3.5'' LCD
Step 1: Preparing the Box
I had this old wooden box laying around for long time, I think it was used to keep teabags. I "break" the front panel and made a square hole with a Dremel tool to fit the 3,5'' display.
After mount all the componentes I will glue the piece back.
The display is hotglued to the panel.
Step 2: Coding
The very function of the RaspberryPi in this project is to display a webpage on Chrome in fullscreen mode.
For example if the time is 3:05, it will show a 2 REAL bill and a 1 REAL coin for the hours, and a 5 cents coin for the minutes.
I made the actual page available to test on the link http://numismaticclock.freetzi.com , but in the project it wil be running locally.
The script prints the tags to show pictures every time the page is loaded. A variable gets the actual minute of the system outside the timing function while another variable gets it inside the function. Every second, these two variables are compared, and if they are different it means a minute had pass, so the page is refreshed.
Step 3: Setting the Right Raspbian Image
First of all, you will need to download the especific Raspbian image that work with your display. In my case, my display is the KeDei 6.2 version, so I downloaded the distro from http://kedei.net/raspberry/raspberry.html
You will need a software called WinDisk32Imager to burn the image on a SD card and then, boot your board.
Step 4: Transfer the Files to the Board
The content of the file relogio.rar (Step 3) will need to be transfered to the RaspberryPi.
You can use a pendrive to do or can make it through SSH with a software called WinSCP. Put all the files in a folder inside /home/pi/
The path of the index.html file will be ~/home/pi/relogio/index.html
I recommend use Putty to make easier to do the next settings.
Step 5: Setting Linux Parameters
At this point, the files are saved on your board and you can connect a keyboard, open the navigator and type /home/pi/relogio/index.html in the addressbar. It will display the clock page, then press F11 to enter fullscreen mode and its done!
But we can make it better.
You can download a software that hides the mouse cursor when its not in use.
sudo apt-get install unclutter
When its finished, you type the following command to hide the cursor if it not moves for 2 seconds:
sudo unclutter -idle 2 -root
Chrome browser can be opened through the command line in fullscreen mode and direct to the clock page (dont use sudo int his command):
chromium-browser --homepage /home/pi/relogio/index.html --start-fullscreen
We can make it even better.
We will setting an alias, i.e., with a single command we will run the software to hide the cursor and open Chrome on the clock page.
To do so, type the following command:
sudo nano /home/pi/.bashrc
Near the "Alias definition" section, insert the following text (just like the image):
alias relogio='chromium-browser --homepage /home/pi/relogio/index.html --start-fullscreen | sudo unclutter -idle 2 -root &'
Close and reopen your terminal or type:
Now when you type the command relogio on the terminal, it will automatically run the unclutter software and opens the Chrome.
Step 6: Placing the Components
The RasbperryPi I used in this project is heavily damaged. Only two USB ports still works and I extend them with jumpers to put it in te back of the box. I also made an extension from the PP1 and PP2 solder spots on the board to a power connector.
Also mode another square hole ont he left side for the ethernet connector.
Step 7: Finishing the Box
I cut some popsicle sticks to make a frame around the screen in order to hide some imperfections.
I could easily glued the front panel back in the box. Also glued a magnet to hold a commemorative coin above the screen.
Step 8: Enjoy Your Numismatic Clock
The box has space to hold a power bank inside, if you use a dongle for wifi (or a newer version of the board) it will make it full wireless.
Step 9: Enjoy Your Minicomputer
It can be used as a regular computer, running a storage server for example.
I hope you enjoy and it could and be helpful in similar projects.
PS. Sorry for the dirty keyboard :)
Participated in the