Tomodachi: Simple DIY Raspberry Pi expansion board
Even a quick search for "Raspberry Pi expansion board" yields an impressive array of boards for all sorts of practical uses. There are boards loaded with sensors, boards for driving motors, relay boards, and the list goes on. And if you need a basic expansion board with a couple of inputs and a display, there is Tomodachi. This expansion board is rather simple: two LEDs, two push buttons, and a small LCD screen are all you get. But Tomodachi does have a few redeeming qualities.
So what can you actually do with a Tomodachi board? Since you can program the board to run practically any command or script on the Raspberry Pi, Tomodachi essentially transforms the Raspberry Pi into a self-contained programmable appliance. Right out of the box, you can use the buttons to display the Raspberry Pi's IP address and power off the machine.
Of course, you can easily program the board to run practically any command or script. In fact, the supplied documentation shows how to use Tomodachi to display system information, weather conditions, transform the Raspberry Pi into an Internet radio player, and more.
Even if your electronics skills are not up to scratch, you can assemble your own Tomodachi board with a minimum of effort. Basic soldering skills are all you need.
The board uses a few widely-available and inexpensive components that you can buy from practically any store that sells electronics parts.
Tomodachi's schematics and PCB design are available under the GPLv3 license, so you can study, tweak, and improve the board.
The board's PCB has been designed using KiCad, and you can use this excellent EDA software suite to view and modify the original design.
Tomodachi comes with documentation that explains how to assemble and install the board and describes several projects you can use as starting points.
Practical example: Photo backup appliance for Android devices
If you are curious about how this works in practice, here is how you can use the Tomodachi board to transform the Raspberry Pi into a photo backup device for an Android device.
On the Raspberry Pi, run the following commands to install the required software and create directories:
sudo apt install mtp-tools jmtpfs
mkdir -p ~/BACKUP
mkdir -p ~/ANDROID
nano ~/backup.sh command to create a text file and open it for editing. Insert the code below in the file:
rsync -avh --delete /home/pi/ANDROID/Internal\ storage/DCIM/ /home/pi/BACKUP
sudo oled r
sudo oled +a "Backup completed!"
sudo oled s
In the example above, the
rsync command backs up the content of the DCIM folder on the Android device to the BACKUP directory on the Raspberry Pi. You can change this behavior, if needed.
Save the changes and make the script executable using the
chmod +x ~backup.sh command.
Open the tomodachi/scripts/commands.csv file for editing and add the following command:
Backup photos, /home/pi/backup.sh
Save the changes and reboot the Raspberry Pi.
Connect your Android device to the Raspberry Pi and make sure that the device is set to use the MTP protocol.
Use the SELECT button to select the Backup photos command, press **RUN**, and wait till the Backup completed! message appears on the display.
That's all there is to it.
© Dmitri Popov