Nathan Campos


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.

Circuit 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.

First Prototypes

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.


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.

Updats: Looks like I’m not alone


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.


Apple, What Are You Doing?

This is my thoughts about the new iPhone that Apple just introduced today. I’m writing this as I watch the keynote. (it was written yesterday at night so I decided to publish it today. I haven’t reviewed or modified it.)

iPhone 5

The name

Seriously Apple? I really loved that you called the iPad 3 the new iPad, which is a lot better for you and for the people since now most of what you’re going to do is just do some iterations like you did from the iPhone 4 to the iPhone 4S. Calling it the iPhone 5 makes no sense.

The bigger screen

That looked like a nice addition in the beginning, but it will become a hell. A lot of apps are going to have those crappy bars, could you guys do what Android does and just re-align the pixels? Most of the apps really have no reason to “take advantage” of that bigger screen. Also that aspect ratio is just the worst one ever. It will also start a little more fragmentation to the platform.

That back

Seriously that back looks like a generic chinese phone back. It is just so ugly. I would prefer if it was made all of the same color/material which would make a lot more sense.


Stock Apps

Shared Photo Stream

Haha, I had to laugh when I saw this. That’s really the worst thing ever. They forgot that today our friends have different devices, usually they are half iOS users and half Android users, also Instagram does this a lot better and in a lot better and more social way.

Siri

Nice new additions to Siri (I’m talking about the sports stuff). I hope that’s international because if that’s only for the USA you just made a stupid decision.

iTunes

The new additions to iTunes were really awesome. The new Mac app UI is really great. I loved the clean interface.


iPod

The nano

The new iPod nano is really awesome and a lot better than the current generation. If I didn’t used my phone as my music player I would buy it for sure. By the way I still can’t understand why someone would use the iPod nano to watch a movie or look at photos.

The touch

The back really looks like crap. It’s really thin and light, but the only market for that is kind of device is for children that their parents doesn’t want to give them a smartphone. Also I had a “WTF?!” moment when they showed that wrist wrap they are calling iPod touch Loop.


Conclusion

Sadly Apple haven’t got me back. I’ll continue to develop for BlackBerry, I think they are doing a better work to innovate with BlackBerry 10.