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

The Linux GUI Development Nightmare

For about 2 weeks I’ve been having some fun with Linux development, mainly using Ruby to build command-line applications. My decisions, to create command-line applications using Ruby instead of GUI applications, were made because of a simple factor: GUI development for Linux is a nightmare, since there isn’t at least one good GUI prototyping tool available to help you design your UI without having to do everything manually.

First I tried Glade which is just a nightmare. It’s extremely complicated to deal with and you have no clue about which control you should use or how to arrange things, and most importantly there’s not a lot of tutorials and documentation for new users to learn how to use it, and how to integrate with other languages.

Then I was told that Qt Creator was an awesome thing, so I decided to give it a try. I’ve created a new test project and selected the Qt Quick option so I could use QML, which is a lot better for a developer with Javascript background like me. One of the things that made me like this was the amount of good documentation and tutorials.

When I started playing with the Designer one of the first things that I noticed was the lack of simple controls like Buttons, this was pretty strange and I thought I haven’t installed all the things needed, but when I searched for it I got this tutorial from Qt itself, which explains how to create a button in QML (from scratch!!). QML is one of the most awesome things I ever seen to build the GUI logic, it’s simple and flexible, the problem is that there isn’t any kind of controls to create real world desktop applications with it.

After that I took a look at wxWidgets, which lacks good documentation and a decent GUI designer. Then after all this horrible nightmare I thought about creating all my UIs using HTML5 and wrapping everything around a GTK WebKit window, but I don’t think this is a good approach since my apps would look like an alien to the system.

Where are the Delphis of modern computing? I remember how easy it was to design UIs using Delphi and with a right-click on the control you could easily attach an event to it’s logic. It’s this kind of IDE that I’m expecting, one that focus on the fact that you don’t need to struggle to create a UI, but instead that you should be able to create the UI fast and easily enough, so you can focus on the most important thing that is your application logic.

Linux is a awesome OS, I’ve been using it since 2007, and it needs/deserves better tools to create awesome GUI applications, this is one of the reasons that developers aren’t porting their apps to Linux. On Mac OS X we have the awesome Xcode that includes a incredibly awesome GUI designer, and on the Windows side we have Visual Studio with a designer that is the best one in my opinion, since it’s easy, flexible, and powerful. Isn’t this the perfect time for a great Linux GUI designer?

If it’s Good I Don’t Care Which License it Uses

Today I could finally watch the Stallman’s interview on The Linux Action Show, and their second video about it, and I couldn’t agree more with Bryan, so I thought about writing an article about it since most of the responses I saw were just a lot of crap thrown at a person that wants to make a living out of software development.

Stallman has a great dream that software should be “free”, but I think that the developer must also have the freedom to choose if they want to charge or not for their software. Free software is great, but if a developer wants to make a living out of their software, which means be dedicated full-time and not have another job, it’s almost impossible if you only make free software, even if you accept donations they won’t be good enough to make a living. Which means you’ll have to charge for some of your software.

When I’m going to get any kind of software the first thing that I look is at the description, what it does and what it doesn’t, then I look at the screenshots. If the software is considered good (in my opinion of good) I’ll download, if it’s free, or buy, if it’s paid. The developer has the freedom to choose the price of their software and I respect that, if the developer thinks that his app is worth $10 and I think it’s worth too, I’ll surely buy it.

Bryan and Chris also talk about the proliferation of the “App Stores” as a bit of a bad thing. Of course it has it’s cons, but they have a huge pro which is how easily it makes for users to discover and get software. This is good for the user, that will be able to get more software to fit his needs, and is good for the developer which will get more downloads/revenue.

Let’s take me as an example. I’m a student which is very thankful to my parents for supporting me to study and have some time to develop software for fun. That’s why I build software that I want/need to use the best examples (and the ones I’m mostly proud for) are build.prop Editor and stream.json, these are all licensed under the GPLv3, but I’m going to start reworking (long story, worked for 1 month to start this project, all was almost ready and a lot of bugs on bbUI.js made me very depressed and leading to my rage quit from BlackBerry development) and it will be a $0.99 app for iOS, Android, and maybe BlackBerry. My decision to charge for this app is just because of the time I’ve invested and will invest on it.

Free software is a great thing, but the blind way that Stallman looks at this scene is just mind blowing. If he really wants that every company that develops proprietary software fails he is just going to kill his own idea because most of the big free software projects are possible because huge companies that earn money from proprietary software can pay for employees to contribute to these free projects.

Stallman also said that he wouldn’t use/recommend the Raspberry Pi just because of one single proprietary part of it (which is probably the GPU). This, and the discussion about child’s food that he had with Bryan, showed how he cannot think about practical implementations of his ideals of freedom. Projects like the Raspberry Pi are the things that are currently keeping my interesting on programming, since the programming scene is so saturated that everything I think might be a cool week pet project never comes out of the paper I’ve sketched, because there’s already a well known and successful project which does exactly what I wanted and more.

What are your thoughts about my opinion? Want to troll? Agree? Leave a comment and I’ll love (or not) to read it.

PS: This post was written using proprietary hardware on a Apple MacBook Pro 17” (2010 model), running a proprietary OS called Mac OS X, using a proprietary word processing software called iA Writer.