pirateradiohack / Transistor_Deprecated

Open source DIY web radio receiver!
BSD 3-Clause "New" or "Revised" License
15 stars 2 forks source link

Transistor Build Status


Deprecation status

This version is for the Raspberry Pi Zero W version 1 only.
It was the first version of the Transistor software.
It is not maintained any more but should work as described here.
You can download it here: https://github.com/pirateradiohack/Transistor/releases/download/2022-04-10-Fix_Podcasts_Update-SSH/image_2022-04-10-Transistor-lite.zip

Development efforts are being made in the new repository (https://github.com/pirateradiohack/Transistor) to support the Raspberry Pi Zero W version 2, and if possible also the version 1.

This repository will be kept in its current state.


Build your own radio set and listen to web radios, podcasts and bluetooth.

 Transistor 3D printed case.

🇬🇧 Quick Setup + User Manual
🇫🇷 Manuel de mise en route et d'utilisation

All you need to do is copy the image to a micro SD card and insert it in the following hardware:

(if you find better hardware parts please tell me!)

Get the components, assemble them together and build the case with a 3D printer:

(You will need to adapt the battery compartment to fit you own battery.)

Alternatively you could use your own case, or an old radio, or a cardboard box, or a wooden box, or a toaster...

Quick Setup

Features Description:

* Play web radios:

From the web interface, click the +Radio button and enter the name of the radio. Wait a bit, it will be added automatically to your list! (thanks to radio-browser.info). (Optionally you can add an http radio stream directly with the +Stream button.)

* Play your podcasts:

From the web interface, click the +Podcast button to go to the podcasts settings where you can subscribe and manage your podcasts. Podcasts are then updated every 30 minutes. Only the latest number of episodes you specify will be kept on your device and appear in the Podcasts section automatically. (Do note that it takes time to download the episodes. Try to subscribe gently and allow some time before subscribing to other podcasts.)

* Bluetooth speaker:

Simply connect to the bluetooth speaker called Transistor from your phone or computer.

* Sleep timer:

When you hold the on / off button for 1 second your Transistor will turn off 20 minutes later. If you feel the need, you can hold it again to add another 20 minutes and so on, until you fall asleep. (You can still simply press the on/off button to immediately turn off your Transistor.)

* The BiG NexT ButtoN (TM):

A big, very satisfying to hit, arcade style button that skips to the next radio. Feels Good.

Images:

Inside:

 Transistor 3D printed case inside.

The web interface:

Transistor interface

Detailed setup

Getting the image

Ready-to-write image

For your convenience you will find the latest image pre-built. Access it from the releases page. Download and unzip the latest image, it's the zip file called "image" with a date. (It is built automatically from the source code by Travis-ci.)

In case you would like to set your wifi manually, the file to edit is: /etc/wpa_supplicant/wpa_supplicant-wlan0.conf (edit this file as root / sudo)

Your operating system needs to be able to mount ext4 (linux) partitions. You can edit the files before or after writing the image to the sd card:

building from source

Write the image to a SD card

Now that you have your image file, you need to write it to a SD card in order to put it in the Raspberry Pi. Choose you favorite method below and once you have your SD card ready you can boot your Raspberry Pi, the first boot can take a minute or two, and then your radio is ready to go.

graphically

For a user friendly experience you can try etcher to flash the image to the SD card.

manually

On linux (and it probably works on Mac too) an example to get it on the SD card would be:
sudo dd bs=4M if=deploy/2019-05-23-Piradio-lite.img of=/dev/mmcblk0 conv=fsync (of course you need to replace /dev/mmcblk0 with the path to your own SD card. You can find it with the command lsblk -f) Those settings are recommended by the RaspberryPi instructions.

Controlling your Transistor

Transistor is equipped with the necessary buttons to turn it on / off, control the volume up and down, and select the next and previous radio stations. Besides that, you can control it remotely, on the network.

Transistor connects to the wifi network that was set in the config file. It should receive an IP address from the Internet router. You need to find this IP address in order to control the Transistor. There are several ways you can do that:

via web interface

You can control your radio via web interface: try to open http://transistor.local (or the IP address) in a web browser.

via ssh with a terminal interface

If you prefer the command line, you can ssh into Transistor and then use ncmpcpp to get a nice terminal interface (see some screenshots here: https://rybczak.net/ncmpcpp/screenshots/).

via an application

You can use any mpd client you like (a non exhaustive list of applications for various platforms can be found here: https://www.musicpd.org/clients/). If you are asked for the port number, it's the default one, 6600. And for the IP address, it's the same thing as above.

How it is built

The image is built with the official RaspberryPi.org tool (https://github.com/RPi-Distro/pi-gen) to build a Raspbian lite system with all the software needed to have a working internet radio stream client. It uses mpd.

Developers

The most interesting bits happen in the stage2/04-pirate-radio directory. Where files can be added and then instructions can be set for the building tool to create the final OS image.

If you want to test the image locally, without the need to burn it to an SD card, you can use QEMU to emulate the hardware on your system and then create a virtual machine.

That should boot the image. You can then ssh into it on localhost on port 2222, and use port 80 on localhost port 2223.

Hardware

This is the detailed usage of the pins (thanks to https://pinout.xyz). This is mostly of interest when you want to connect the buttons.

OOS: On Off Shim
AZ: Raspio Analog Zero
PA: Pirate Audio Amp + LCD

Powers and grounds don't appear in the picture, here is their pinout:

Transistor pins usage Transistor pins usage legend

The first channel of the Raspio Analog Zero (channel 0) is expecting to receive a potentiometer to set the sound volume: plug the ends of the potentiometer to 3.3v and ground, then plug the wiper (usually found in the middle of the three tabs) into the first channel of the Analog Zero.

These are the instructions to generate the image of the pins layout:

Contribution

Issues and pull requests are welcome.