*The information found in my blogs is provided for free; I do want people to use the information and reproduce or expand on my projects. If you produce a blog or publish work using the information found here and are using elements that are unique to my designs, I simply ask that you link back to my blogs and videos and credit the resource as a courtesy to myself and others who take the time to add to the online electronics hobby community.
The magic surrounding the LM386 is mostly because of how common it is, how easy to use it is and the cost. I purchased a bulk package of these IC's off of eBay some time ago. They have made their way into a few radio and audio projects, and I will have no issue using them all in future projects.
I recently built a small arcade machine around a Raspberry Pi computer, and I needed a solution for providing the audio component. This was not the easiest way to get sound into the cabinet, but I feel it took the customization up, and added a component showing that I could handle DIY electronics too, and I don't need everything to be "plug and play".
While most of the parts I already had available to me, I feel that sourcing the parts from the fine vendors in China over eBay drove the cost of this project down. I would be surprised if the cost of this board was greater than 5 bucks. The most expensive part of this project was buying the actual speakers, which I found at the local surplus store at a reasonable price.
Q: I thought the LM386 IC was only capable of handling one signal, stereo is two signals? A: True, this is why we used two chips to produce the desired results!
Q: How do you get two separate signals going to two different chips to amplify at the same level? A: With a dual potentiometer! (In this project I selected a dual 10K potentiometer with a logarithmic taper).
Q: Can I drive my giant speakers with this?
A: Nope, think headphones and small projects (~1/2 watt per channel).
Q: Why don't I just buy an audio module off of eBay instead of building my own?
A: You're only learning how to buy stuff, build something on your own and learn.
In this project I knew I would be stealing power from the 5V rail on the Raspberry Pi. For your information: LM386 IC would like to see 4-12VDC, except for the LM386N-4, which likes to see 5-18VDC. (It's common to see LM386 Projects supplied from 9V batteries).
Another consideration: depending on the project, you may wish to use a small value capacitor (Think 0.01uF or 0.001uF) to remove the DC component of an audio signal, this was necessary for my FM radio project: TEA5767 FM RADIO W/ ARDUINO.
It's up to you how you make the connections!
I ended up hacking a 3.5mm extension cable in half to get a male audio adapter for my circuit (I simply soldered the wires directly to my perf. board. I used screw terminals to hook up some small stranded wires as the speaker wire running to the speakers.
The only really unique aspect about this project is the linear taper dual potentiometer. If you google the datasheet for the LM386 you will see several different configurations, and some may be more well suited to your project than what I'm using. I decided to use the configuration with the lowest part count.
****Use bypass caps to reduce noise and clean up the audio****
(See schematic)
*You don't need to use electrolytic capacitors, I just used what I had - replace 220uF with a poly type if available.
I added the bypass caps after I built the board, I would use space more effectively if I repeated this project.
There you have it, a cheap and easy stereo amplifier for small projects!
*The information found in my blogs is provided for free; I
do want people to use the information and reproduce or expand on my
projects. If you produce a blog or publish work using the information
found here and are using elements that are unique to my designs, I
simply ask that you link back to my blogs and videos and credit the
resource as a courtesy to myself and others who take the time to add to
the online electronics hobby community.
While trying to decide on a project for a capstone project, I thought it would be fun to build an arcade machine; No one was on board, so we instead built a home automation/monitoring system (boring). Link to Home Automation Project
Moving along... I decided that I still wanted a machine anyway, so it might not be as polished as it
would have been if I made it as a capstone project, but it definitely has all the components needed for a good time! My only partner for this home project was my son Max.
The system is based around the popular Raspberry Pi model B computer (Check the link if you don't know about this computer), running the RetroPie software, which is available free (or donation) which boots your machine directly into a menu which allows you to select your emulator.
The first thing I did was acquire a monitor, which I actually picked up at a college asset sale in October (8 months ago). It was only $5 for a 17" monitor, and I don't think the aspect is quite 4:3, but it is close, which makes it more suitable for emulating older consoles. If you were to use a modern 16:9 screen, you would either have black bars on the left and right sides, or you would be stretching the image. Cocktail games are actually meant to be run on a monitor flipped 90 degrees, so the black space on the sides with a 16:9 monitor with cocktail games would be very large! If I build another machine, I will either hunt down a suitable CRT monitor, or another "square" monitor. The only issue with a VGA monitor on the Pi is that the Pi has an HDMI port, which I handled by using an HDMI to VGA adapter from eBay, which worked out just fine! Expect to pay less than $5 bucks, and make sure it actually has the support circuitry, and isn't just a "dumb" adapter.
The next component to worry about was the joystick and buttons. I dug around on eBay, and it looked like my best bet was to buy a kit. It's hard to link to auctions that end, but here's a try: joystick I bought
This is a picture of the kit if you wish to find the auction or buy one similar. The seller was fair, and I did receive it in a timely manner. I was however unimpressed with the buttons. The final arcade machine has the board with the controls screwed in, so I can remove it later, as I may yet swap them out. They do seem to do the trick and haven't given me much trouble, but they are a non-standard size; I didn't have a hole-saw the proper size, so the fit wasn't great. I did do an unboxing video for this set on YouTube. I was pretty upset in the video, but it worked out, the seller was fine, and the USB joystick adapter board did work fine with Mame/RaspberryPi, so if you're on a budget, you may still consider this set as an option.
The next step in the project wasn't mandatory, but it did simplify the project. I took the monitor apart so that I could remove it from the stand and enclosure, and also so I could try to steal power for the Raspberry Pi from it. I made the assumption that the circuitry and buttons on the monitor were being powered by a 5V supply line, and I was curious to see if I could tap into that.
I moved ahead and took the monitor apart and attached a cut-off MicroUSB cable to a 5V power line inside the monitor's guts and I was successful at powering the Pi. The only draw back to this is that I don't know what the max current output of the monitors 5V rail is, so this may fail in the future, or be unable to supply a Raspberry Pi 2 down the road; for now, I'll take it! The 5V rail is also used to power the audio system. The bonus of this technique is that I can simply plug the power cord into the monitor to power the entire project!
I had to decide on dimensions for the cabinet now, and the only thing I really knew for sure was the size of the monitor. I went into draftSight and started drawing out what I thought would work well, and I came up with this:
To build the cabinet, I decided on a 4'x4' sheet of 1/2" MDF, as it was only $20 at Home Depot and the texture is preferable to plywood. Cutting and painting was the most time-consuming aspect of the project. Here is the video we made of us cutting out the parts using a table-saw and a jig-saw.
The panels were assembled by pre-drilling holes then putting nails in. A better method would be to use a router and cut grooves in, but I made due with what I had, and it worked out just fine. If you don't drill first, you will most certainly split the wood! I also cut the bottom part of plastic off the monitor which originally held the user buttons (I simply used a back-saw).
To add sound to the project, I decided to use LM386 amplifiers attached to speakers I picked up from the surplus store. I had all the electronics parts I needed on hand, so it worked out well. You may consider using computer speakers instead, but I feel my approach made the project a little more personal. Link to Stereo LM386 Amplifier project
(It is complex enough that I don't want to get into too much detail here). This is a video demonstration of the LM386's in a stereo configuration, mechanically joined by two logarithmic potentiometers, and being powered off of a 5V pin from the Raspberry Pi:
It's worth noting: The Raspberry Pi has no shielding, so even if you're listening to the audio with headphones, you will notice click and popping and noise. I may in the future put a metal shield which is bonded around both the Pi and my sound board. If you look closely in my video, you will also notice that the shielding on the cable I used for speaker wire is tied to ground to help suppress it from picking up additional noise. I think I made this video before attaching some 104 (0.1uF) caps directly in front of the + and - supply to the LM386 chips, which helped a lot with knocking noise off from the Pi.
Here we have the unveiling of the arcade cabinet:
This is pretty much how it will stay until I get the new Raspberry Pi. The project was fun, and I think I enjoyed building it more than I like playing on it! You may find you need to go into the RaspPi config and overclock it to 900MHz (if you're using an original Pi, not the Pi 2), as I was having some stutters in some games, but at 900 MHz, most of the stuff I was doing ran just fine.
There you have it, the Pi Arcade Machine. I know this project has been beat to death, and loads of
information has been done, but hopefully this info still encourages or helps someone out. This has also been one of my more popular projects (as far as social media goes), and I'm happy to add more Raspberry Pi projects to the internet! Thanks for checking this out, and I'll leave you with one last thing, my blooper reel from building the cabinet.
The grand project I am working on is a clock radio, and what good is it if it cannot accurately track time? It was tempting to try to set up the microcontroller to accurately track the time, but it would likely drift out fairly quickly. I decided that I would use an RTC (real time clock) module to keep track of the time for me. I looked around a little on google to see what others were using, and I looked around a little on eBay to see what was cheaply available and I settled on the DS3231. A few reasons for this:
Extremely accurate
Battery backup
I2C
Works with 5V
You can even get a temperature reading from it!
I purchased two units from eBay for $5.62US. Always buy at least two. If you wreck one, or one is broken then you don't need to wait - especially if ordering from China, you may need to wait 2-3 weeks to get your replacement!
They came in this nice static bag. On the bag it says "Raspberry Pi", which it seems like they were targeting this item to be sold to people who wanted to use it with the Pi, but it works just fine with any I2C capable device (I wonder if people looking for Arduino modules don't buy it because of the Raspberry Pi labeling?)
When you're looking around on the internet to buy these, it is important to remember that the DS3231 is the chip mounted on the board! They are not all created equal. This version only uses 4 pins - VCC, GND, SCL & SDA. It does deal with the battery on the board for you, which is nice, but you don't get a pin for reset, the 32KHz has an output on the chip as well as a pin for triggering an interrupt or sending out an adjustable square wave. If you want these features, you might want to see what other options are available for the DS3231.
It's sitting on a nice female header, which will make it easy to mount onto my perf board later. It came with that little battery - I doubt I'll ever replace it. It's everything I need, and more. I just wanted a 24 hour clock, this chip can track day, month, year and store 2 alarms.
Let's move onto the datasheet for this puppy, which can be found here: DS3231.pdf
It's only 20 pages, and a quick skim couldn't hurt. It picks up on page 11 when you get to see how the registers are formatted. It's all in BCD (binary coded decimal), so you need to work on the data before you send it out or display it - so '12' would be shown as '0001 0010' (I might do a video on bit manipulation, BCD and binary conversions some day). I'll attach some code to this blog entry, I feel it might be easier to see what's going on by looking at the code, rather than me try to explain it. The I2C is a little weird feeling on this, but I think I have a pretty good understanding after playing around with it for a little while.
I can try to save you some trouble with a mistake I made. They give an example of how to receive information from the data sheet - And no where in the data sheet do they tell you the address in plain English...
This might be my fault, but under slave address I was thinking a full byte had to be sent, but the 'slave address' was only 7 bits, so I put a '0' to the far right which I thought completed the 8 bits. So when I tried to address it, I was trying to talk to '0xD0', but for some reason you just read the 7 bits and imagine a zero as the MSB (most significant bit), which means the address was actually 0x68. Maybe if I spent more time playing with I2C devices this would have been more obvious? Who knows. I did learn something interesting from this: When I was trying to read data with the first address, I kept ending up with the retrieved bytes being 0xFF, which is all 1's in binary land, so for now on, if I'm working with I2C and I end up with nothing but 1's coming in the bytes, I'll assume either the address is wrong or the device is not connected - this could save troubleshooting time someday.
Moving along, I'm only really interested in the first 3 registers which handle the seconds, minutes and hours. I may yet do something with the temperature for fun.
You can look in the code to see the bit manipulation I used to extract the human readable numbers, it's quite easy once you get over the anxiety of dealing with thinking in binary.
One last hardware note: I'm holding up the lines to the 5V line with 4.7K resistors, with no issues.
Here's a picture of the Arduino board with the DS3231 module above. It ties on to the bus on the breadboard to the right, which also has the 4.7K resistors on it. The entire project is being powered by USB at this time.
This is the whole project with my radio portion (scroll down on the blog to learn more) TEA5767, the LM386, speaker, and of course, the DS3231.
For your viewing pleasure, another horrible paintbrush schematic! If you don't want the radio portion, you can ignore everything to the right of the DS3231 module.
The code includes the functions for the radio section. If you just wanted to use the getTime and initializeClock functions, you could cut and paste them - be sure to include the Wire.h header. Check back in the future to see this finished, the code will be more complete and I will have hopefully settled on how to have the user interact with it all.
unsigned int frequencyB; double frequency; double tunerFrequency;
unsigned int mainLoopCounter;
void setup() { Wire.begin(); frequency = 95.9; //A fancier approach would be to store this in EEPROM and retreive last channel ;) Serial.begin(9600); setFrequency(); initializeClock(); //set the time in the initialize clock function and uncomment this line, upload, //then comment this line out. It will retain your original time and not overwrite. //A proper setting method will be incorporated later!
Wire.beginTransmission (0x68); //if the clock isn't on register 0x00 at startup, it won't work properly Wire.write(0x00); Wire.endTransmission(); }
void loop() { int reading = analogRead(0); //Serial.println(reading); //Shows the adc position - setting it to 512 will point "up" so you can attach a knob if (reading <= 410 || reading >= 614) checkTuner(); //only check tuning if tuning knob leaves rest area
mainLoopCounter ++; //I know this is a little lame, won't be part of final if (mainLoopCounter == 2000) { getTime(); Serial.println(frequency); mainLoopCounter = 0; } }
void checkTuner() { int currentReading = analogRead(0); if (currentReading <= 205) frequency = frequency--; //Tune back by 1MHz else if (currentReading >= 206 && currentReading <= 410) frequency = frequency - 0.1; //Tune back decimal else if (currentReading >= 614 && currentReading <= 819) frequency = frequency + 0.1; //Tune forward decimal else if (currentReading >= 820) frequency = frequency ++; //Tune forward by 1MHz else frequency = frequency; //If something unexpected happens, this will buffer it out if (frequency < 88.0) frequency = 88.0; //make sure it doesn't tune too low *Band limits can be adjusted if (frequency > 108.0) frequency = 108.0; //make sure it doesn't tune too high delay(300);// this delay will only occur if the main loop makes it into this function Serial.println(frequency);//only prints frequency while being tuned setFrequency(); }
void setFrequency() { tunerFrequency = ((int)(frequency * 10)) / 10.0; //fun use of a cast! frequencyB = 4 * (tunerFrequency * 1000000 + 225000) / 32768; frequencyH = frequencyB >> 8; frequencyL = frequencyB; Wire.beginTransmission(0x60); Wire.write(frequencyH); Wire.write(frequencyL); Wire.write(0x1A);//0001 1010 -highside injection, forced mono, "right channel" muted, *PINOUT AND 3RD BYTE HAVE CHANNELS SWAPPED Wire.write(0x10);//Set for US and Europe band Wire.write(0x00); Wire.endTransmission(); }
void getTime() { Wire.requestFrom(0x68,19,true); //its polling all 19 registers so it will be back to register 0x00 on next read. byte second = (Wire.read()); byte minute = (Wire.read()); byte hour = (Wire.read());
void initializeClock() { Wire.beginTransmission(0x68); Wire.write(0x00); //start at address 0x00 Wire.write(0x00); //seconds - enter numbers how you would normally see them Wire.write(0x44); //minutes - these numbers would set the time to 22:44:00 Wire.write(0x22); //hours (24h) //NOTICE: I only had to specify register once, it can increment the register on its own. Wire.endTransmission(); }
That's all I have to say about this for right now. Stay tuned to see what happens next. Hopefully this will help someone else working on something similar.
I spent the week playing around with how the radio was working, I wasn't horribly impressed with how it was working after my last post. I think I've pretty much nailed it for what I want to do, I even fixed a few kinks. I do strongly recommend you check out the post behind this one to see links to where software and design material came from. I also mentioned that the way I mounted the TEA5767 was similar to what another individual did, and here is a link to his blog: http://www.doctormonk.com/2012/03/tea5767-fm-radio-breakout-board-for.html
I've also noticed that this posting has been receiving a lot of attention, and I decided it may not provide enough information for someone trying to replicate it, so I made a quick and dirty paintbrush schematic:
For both pots I used a single turn 10K potentiometer. You should also tie up the SDA and SCL lines up to 5V with a 4.7K resistor - this module seems to work just fine without it.
I understand the schematic isn't great and should be a CAD drawing, but it's simple enough. I'd urge you to dig up the data sheet for the LM386 to look at the different configurations. Hopefully this schematic will make this post more useful! This is a component of a larger project I'm working on, so hopefully at some point I will have it drawn properly in its entirety.
Because of how mine is done, this will be a daughter board soldered onto a main perf. board.
I'll make a programming note here:
You can see in the picture that I soldered onto the middle pin on the right side of the chip, which is suppose to be LEFT CHANNEL. If you decide you want to mute the RIGHT CHANNEL by adjusting the 3rd byte, they are backwards - you will end up muting the wrong one!! I'm not sure if the issue is that you're turning off the wrong channel, or if the pins are flipped - if you're running stereo, this could mean you have LEFT AND RIGHT backwards. If you're running mono, like I am here, it won't matter - but I feel this is a fairly large ooops in a data sheet.
One thing I really didn't like about how my first attempt worked was that tuning with a 270 degree potentiometer was horrible. It just doesn't have enough resolution - if you actually tuned the channel you wanted, it would weave in and out of it, making it pretty intolerable. The solution I came up with (and this is really because I wanted to keep the number of knobs and buttons to a minimum) was to use the ADC to use different areas of the knob to achieve different results.
To the left you can see the scheme I used to control the tuning. It was a little weird at first, but I seem to have gotten the hang of it. If the knob is pointed up, nothing happens. Turn it a little to the left and it decreases by 100KHz, Turn it further, it decreases by 1MHz. It's buffered by a 300ms delay, which you could tweak to your tastes. I'm not in love with it, but it seems to work well for using the materials I have and getting it to tune in a satisfactory way. I will likely use the same method for setting the time on the clock portion of this project.
Here is what some of you may have been skimming for, the code:
unsigned int frequencyB; double frequency; double tunerFrequency;
void setup() { Wire.begin(); frequency = 95.9; //A fancier approach would be to store this in EEPROM and retrieve last channel ;) Serial.begin(9600); setFrequency(); }
void loop() { int reading = analogRead(0); //Serial.println(reading); //Shows the adc position - setting it to 512 will point "up" so you can attach a knob if (reading <= 410 || reading >= 614) checkTuner(); //only check tuning if tuning knob leaves rest area }
void checkTuner() { int currentReading = analogRead(0); if (currentReading <= 205) frequency = frequency--; //Tune back by 1MHz else if (currentReading >= 206 && currentReading <= 410) frequency = frequency - 0.1; //Tune back decimal else if (currentReading >= 614 && currentReading <= 819) frequency = frequency + 0.1; //Tune forward decimal else if (currentReading >= 820) frequency = frequency ++; //Tune forward by 1MHz else frequency = frequency; //If something unexpected happens, this will buffer it out if (frequency < 88.0) frequency = 88.0; //make sure it doesn't tune too low *Band limits can be adjusted if (frequency > 108.0) frequency = 108.0; //make sure it doesn't tune too high delay(300);// this delay will only occur if the main loop makes it into this function Serial.println(frequency);//only prints frequency while being tuned setFrequency(); }
void setFrequency() { tunerFrequency = ((int)(frequency * 10)) / 10.0; //fun use of a cast! frequencyB = 4 * (tunerFrequency * 1000000 + 225000) / 32768; frequencyH = frequencyB >> 8; frequencyL = frequencyB; Wire.beginTransmission(0x60); Wire.write(frequencyH); Wire.write(frequencyL); Wire.write(0x1A);//0001 1010 -highside injection, forced mono, "right channel" muted, *PINOUT AND 3RD BYTE HAVE CHANNELS SWAPPED Wire.write(0x10);//Set for US and Europe band Wire.write(0x00); Wire.endTransmission(); }
I won't take credit for this in its entirety, between the link I posted above and a blog mentioned in the previous post, is where some of the work came from. You will want to open the serial monitor window in your Arduino IDE to see the frequency. I implemented my tuning method in the checkTuner function. I also tweeked out the setFrequency function, it seems to have fixed an issue I was having with the tuning drifting by 0.1MHz (I don't know why). I also changed that it only sends a message out to the I2C bus only after a change is requested by the checkTuner function - I was getting a ticking sound from it constantly communicating ~200ms. So I have it tuning better and less clicking. I also adjusted some of the data bytes to better reflect my needs. I found a detailed data sheet here: http://www.voti.nl/docs/TEA5767.pdf
The one last issue I had was trying to get it to scan for channels. I never got it to work properly, if you have it sorted out, let me know!
So yeah, check out the video for the demonstration, and stay tuned to see where this project ends up. I hope this helped if you were looking for guidance!
If you want to see this project with a real time clockadded to it, check out a more recent blog which uses the DS3231 RTC combined with the project you just read about here: Arduino + DS3231 Real Time Clock
Basically, the goal of this was to get a radio module to work with a microcontroller, and also decide on the amplifier configuration. In the video you can see it hooked up to a small 8 ohm speaker, and it sounds decent - and it will sound better once it is in an enclosure.
I purchased new potentiometers, the TEA5767 modules and the LM386 amplifiers off of eBay. Waiting for the components is a little frustrating, however the venders in China are low cost and very friendly - I've only ever had one issue, and it was the mail systems fault.
The most difficult stage of the project was trying to get the TEA5767 module to be useable. It is really really small. Don't order just one of these, you will likely make a mistake - I bought two of them for less than $4.00.
Attaching wires to this was tricky. This was my first attempt. in the bottom left, you can see a surface mount component is missing.. while attaching the wire with a soldering iron, I accidentally had solder run up onto the board and the component started to float - it was way too small to re-attach. The device no longer functions correctly, maybe I'll try to figure out what the component was at some point and fix it, but for less than two bucks, I'll let it go. Another issues I had, and this happened on both my modules, the bottom right pin is VCC, and I accidentally bridged it to the case of the crystal, which caused a short - easily fixed.
The second attempt was a little more involved, but yielded much better results! I used a scrap of protoboard and some pin headers to hold the chip. This technique was very similar to what I think I say someone else do while I was looking around on Google (I forget where). Basically, I just used a small piece of wire and threaded it through and pushed it against the side of the board and I soldered it from the side so I wouldn't damage components. I pushed the plastic down on the pin headers to get as much length as possible on the pins and dripped the header in. The wires are tacked onto the pins on the backside NOTE: You will need a clamp of some sort to dissipate heat when soldering the wires to the pins, as the heat will otherwise separate your wire from the side of the chip (I used a set of self clamping tweezers). One of the reasons why my breadboard was such a mess was because it was built to hold my first attempt, and the 2nd attempt didn't fit quite so nicely.
The first attempt would have taken less space, the second attempt didn't fit on the breadboard very well. Since I only had two of these, this will be how the module exists in my final clock project.
Most of the information I gathered on using the TEA5767 with an Arduino was on another blog: http://www.electronicsblog.net/arduino-fm-receiver-with-tea5767/
This blog contains lots of information, including some information from the datasheet, it's highly readable!
Also on the breadboard is the LM386 amplifier. The speaker and amplifier circuit are all running off of the 5v rail on the Arduino board, which also goes to show how little power this takes. The schematic I used I found on another blog, Hack A Week, which I follow on YouTube regularly. His LM386 blog is found here: http://hackaweek.com/hacks/?p=131
The schematic shows a 10uf capacitor to optionally increase gain, this circuit had plenty of overhead without it, so I didn't include it. I did the "bass boost" filter, but used 0.047uf rather than 0.033uf - I personally liked the sound more.
Here is a picture of on of my Arduino development boards for fun. You can see I'm only using a few wires. The Arduino had two wires supplying power to the breadboard, 2 wires for the I2C and one wire to receive ADC (analog to digital data) from the potentiometer being used as the tuner.
So yeah, watch the video at the top to see what's going on here. In the near future, I hope to have the tubes soldered onto a board so I can start moving ahead with the build. I have a few concerns about trying to multiplex 6 tubes with the same microcontroller that is running devices on an I2C bus, I might use two... I don't know, we'll see. But anyway, cheers!
Here's a picture of what this project is doing to my poor workbench. A mess is a sign of genius, right?
Good luck with your project!
This will be a very short post showcasing a Telecommunications project that I completed for school. I'm reluctant to share any of the specs, as the circuit board and specifications were developed by one of the faculty at the school, and I don't really feel that they are mine to share. BUT, feel free to take a look at it!
This entire project is based around the TDA1572 IC, which is an older chip designed for AM radio receivers. In this project, the radio is tuned to function between ~ 9-12MHz. It does work well, and late at night I can listen to international transmissions! I'm listening to China Radio International while writing this! It also feature an MPF102 JFET and an LM386 OPAMP for the amplification of the signal. It also has 3 hand wound toroids.
The electronics are housed in this cigar box, which at one point contained 25 Luis Martinez Ashcroft Corona cigars (A year in the humidor and they really have a nice medium taste, I like them with a drink of wine or Scotch at night). This was the perfect size for this radio project. Buy your box here!
This view is to show off the speaker. It's a clear plastic waterproof speaker I picked up at the surplus store, I may replace it later, but it works fine. On the bottom left you can see a banana terminal, which I'm using to insert the antenna. Currently I'm using a length of scrap clothes line which works very well. I clip the antenna to my clothes line and reel it out, which works great for a temporary whip antenna, it's about 35'. A longer antenna would be better for this radio, but it works quite well!
While I was making my youtube video, my cat decided to come help.
Here is a picture of the guts. The board was created for a class to use, which included instructions. The TDA1572 was an SMD chip chip soldered on its own board, then that board was soldered using headers to the main board.
A lot of the schematic can be found on the data sheets provided by the futurlec website, the data sheet is very detailed, and has lots of room for deciding how you want to build your radio!
You can can also see the potentiometers I hot glued in (the box was too thick to set the nut). The potentiometers are for volume, fine tune, coarse tune. You can also see a few marrettes, which are used to connect the wallwart to the board. The board has a 7805 regulator.
For a handmade project, I think it looks pretty slick!
Okay, so what's this superheterodyne talk about? The TDA1572 IC allows for a lot of the work to be integrated into one chip. In most hobby radios, or super old radios, a system called RTF (Radio Tuned Frequency) is used, which usually uses a ferrite road wound with a given number of turns of magnet wire, and a costly variable capacitor, which then resonates with the desired frequency, and that signal is amplified. The superheterodyne takes a signal and brings it down to the IF (intermediate frequency) or "working frequency" and then does its work. This chip requires relatively few components for what it is doing!
If you are interested in the work being done on the signal in a superheterodyne receiver, check out the wikipedia page, it is very descriptive and well written.
I am very impressed with how radio has progressed. I intend to build an FM receiver into my next project, and the number of external components is almost none! That project will just drop the FM IC onto an I2C bus, and away it goes. I do think in the future I will pick up a vintage radio and claim the parts to build an RTF style receiver that goes even lower down so I can explore some of the transmissions happening further down, but that might be a while before that happens...
Anyway, for anyone who is interested, I'm still working on my IV-9 clock, and very recently I made the small step of getting my two tube counter to work on a PIC18F44K22! Which I plan on the final clock radio to run entirely on one PIC18F45K22 microcontroller. I'm still toying with it, hopefully I'll have a 6 tube board going soon.
Here are the two tubes displaying 27, while you can see it toggling between the two tubes on the scope. I had a few issues with the software going from Arduino to Microchip, but yeah, works fine.