Posts with «amplifier» label

DIY Arduino Due TEA5767 FM Radio

Older hackers will remember that a crystal set radio receiver was often one of the first projects attempted.  Times have changed, but there’s still something magical about gathering invisible signals from the air and listening to the radio on a homemade receiver. [mircemk] has brought the idea right up to date by building an FM radio with an OLED display, controlled with a rotary encoder.

The design is fairly straightforward, based as it is on another project that [mircemk] found on a Chinese site, but the build looks very slick and would take pride of place on any hacker’s workbench. An Arduino Due forms the heart of the project, controlling a TEA5767 module, an SH1106 128×64 pixel OLED display and a rotary encoder. The sound signal is passed through an LM4811 headphone amplifier for private listening, and a PAM8403 Class D audio amplifier for the built-in loudspeaker. The enclosure is made from PVC panels, and accented with colored adhesive tape for style.

It’s easier than ever before to quickly put together projects like this by connecting pre-built modules and downloading code from the Internet, but that doesn’t mean it’s not a worthwhile way to improve your skills and make some useful devices like this one. There are so many resources available to us these days and standing on the shoulders of giants has always been a great way to see farther.

We’ve shown some other radio projects using Arduinos and the TEA5767 IC in the past, such as this one on a tidy custom PCB, and this one built into an old radio case.

Hack a Day 09 Oct 06:00

FM Radio from Scratch using an Arduino

Building radio receivers from scratch is still a popular project since it can be done largely with off-the-shelf discrete components and a wire long enough for the bands that the radio will receive. That’s good enough for AM radio, anyway, but you’ll need to try this DIY FM receiver if you want to listen to something more culturally relevant.

Receiving frequency-modulated radio waves is typically more difficult than their amplitude-modulated cousins because the circuitry necessary to demodulate an FM signal needs a frequency-to-voltage conversion that isn’t necessary with AM. For this build, [hesam.moshiri] uses a TEA5767 FM chip because of its ability to communicate over I2C. He also integrated a 3W amplifier into this build, and everything is controlled by an Arduino including a small LCD screen which displays the current tuned frequency. With the addition of a small 5V power supply, it’s a tidy and compact build as well.

While the FM receiver in this project wasn’t built from scratch like some AM receivers we’ve seen, it’s still an interesting build because of the small size, I2C capability, and also because all of the circuit schematics are available for all of the components in the build. For those reasons, it could be a great gateway project into more complex FM builds.

Hack a Day 05 Dec 00:00

A Unique Microphone Preamp

We live in a world in which nearly any kind of gadget or tool you can imagine is just a few clicks away. In many respects, this has helped fuel the maker culture over the last decade or so; now that people aren’t limited to the hardware that’s available locally, they’re able to create bigger and better things than ever before. But it can also have a detrimental effect. One has to question, for instance, why they should go through the trouble of building something themselves when they could buy it, often for less than the cost of the individual components.

The critic could argue that many of the projects that grace the pages of Hackaday could be supplanted with commercially available counterparts. We don’t deny it. But the difference between buying a turn-key product and building an alternative yourself is that you can make it exactly how you want it. That is precisely why [Sam Izdat] created this truly one of a kind microphone preamplifier. Could he have bought one online for cheaper? Probably. Could he have saved himself an immense amount of time and effort? Undoubtedly. Do we care? Not in the slightest.

The amplifier is based on the Texas Instruments INA217 chip, with an Arduino Nano and 128×64 OLED display providing the visualization. [Sam] was able to find a bare PCB for a typical INA217 implementation on eBay for a few bucks (see what we mean?), which helped get him started and allowed him to spend more time on the software side of things. His visualization code offers a number of interesting display modes, uses Fast Hartley Transforms, and very nearly maxes out the Arduino.

But perhaps no element of this build is as unique as the case. The rationale behind the design is that [Sam] wanted to compartmentalize each section of the device (power supply, amplifier, visualization) to avoid any interference. The cylindrical shapes were an issue of practicality: the compartments were constructed by using a hole saw to make wooden discs, which were then glued together and hollowed out. The case was stained and coated with polyurethane, but due to some slightly overzealous use of glue and fillers, the coloring isn’t uniform. This gives the final piece a somewhat weathered look, in sharp contrast to the decidedly high-tech looking display.

Overall, this build reminds us of the modular 3D printed amplifier we saw earlier in the year combined with these speaker-integrated Arduino VU meters.

We Have a Problem: Earthquake Prediction

Nepal | 25 April 2015 | 11:56 NST

It was a typical day for the 27 million residents of Nepal – a small south Asian country nestled between China and India. Men and women went about their usual routine as they would any other day. Children ran about happily on school playgrounds while their parents earned a living in one of the country’s many industries. None of them could foresee the incredible destruction that would soon strike with no warning. The 7.8 magnitude earthquake shook the country at its core. 9,000 people died that day. How many didn’t have to?

History is riddled with earthquakes and their staggering death tolls. Because many are killed by collapsing infrastructure, even a 60 second warning could save many thousands of lives. Why can’t we do this? Or a better question – why aren’t we doing this? Meet [Micheal Doody], a Reproductive Endocrinologist with a doctorate in physical biochemistry. While he doesn’t exactly have the background needed to pioneer a novel approach to predict earthquakes, he’s off to a good start.

He uses piezoelectric pressure sensors at the heart of the device, but they’re far from the most interesting parts. Three steel balls, each weighing four pounds, are suspended from a central vertical post. Magnets are used to balance the balls 120 degrees apart from each other. They exert a lateral force on the piezo sensors, allowing for any movement of the vertical post to be detected. An Arduino and some amplifiers are used to look at the piezo sensors.

The system is not meant to measure actual vibration data. Instead it looks at the noise floor and uses statistical analysis to see any changes in the background noise. Network several of these sensors along a fault line, and you have yourself a low cost system that could see an earthquake coming, potentially saving thousands of lives.

[Michael] has a TON of data on his project page. Though he’s obviously very skilled, he is not an EE or software guy. He could use some help with the signal analysis and other parts. If you would like to lend a hand and help make this world a better place, please get in touch with him.

He makes a great point during his narration in this video: earthquakes disproportionately affect the poor because they live and work in lower-cost structures unlikely to be outfitted to withstand earthquakes. Shoring up infrastructure is a huge and costly undertaking. Discovering early warning systems like the one [Michael] is testing here will have an immediate and wide-ranging impact at a minimum cost.


Filed under: Hackaday Columns

Old Kit Review – Silicon Chip Mini Stereo Amplifier

Introduction

In this review of an older kit we examine the aptly-named “Mini Stereo Amplifier” from Dick Smith Electronics (catalogue number K5008), based on the article published in the October 1992 issue of Silicon Chip magazine.

The purpose of the kit is to offer a stereo 1W+1W RMS amplifier for use with portable audio devices that only used headphones, such as the typical portable tape players or newly available portable CD players. I feel old just writing that. At the time it would have been quite a useful kit, paired with some inexpensive speakers the end user would have a neat and portable sound solution. So let’s get started.

Assembly

Larger kits like this one that couldn’t be retailed on hanger cards shipped in corrugated cardboard boxes that were glued shut. They looked good but as soon as a sneaky customer tore one open “to have a look” it was ruined and hard to sell:

The amplifier kit was from the time when DSE still cared about kits, so you received the sixteen page “Guide to Kit Construction” plus the kit instructions, nasty red disclaimer sheet, feedback card, plus all the required components and the obligatory coil of solder that was usually rubbish:

However the completeness of the kit is outstanding, everything is included for completion including an enclosure and handy front panel sticker:

… all the sockets, plenty of jumper wire and even the rubber feet:

The PCB is from the old-school of design – without any silk-screening or solder mask:

However the instructions are quite clear so you can figure out the component placement easily. Which brings us to that point – all the components went in with ease:

… then it was a matter of wiring in the sockets, volume potentiometer and power switch:

Instead of using a 3.5mm phono socket for power input, I used a 9V battery snap instead. The amplifier can run on voltages down to 1.8V so it will do for the limited use I have in mind for the amplifier. However in the excitement of assembly I forgot the power switch:

However it wasn’t any effort to rectify that. You will also notice three links on the PCB, which I fitted instead of making coils (more on this later). So at that point the soldering work is finished:

Now to drill out the holes on the faceplate. Instead of tapering out the slots on the side of the housing, I just drilled all the holes on the front panel:

Turns out the adhesive on the front panel sticker had lost its mojo, so I might head off and get some white-on-black tape for the label maker. However in the meanwhile we have one finished mini stereo amplifier, which reminds me of an old grade seven electronics project:

How it works

The amplifier is based on the STMicro TDA2822M (data sheet .pdf) dual low-voltage amplifier IC. In fact the circuit is a slight modification of the stereo example in the data sheet. As mentioned earlier, the benefit of this IC is that it can operate on voltates down to 1.8V, however to reach the maximum power output of 1W per channel into 8Ω loads you need a 9V supply. The output will drop to around 300 mW at 6V.

Finally the Silicon Chip design calls for a triplet of coils, one each on the stereo input wires – used to prevent the RF signal being “shunted away” from the amplifier inputs. The idea behind that was some portable radios used the headphones as an antenna, however we’ll use it with the audio out from a mobile phone so it was easier to skip hand-winding the coils and just put links in the PCB.

Using the Amplifier

The purpose of this kit was to have some sound while working in the garage, so I’ve fitted a pair of cheap 1W 8Ω speakers each to a length of wire and a 3.5mm plug as shown in the image above. And for that purpose, it works very well. In hindsight it turns out the speakers were rated at 1W peak not RMS, however they still sound great.

Conclusion

Another kit review over. This is a genuinely useful kit and a real shame you can’t buy one today. And again – to those who have been asking me privately, no I don’t have a secret line to some underground warehouse of old kits – just keep an eye out on ebay as they pop up now and again. Full-sized images and much more information about the kit are available on flickr.

And while you’re here – are you interested in Arduino? Check out my new book “Arduino Workshop” from No Starch Press.

In the meanwhile have fun and keep checking into tronixstuff.com. Why not follow things on twitterGoogle+, subscribe  for email updates or RSS using the links on the right-hand column? And join our friendly Google Group – dedicated to the projects and related items on this website. Sign up – it’s free, helpful to each other –  and we can all learn something.

The post Old Kit Review – Silicon Chip Mini Stereo Amplifier appeared first on tronixstuff.

Tronixstuff 21 Nov 23:33

Audio Input to Arduino

The easiest way to connect audio signal to your arduino, is build a simple 3 components (2 resistors plus cap) circuitry shown on the first drawings on right side. Disadvantage: as there is no amplifier, sensitivity would be low, hardly enough to work with headphones jack output.  For low level signals, like electret microphone, amplifier is necessary. Here is the kit, which included board, electronic components and NE5532 Operational Amplifier IC:

  Super Ear Amplifier Kit

Other option, from SparkFun Electronics:

  Breakout Board for Electret Microphone

Note: I don’t recommend to replace NE5532 OPA with popular  LM358 or LM324 due their pure frequency response above > 10 kHz.

Configuring AtMega328 ADC to take input samples faster:

void setup() {

   ADCSRA = 0×87; // freq = 1/128, 125 kHz. 13 cycles x 8     usec =  104 usec.
// ADCSRA = 0×86; // freq = 1/64,   250 kHz. 13 cycles x 4     usec =   52 usec.
// ADCSRA = 0×85; // freq = 1/32,   500 kHz. 13 cycles x 2     usec =   26 usec.
// ADCSRA = 0×84; // freq = 1/16 ,    1 MHz. 13 cycles x 1      usec =   13 usec.
// ADCSRA = 0×83; // freq = 1/8,       2 MHz. 13 cycles x 0.5   usec =  6.5 usec.
// ADCSRA = 0×82; // freq = 1/4,       4 MHz. 13 cycles x 0.25 usec = 3.25 usec.

ADMUX    = 0×40;                          // Select  Analog Input 0

ADCSRA |= (1<<ADSC);                 // Start Conversion

Timer1.initialize(T_PERIOD);           // Sampling with TimerOne library
Timer1.attachInterrupt(iProcess);

}

Reading and storing samples to array via ISR ( Timer Interrupt Subroutine ), Timer1 in this example:

void iProcess()
{
static uint8_t n_sampl;
if (ADCSRA & 0×10)
{
int16_t temp = ADCL;
         temp += (ADCH << 8);
          temp -= sdvigDC;    
    ADCSRA |= (1<<ADSC);
xin[n_sampl] = temp;
}

if (++n_sampl >= FFT_SIZE )
{
n_sampl = 0;
process = 1;
}

}

Don’t like to solder all this components from the drawings above? Here is easy way around, if you, by chance, have a spare USB speakers around. Something like this:

Note: Speakers should use USB port as a power source, not AC power outlet!

1.  Open box up, and look  what kind of chip (IC) Power Amplifier inside, on the PCB board:

2.  TEA2025 in this example, but could be different in yours. Not big deal, just write down the name, than go on-line and try to find a data sheet for your particular chip. My favorite links:  1   and   2.  From the data sheet you will find pin numbers of two outputs, for left and right channels. Just solder couple of wires to ground and to one of the output and that’s it!

3. If printing on the IC body is unreadable, or couldn’t find a data sheet, it is possible to trace two wires from the speaker to IC. Most likely, there would be an electrolytic cap installed in series, between chip output and speaker. Solder a signal wire on the chip’s side of the cap, or near IC. There is a slim chance, of course, that IC configured in bridge configuration, and wouldn’t be any caps. It’s even better, just use ether of two speaker’s wires as a signal line, and ground as ??? a ground.

Be careful, use different color of wires for ground line and signal line. There would be no protection, and wrong polarity could damage an analog input of the arduino board, and in some occasions Power Amplifier IC. To prevent this, I’d strongly advise to install 10 kOHm resistor in series with signal wire.