Close
0%
0%

The Inspirer

Cheer up your day with inspirational quotes & MP3 music for your desktop!

Similar projects worth following
The days are getting shorter, darker, and colder again - let's fight the winter blues with cheerful, positive, and inspirational quotes backed up by your personal soundtrack! This gadget sits on your desktop and showers you with its inspirational quotes. It delivers its positive energy with a retro-authentic, reassuringly non-intimidating and low-tech alphanumeric LED display. Like in the good old days. Meanwhile, press a forward or backward button (yes, it's as simple as that! no menu diving) to listen to your favorite MP3 songs.

It's function is best explained with a demo video:

To build one, you'll need to get the listed components. You can either make your own Arduino-board like I did, or just use a standard Arduino Uno R3. R3 (or ATmega 328p) is the minimum though.


The Database of Quotes

The quotes are stored on SDcard - you can download the already processed DB from here https://cdn.hackaday.io/files/1831287834948352/db.zip and simply unzip it to a FAT32 formatted SD card. This SD card goes into The Inspirer.

I said "processed" DB - the DB is produced by a Python converter script https://cdn.hackaday.io/files/1831287834948352/readcsv.py which reads in the original quote CSV "database". From the CSV, it creates smaller, individual files, one per category. Note that some longer quotes need to be excluded by the script due to SRAM shortage on the ATmega side.

You can also easily add your own quotes and categories. If you do so, you must change the "mappings" file though, https://cdn.hackaday.io/files/1831287834948352/mapping.txt which first lists the total number of categories, and then the category names. For each listed category, there must be a ".txt" file with that exact name.

A quote file has the following structure; e.g., see marriage.txt: 

187
A good marriage would be between a blind wife and a deaf husband.
Michel de Montaigne
Marriage is neither heaven nor hell, it is simply purgatory.
Abraham Lincoln
... 

The number 187 is the number of quotes in that category / file (marriage.txt), and then one line for the quote and one line for the author. That's it - simple, right?


Usage & Setup Instructions

Well, I don't have a schematics for this one, and I don't think it's really necessary. You can set it up any way you like. Please have a look at this picture to get an idea: 

From left right, you see the LM7805 5V regulator and its 2 capacitors (100 uF and 10 uF), then the on/off switch, then the TQFP ATmega 328p with its 16 MHz crystal and 20 pF capacitors on a TQFP-2-DIP adapter board (the ATmega is facing towards the other side, so you can not see the chip, only the board), then there is the PAM audio amplifier, the SDcard module, and finally the MP3 module. Two loudspeakers, and the row of 5 buttons at the bottom. Held together with hot glue and extra strong double sided Scotch mounting tape.

The middle button is the SHIFT button; then, to the left of the SHIFT button, there is the  "Previous Song" and the "Next Song" button.  To the right of the SHIFT button you'll find the "Fix Category" and "Random Category" buttons. The idea is that upon power-up, The Inspirer delivers random quotes from random categories. However, if it comes up with a category you really like, you can push the "Fix Category" button to get more quotes from that same category, until you specify your own category, or push the "Random Category" button again. If you hold down the SHIFT (middle) button together with the just explained buttons, you will get "Previous Category" and "Next Category", as well as "Volume Up" and "Volume Down" as alternative button functions.


Here are the required pins; please refer to the Arduino pinout, the code snippet below, and my explanations below for further clarification: 

//
// Buttons GPIO Pins 
//

#define NEXT_SONG_NEXT_CAT_BUTTON 14 
#define PREV_SONG_PREV_CAT_BUTTON 15
#define RND_CAT_VOL_UP_BUTTON 16
#define FIX_CAT_VOL_DOWN_BUTTON 17
#define SHIFT_BUTTON 2 

//
// MP3 player Pins UART 0 / 1 
//

#define TX 0
#define RX 1

//
// SD Card Chip Select = 10 ( PB2 ) 
// 

#define SDCARD_CHIP_SELECT 10 // PB2

//
// I2C Addresses of the 4 Adafruit Alphanumeric Backpacks 
// 

disp1.begin(0x74);  
disp2.begin(0x71);  
disp3.begin(0x70);  
disp4.begin(0x72);  

Note that you will need to assign unique I2C addresses to the 4 different Adafruit Alphanumeric Backpacks. As you can see in the code snippet above, I have used 0x74, 0x71, 0x70, and 0x72 (kind of random)....

Read more »

mapping.txt

The mapping file lists the number of categories, and then the categories itself. The categories have to correspond directly to the file names containing the quotes of the category.

plain - 2.02 kB - 12/18/2021 at 18:39

Download

QUOTES.CSV

The original quotes "database" in CSV format. This file is converted with readcsv.py into a set of smaller files, see DB zip, which are used by The Inspirer.

ms-excel - 11.89 MB - 12/18/2021 at 18:34

Download

readcsv.py

The Python converter - reads the CSV, and creates the files found in the DB zip.

x-python - 1.41 kB - 12/18/2021 at 18:33

Download

db.zip

The pre-processed database of quotes. These files were generated from the attached CSV file with the help of the Python program.

Zip Archive - 421.80 kB - 12/18/2021 at 18:31

Download

TheInspirer-v2.ino

Arduino code

ino - 13.01 kB - 12/18/2021 at 18:15

Download

View all 18 components

View project log

Enjoy this project?

Share

Discussions

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates