Fixing it all with string and sticky tape

There's a huge variety of amazingly powerful and super low cost devices available these days. Very capable single board computers, highly efficient amplifiers, sensors of all kinds. The list goes on and it hardly costs diddly! It's a wonderful opportunity and comes complete with inevitable catch. Most of this stuff doesn't do what it says! It's a weird, twilight world where a chip claiming to be some powerful device doesn't work when you hook it up because it's actually a different - but still very powerful device! It's all going on in there somewhere, but you've got to hack a path through a deep, uncharted cyber jungle.

Here's a few simple nuggets of discovery, in the hopes that it may ease the pain of fellow explorers. Those who at some time may dare work with PAM8610 amplifier, the ESP01 and the DFplayer...

The PAM8610 gets you around 15W of very efficient class D stereo power amp for a few pennies in the size of a big postage stamp. The ESP01 is the cheapest version of the ESP8266 wifi enabled single board computer, and the DFPlayer is an mp3 player that takes an SD card and has lots of stuff it can do when you send it serial control signals.

Rule #1 - If you can run this stuff from batteries rather than a power supply, then really do that! My experience is that a mains power supply or USB power can introduce a whole bunch of unexpected problems - sometimes. I suspect high frequency / RF noise is the culprit, but don't at this time know for sure. On the other hand, should you need it, step-up voltage regulators will take your battery voltage and convert it up to whatever you want with no fuss, no muss.

Rule #2 - Batteries lie. There are super low cost rechargable AA NiMh batteries that claim to be 3000mAh. But they're not. They're around 300mAh. Still handy - just one tenth the stated capacity! You can tell the difference because they are very light. Panasonic eneloop rechargeables are superb, but much more expensive, of course. 'Industrial' Duracell non rechargeable are dependable and can be got very cheap in quantity, and something like 2500mAh for an AA. But - drawing heavy current from them kills them fast! The battery 'capacity' depends a lot on how you use them. In one test, halving the current draw from Duracell extended the life by eight times! NiMh do heavy current better, but it's smart to go sets in parallel to lighten the load per battery.

#3 - PAM8610 amplifier sends a lot of ultrasonic noise to the speaker. Class D amplifiers should have a bunch of filtering on the output so they don't do this. The PAM8610 saves money by not, or at least less. Some of the time that's fine, but in combination with other corner-cutting equipment, it may have problems. I found that the energy burned as high frequency noise in the speaker was enough to cause power supply lag and make 'motor-boating' oscillation problems. A simple and effective solution is to add an inductor in series between the amplifier and the speaker, and best for that is an air-cored inductor. Hand winding one is easy. An inductor presents a higher impedance to the signal, the higher frequency that signal is. If the speaker is 4 Ohms, then wind an inductor that will present 4 Ohms at 20KHz and it'll filter out signals above the audio range. Roughly speaking :) To make it - get a cardboard tube approx 2.5cm in diameter - the kind in the middle of kitchen foil, use a length approx 2.5cm long, wind approx 42 turns of wire round it, tape it so it stays. I confess I love this fix! It's got a hokey Blue Peter thing going on while being pretty much technically perfect too. More expensive class D amps will have little ferrite core inductors on the output to do the same thing. However, those inductors can't be matched to the speaker 'cos the manufacturer doesn't know what speaker we'll be using. Also, the ferrite core makes them small, but creates audio distortion as a trade-off. The chunky kitchen-roll version actually has higher performance. Makes me feel like I'm in nerd nirvana :) Different impedance speaker needs a different number of turns. Use an online calculator (or email me, if you like) to get the right number...

#4 - ESP chips are great. Metric crap tonnes of power and possibilities. I'm going to do some crazy distributed AI thing with a bunch of them, just as soon as I work out what it is... But they don't like to sit next to each other on the same power rail. These are just wonderful devices and the main 'weird' I've had with them is that two running on the same +volts rail don't always get along. Look out for inconsistent WiFi communication. RF noise no doubt, and thus solvable with plenty of decoupling. Just a couple of large capacitors wasn't enough to fix it for me though. It'll be trying some more hand wound inductor experiments again...

#5 - The DFPlayer can do all kinds of messed up stuff! I loved this thing for a while, but now I'm looking for ways to never have to use them again. A source of RF noise, lots of odd stability problems, something funny going on with the serial tx, rx lines that introduces funny oscillations... On top of that, the timing is pretty messy. Individual units not only take an unpredictable time to power up or respond to commands, but play at different rates too! Expect DFPlayers to run out of sync with each other by around a second in three minutes. Not a problem for everything, of course - but insurmountable if it does matter to your application. The simplest solution is to use something else! It's a nice, low cost fix for simple stuff, but if you have to depend on it or have less 'expected' creative needs then just drive on past...

Featured Posts
Recent Posts
Archive
Search By Tags
No tags yet.
Follow Us
  • Facebook Basic Square
  • Twitter Basic Square
  • Google+ Basic Square