Mini6 Amplifier

Mini6

I was a bit bored a couple of weeks ago so I decided to design a very simple discrete amplifier rated for 6W/channel just to make sure it would’t oscillate and be more confident to build bigger ones.

Schematic

As you can see it’s a fairly simple design with a op-amp pre-amplifier and a discrete power amplifier. Building it was extremely simple, the difficult part is always mounting all the panel components and wiring everything.

Checking component values

A while ago I built a program called build-bom to help me quickly find the component values when assembling a board. It’s a great use for a old EeePC that you may have laying around.

Overview

One thing that you may have noticed is that I’ve used canned transistors instead of your typical plastic TO-92. The only reason I did this was because they looked cool and I have a bunch laying around.

If you want to know more about the amplifier check out the GitHub repo.

Building the Mini12

Mini12

Last week, I decided to take on a very simple project: build a very low distortion, reasonably powerful, battery-powered amplifier that could fit in a very small, transparent enclosure that I had.

The main idea was to have this very small amplifier that could be moved around the house and powered from some 18650 cells so that I could enjoy some music with my friends when they come for our regular LAN parties. Usually we use one of those crappy iPod dock/speaker things that everyone loves, but, personally, they don’t sound very good to me.

Since this was a quick project, I decided to make it as simple as possible to avoid any trouble. The easiest it could be was to use an audio op-amp driving a class B output made with darlington transistors with some negative feedback to keep the distortion really low, so that’s what I did:

Schematic

I also designed a very simple peak detector to detect any clipping on the output to make sure the signal was as clean as possible, but, sadly, my case was so small that I couldn’t fit it in. Since it would be powered from 2 18650 packs (3 cells each) or a pair of 9V batteries, the power supply is extremely simplistic.

When all of the parts arrived, I decided to get everything prepared to be assembled the next day.

Pre-Assembly

Choosing where to put the jacks and switches was a bit tricky since the space inside the enclosure was extremely small.

Holes Drilled

Since I wasn’t patient enough to wait for a PCB, I decided to build the whole thing on a piece of protoboard which was a bit tricky because of the space the jacks took.

Protoboard

After soldering the headphone jack and on/off switch, mounted from the inside, it was time to solder the RCA jacks which had to be mounted from the outside. This was very difficult since I had to make the shortest cable possible while making sure that I could still lift the board up to solder the cable to the PCB.

More Jacks

Sliding the board back into place was extremely difficult, but after a lot of wiggling, it was perfectly placed on the bottom of the enclosure, and I was ready to plug the power jacks into the JST connectors on the board. It was the only way to mount them, otherwise I wouldn’t be able to lift the board to solder them.

Finished

Since it was 1:38AM, I was quite tired, and since I had been working on this thing for 7 hours and 12 minutes, I decided that it was time to sleep and leave the enclosure closing and testing for the next day. (Obligatory picture of the pile of wires and component leads)

First thing to do in the morning was to test the little beast. This was the test setup (after using my oscilloscope and a dummy load to make sure everything was working fine). I had to use the living room table since my bench was a mess (as usual), and there was no space for the 2 speakers.

Speaker Testing

And that’s all! If you want more technical information about the project, be sure to visit the GitHub repo. If you want to discuss it, jump on over to the diyAudio thread.

Low Power 120V+240V Isolation Transformer

Since I was tired of using the flash circuit hack (my version) to power my tube experiments I finally decided to build a isolation transformer using two identical step-down transformers as suggested by Mike in his nixie clock documentation. Here are some photos of it:

Inside

Case

I’m planing to build a adjustable HV lab power supply in the future (which I may sell as a kit), so stay tuned.

Generic Chinese MP3 Player Teardown

As I’ve described in Unbelievable Prices, I bought a crappy chinese MP3 player to use as a “true” sound source (instead of the function generator I use while early-testing my audio projects) for testing my audio circuits without having to worry about accidentally shorting 12V into my iPod’s headphone jack or something like that while probing around.

Yesterday it arrived and as it was expected, it’s the best of Shenzhen. Horrible plastics and build quality, the buttons are super stiff, and overall a shitty product as it was expected to be, but since I’m only going to use it for testing, I don’t care. Here are some pictures of the “beautiful” thing:

As you can see it’s a typical chinese product. The LiPo battery has no markings, except for a weird XI logo, it doesn’t look like a protected pack and the flimsy wires that connect it to the main board can snap off at any second and short the thing out.

Board view

Right next to what looks like the main processor, which sadly I couldn’t find any information about it, there’s a very nicely heat-shrunk clock crystal. On the center of the board you can see a generic 4871 audio power amplifier, and on the left side there’s a BK1080 FM receiver IC.

Top board view

On the other side of the board all you can see is the horrible LCD and the shittiest buttons you can buy in the Shenzhen market.

Lightwave AM Transmitter/Receiver

This week I’ve been experimenting with a very simple and cheap project for wireless transmissions, a lightwave AM transmitter and receiver based on Scott’s design, which was based on VK2ZAY’s design. In my final design I’ve increased the base biasing resistors to decrease the size of the coupling capacitor and also used a darlington transistor to get more current gain.

Schematic

The transmitter is pretty straight forward, the input modulates the current passing by the LED, which modulates the intensity of light, if you’ve designed any class A amplifiers in the past you surely know how it works. The receiver is just a simple transimpedance amplifier, which is amplifying the signal quite a bit (~56x gain) since the transmitter will usually be a bit far from the receiver. You can do the same with a op-amp, but I much prefer a discrete circuit for these simple things.

You can put a buffer stage with a darlington emitter follower on the output of the receiver so you can drive a speaker directly. Something that I would recommend is to add a small (10x gain maybe?) pre-amplifier for the transmitter, that way you’ll get a bit more signal if you’re source isn’t very loud, specially if you want to drive some high power LEDs, since you have a lot of current headroom with those.

If you want to experiment with different values in a simulation, here is the LTspice schematic. The best way to choose the best LED + photodiode combination to maximize the range is to build some breakout boards that you can plug different LEDs and photodiodes until you have the perfect combination.

Prototypes

New content

Since I haven’t written much in the last couple of months, and I plan to focus more on posting things about my electronics projects and electronics-related stuff, I’ve decided to rename the blog to Current Flow. Which is the name of my other blog which I just killed.

I’m also thinking about moving back to Wordpress, but we’ll see about that…

Unbelievable Prices

Since I’m building a bunch of audio circuits lately and I usually have to test them using a “normal” sound source (after extensively testing it with my function generator), I decided I should buy the cheapest chinese crap MP3 player just to protect my phone or any audio source that I’m using. The last thing I want is to short something or accidentally apply a (relatively) high voltage to one of the audio pins, or do anything that could damage my device.

So, I quickly went to MercadoLivre, the brazilian version of eBay, and searched for the cheapest ($3 multimeter quality) MP3 player available, and sure enough, this popped up. It always amazed me how cheap they can produce this sort of crap, but seriously, $6.31 with taxes and all for a device with a shitty color display and all? That’s just insane, they are probably assembling millions of those to be able to produce them at that price.

So, in a nutshell, I’ve bought this piece of junk which will happily suit my needs, since it’s so fucking cheap that it can be considered disposable.

Using a HPC on a Daily Basis

Recently I’ve started using my Jornada 720 as a replacement for my iPad as a lab computer since it’s extremely tiny (space is very important in the bench) and can do practically everything I need my iPad for, of course I still have my main computer in the lab to program microcontrollers and do everything, but the Jornada is great to have near my working area so I can quickly check datasheets, schematics, and parts list while soldering or prototyping.

Lab view

Usually when I’m prototyping or testing a board I have to check datasheets for pinouts, common voltages, etc. and Adobe Reader is great for this task:

Datasheet open

In my main computer I keep a very well organized folder (and database, but I’m still researching the best way to get the DB into my j720 and keep them both synced) with datasheets for practically every electronic component I have in stock. So whenever I update the folder with more stuff I just rsync everything to my Jornada, and since it’s a nice Linux machine I’ve already wrote a nice script to automate things.

Datasheets

Folders

Last, but certainly not least, I’ve built a small command line application a while ago called build-bom which gets a schematic file from my CAD program (EAGLE) and can output the parts list into HTML, CSV, or JSON. So whenever I’m populating a board I export the parts list to HTML and open it in my Jornada so I can know which part to place where in the board:

Parts list

Logitech Wireless Anywhere MX

Recently I was looking for a new mouse to replace my Apple Magic Mouse since for some crazy reason it just doesn’t want to work on my System76 Bonobo Extreme (I went back to Linux), despite the fact that almost every person on the internet says it does. After searching for a while (2 months) I thought the best option was the Logitech Wireless Anywhere Mouse MX, so I ordered one.

I’ve been using it for 3 days now and I gotta say, it’s a perfect mouse, the weight is great (about the same as the Magic Mouse), the scrolling wheel is ok, and it has two customizable buttons (I use them to change tabs in my text editor while I’m coding), the only complaint that I have is the fact that Logitech took a huge effort to come up with the most obnoxious name they could come up with for a mouse.

Some people may hate the fact that it doesn’t use Bluetooth, which means you have to carry that little USB receiver with it, but the good thing is that there is place to put it in the battery compartment so you won’t loose it, personally I don’t care about wireless mouses that use the separate receiver.

Another great thing about it: It comes with a nice pouch to carry it in your backpack and protect it from scratches.

In a nutshell, it’s a great mouse and if you’re looking for one you should definitely take it into consideration.

As some of you may have already noticed I haven’t blogged in a while, that’s because of one simple reason: I’m lazy, but the real problem is that I had a bunch of great post ideas and with all my laziness I couldn’t write them because I was having fun with a new thing for me: Electronics.

Since the day I got my Arduino in December I became fascinated with the world of electronics. I wanted to start posting about electronics here, but because of my laziness and the fact that I didn’t want to flood this blog with a bunch of electronics stuff I decided not to. So, today I created Current Flow which is my secondary blog and the home of all things electronics.

This blog isn’t going away and I’ll try to post at least once a month here, so stay tuned!

The New Wave of Vaporware

Last week I got a new development device, a Galaxy Nexus, mainly for Android development since I bricked my old Galaxy S. Sooner or later I would try to install my favorite alpha mobile OS: Firefox OS. I really wanted to try Firefox OS because of how they want HTML5 to be the primary (and unique) way to build applications, but since I NEVER run anything on emulators, I was waiting until I had a device that was compatible.

So I went to their docs to get started on how to flash their OS into my Galaxy Nexus. The first thing that I see is that they don’t provide binaries, that’s not good, but I can compile it myself, no big deal. So I started following their Building/Installation entries, installed all the prerequisites, pulled the code from their repo and ran the configure command to prepare the repo. Then I realized it was downloading the Android source code, which is fucking huge and takes an eternity to download, at this point I realized things weren’t going to be good.

For some reason they weren’t using Google’s servers to get Android’s code, but instead the shitty Linaro ones, I was getting a extremely unreliable, 60kb/s download, it was a hell. After 4 hours trying to get all the code it started failing bad and then it wouldn’t download the rest anymore, so I went to their IRC channel hoping to get some help, but couldn’t get much of it, but what was interesting from the conversation in the IRC is that their primary development target isn’t phones, but the shitty emulator.

I can rant about emulator and all that crap for days here, but I prefer not to. So, dear Mozilla, if you want developers to really care about the awesome product that you’re building, you should first give us a fast and easy way to install it on our devices.

If you look closer at all these 5th place mobile OSes (Ubuntu Touch, Firefox OS, and Tizen) you’ll realize one major thing: It looks like they’ll never ship (yeah Tizen, you’re the worst at the time), they just appear to be a bunch of vaporware.

I really love to see all these emerging technologies and have fun with development stuff, but if I can’t install it, I’ll just loose my interest and never look back. I think I’ll never try Firefox OS again, it was a great experiment, but if you focus on crap emulators I won’t support your platform.

The Google Tax

Two days ago I came across this: Orange ‘forces Google’ to pay for mobile traffic. Clearly Orange has no idea how the internet works and what’s their involvement in it. The ISP is just a dumb pipe to connect the user to a server, nothing more. If their users are using too much bandwidth and the costs are higher than the profits they should start to rethink the price of their service, not go after Google saying that they are evil for transferring all that data.

We should also mention that if Orange, and other ISPs, start to rethink their service costs they should never throttle the connection. The user fees should be equivalent to their connection speed, not their usage, which apparently is something that ISPs can’t understand too.

In my opinion the bigger problem here is that Google apparently accepted to pay the fees (even worst since the government is also forcing a decision favorable to the ISPs):

French President Francois Hollande warned Google on Wednesday that his government would legislate a so-called Google tax if the company doesn’t reach a deal with French media companies.

If they accept to pay these fees they are going to open the gates to other ISPs to demand the same compensations. This is a completely anti-net-neutrality move, which goes in the inverse direction of Google’s ideals.

Google has also been faced with demands for compensation from content providers such as newspapers, who charge the search giant makes lots of advertising revenue from referencing their material.

What?! If you put such material on your website and allow Google to index it so people can find you, which will generate profits over the ads you have your website, you should instead pay Google (if you don’t use AdSense) for making it a lot easier to generate traffic to your ads.

Hollande said “Those who make a profit from the information” produced by media companies should participate in their financing.

If the information isn’t already publicly available, on the media company’s website and they allowed Google to index their information, there’s no way Google should pay for the profits they are making with ads.

If we really want the internet to continue as it was intended to be companies that are facing these issues should promptly oppose them and make their opinion public, just like what happened with SOPA and PIPA last year. Otherwise things are only going to get worst than they already are.

Getting Rid Of Physical Buttons: The Right Way

Three days ago a friend, which is a regular user, asked me about my opinion on the “new button-less phone that was just released”, he was talking about the Sony Xperia Z. First I explained him that those kinds of phones (button-less) existed for a long time before the Sony one, then I gave him a long explanation why I think the Android way of getting rid of buttons was just wrong.

If you really want to get rid of the physical buttons you shouldn’t replace them with virtual ones, since I still loose part of my screen to that piece of the past, so don’t get rid of them, I prefer to have something more “natural” than just an abstraction of it.

To get rid of the physical buttons in the right way you should first of all replace their place with pixels (shocking!), so I can see more content. After that you replace the button actions to be triggered by something that won’t take more screen space, for example gestures.

A clear example where a company made the transition perfectly is RIM, they came from a OS that was completely driven by physical buttons (BBOS) and went to a fully gesture driven OS (PlayBook OS and BB10). Another great example of how to use gestures is the awesome Ubuntu Phone which in my opinion is one of the best implementations I ever seen.

So, if you want to replace the buttons you shouldn’t just virtualize them, but really replace them with something different.

My Raspberry Pi Post-Mortem

This might be the worst day of this current year. As you might already know yesterday, after 4 months of agony, I finally received my Raspberry Pi. It cheered me up a lot, since in the same day my old Galaxy S bricked. Today the perfect chemical reaction occurred. All the excitement and expectation converted entirely (maybe multiplied) into a strange mix of frustration, sadness, and anger. My Raspberry Pi arrived dead.

After 4 long months of wait, ~20 items on a TODO list, 3 projects, 2 VMs, ~50 tweets, and 3 articles, it all came to a sad end. Today my friend borrowed me his spare USB keyboard so I could turn ON an configure my Raspberry Pi for the first time. While it was booting I had one of the most awesome experiences ever: I’ve watched the original Linux boot, with a logo on the left corner and all those awesome lines blazing through the screen, just like in 2005 when I booted Linux for the first time on my extremely old IBM ThinkPad. After I saw those lines for the first time I decided I wanted to know more about how things were made, Linux got me into programming, and turned me into what I am today. It was a awesome moment to watch those lines again.

The first thing Raspbian did was show me a nice ncurses-based configuration tool. I started configuring it and suddenly “No Signal”. I looked at the Raspberry Pi and the only thing that showed me it was working was the Power LED, all the other LEDs (including the internet ones) turned OFF. I disconnected the power and tried booting it up again. This time it did the same thing, but a lot earlier.

I rushed to my computer to check if it was a known issue and if someone had a fix, many users had similar issues, but not the same, the suggestions were the same: Check the power source voltage and the SD Card. I’ve started by downloading the other distros and flashing them on different cards, without success on the Pi, I was still having the strange issue. Then I decided to get a multimeter to check the voltage of the board, when I checked the board voltage it was great, so it means it wasn’t the power source causing the issue. All I got was to acknowledge that I got a faulty unit.

I inserted the Raspberry Pi back into its case and gently stored it into the drawer were I put all the electronics that stopped working, which currently contains only my first laptop (that ThinkPad with Linux) and my Galaxy S. I care a lot about all my electronics, even after they are “dead”, that’s why I never sold, or trashed any of them, which means I almost have a museum here in my room, with all the devices I ever owned.

I’m curious to know what will be the next thing that will get me as excited as the Raspberry Pi did. Computers, they aren’t fun to play with anymore, and the Raspberry Pi changed this. The mobile world that always excited me, since the day I got my Palm, is no longer that exciting. So what’s next?

I don’t think I’ll be buying another Raspberry Pi, probably not. All the excitement extinguished today.

Updates:

After 4 months of wait… It finally arrived #raspberrypi #gklst