Welcome

Thanks for visiting the Mike's Make blog. It is a compilation of many of my interests. I hope you find the articles in this blog helpful and entertaining. Leave a comment and let me know what you think.

Sunday, June 17, 2018

Making The Pill Bottle Radio



Making of The Pill Bottle Radio


Michael Shaw, June 2018




Pill Bottle Radio



If you’re like me, you like to have a portable AM/FM radio on hand just in case you want to catch your favorite shows or to hear the news. Now this being hurricane season, it’s also great to have for emergencies too! In this article I’ll explain how to make a good quality rechargeable portable radio that fits inside a recycled pill bottle. It’s pretty easy and cost less than $50 and takes only a few hours to make, if you don’t count the time it takes to make the 3D printed cap.

This design was inspired after realizing I didn’t have a good enclosure to mount the components of the radio I just built in. I had purchased a SparkFun ESP8266 Thing WIFI Internet Board and interfaced it to the SparkFun FM Tuner Evaluation Board and a Lithium Ion battery.


SparkFun ESP8266 Thing
SparkFun FM Tuner Evaluation Board















 

I looked at other implementations on the internet and really didn’t want to wire up switches or controls to use the radio. Instead, I used the AP WEB server WIFI capabilities of the SparkFun ESP8266 Thing to implement the controls on a web page.

Since I’m older I now have to take maintenance drugs on a daily basis. This means I have a few empty prescription bottles lying around. I happened to take the components of the FM radio and slip them into an empty pill bottle and realized it all fit! I just needed to figure out how to mount it all in the pill bottle so I could plug in the head phones and the charger. I thought about cutting slots and poking holes in the existing cap but this wasn’t the best solution. What I needed to do was to make my own cap so it would be strong and work reliably. At about this time I got my first 3D printer, so I set out to make my own cap with the supports and mounting holes that I needed.

I used a free 3D CAD program to come up with the following drawing for a new pill bottle cap with the mounting for the boards built in:

    



I had to make a few iterations until I got the cap just right, since it was trial and error to get the threads correct. By the way, the pill bottle size is known as a 30 DRAM size bottle and is approximately 38mm in diameter at the center.

Once the cap was finished it was just a matter of wiring up the ESP8266 Thing to the FM Tuner Evaluation Board. I wired the boards together using the wiring diagram below:




Now I was ready to program the ESP8266 Thing with some software. The software I created is basically a mash-up of the SparkFun’s ESP8266 AP Web Server example sketch and the Si4703_breakout test sketch. Note: to fit both the boards in the bottle you can’t use any headers to connect the two boards together, except for the DTR/RST jumper. Instead I direct wired both boards together as you can see in the picture below:



This is a problem, though, because you won’t be able to connect the programmer. You can make a short wiring harness by soldering wires to header pins and then tucking them out of the way or you can use pogo pins (what I used) to temporarily  connect the FTDI communications interface to the ESP8266 Thing.

Once programmed you’re ready to try it out. Plug in the battery to the Thing and turn it on. Connect to WIFI on your phone and look for the WIFI network named “Radio Thing nnnn”, where nnnn is the last digits of the Thing’s MAC address. Connect to the network and when prompted, enter the password “Sparkfun”. Now open the browser on your phone and enter the address 192.168.4.1/ and the screen similar to the following should be displayed:



Now you can type in “up” or “down” after the network address to change the volume or type the letters a,b,c to switch to a pre-programmed station. These are my settings, but you can change them in the Thing’s program to whatever you want.

I’m really happy with the performance and the sound quality of the radio and not having to wire a bunch of switches and knobs to get it working is icing on the cake.  Plus I have a sturdy enclosure that was cheap and easy to make, if you have a 3D printer.  The files you need to make on just like it will be listed here. Thanks and enjoy some easy listening!  

No comments:

Post a Comment