Posts

Backing up the Raspberry Pi SD card

Image
Since there's a lot of talk about corrupted SD cards, I decided it's best if I take a backup of mine every now and then, to ensure I don't lose all my work due to some stupid corruption. There's many different reasons for the corruption problems: faulty memory cards (SD cards have a limited number of read/write cycles, especially the older ones), counterfeit SD cards ( never buy your SD card off eBay! ), bad formatting (never use the windows disk formatter to format SD cards - instead use the SD Formatter by SD card association), removing the power from Raspberry Pi without proper shutdown, bad USB power supplies for the RasPi and RasPi overclocking. For this  instruction to work, you need a Windows PC and a SD card reader. I use the free program Win32 Disk Imager . It works fast and it's free! First, select a folder and a name for the image file you are going to create. Then select your SD card device and press Read. It's that simple. The only do

Fixing missing modules error in Raspbian

If you have used hifi's raspbian-ua-netinst, the unattended Raspbian installer , you might run into problems with modules: depmod -a ERROR: could not open directory /lib/modules/3.10-3-rpi: No such file or directory FATAL: could not search modules: No such file or directory I fixed this problem with: apt-get install git-core apt-get install rpi-update rpi-update reboot Note that this will also upgdare your firmware and the linux kernel!

Getting sound to work on the Raspberry Pi

I wanted to try out audio on the Raspberry Pi, using the Raspbian OS. Here's how I got it to work. The installer I used for Raspbian was the minimal network installer by hifi . This will use up only about 150MB of space and will not install a desktop, so you'll save a lot of resources with this approach. After installing Raspbian, this is what I needed to do in order to get sound output. First, login as root (default password = raspbian - change it ASAP!). Update the package list for APT , the package installer tool of Debian: apt-get update Install ALSA . apt-get install alsa-base At this point I discovered that the minimal installer doesn't include the sound card module of the raspi. Alsa's aplay is a  wav file player, and with it I could check which sound devices are available: aplay -L The output: null     Discard all samples (playback) or generate zero samples (capture) ... and when trying to enable the sound card module, I got an error: mo

Better output buffer for an R-2R ladder DAC

Image
One day I needed a simple R-2R ladder DAC, and needed an output buffer for it, so I started to design one. Initially I was planning to use the LM358, but then I remembered seeing an op amp from TI that would be more suited for the job. First off, I'd like to clear up two things for those that might wonder. Why I need an output buffer? For example the R-2R ladder digital-to-analog converter circuit cannot drive anything by itself. You should be able to observe the waveform with an oscilloscope (typically 1 megaohm input impedance) but probably cannot even drive a sound card input (~10kohm) with only the ladder. You need a buffer amplifier that has a voltage gain of 1 and can drive a low input impedance.   Why linearity is so important? So you get the value you wanted out from the circuit without any distortion. The TLV2472 single-supply op amp makes a great buffer. Unlike with the LM358 , the output is linear from 0 to VDD so you don't have to have an extra voltag

Overview of the LPCXpresso development platform

Image
I got hold of the LPCXpresso development platform. This is a nice, thin 32-bit development platform with a built-in USB programmer for only 20€. The LPCXpresso. On the right is the target board, on the left is the LPC-Link USB JTAG debugger. An interesting design feature of the board is that the LPC-Link USB JTAG debugger portion of the board can be separated from the target and used separately to program NXP's other Cortex-M0, Cortex-M3 and ARM7/9 devices. The separated LPC-Link debugger. Picture: NXP There's three versions of the board. I got the one with the LPC1114 32-bit ARM Cortex-M0 microcontroller. They've also made boards with the LPC1343 and the LPC1769 Cortex-M3 controllers. Check the embedded artists homepage for more info about these . This article focuses on the LPC1114 version. The target portion of the chip features the LPC1114, a 12 MHz crystal and some limited prototyping space. The LPC-Link portion of the board has a LPC3154 for the debu

Review of Arduino DAC solutions

Image
I was in a need of an analog output output for my Arduino, and I found quite many different digital-to-analog converter (DAC) solutions by googling around. So finally I decided to gather them on one page as a reminder for myself and a guide for others. So here it comes! R-2R ladder DAC The most common way to build a DAC is to use a R-2R ladder circuit. Make: Online has a photo-guide for building one. However, this DAC has no output buffer, which would make this circuit a bit more reliable and working with all kinds of loads. MAKE: Online's DAC shield Make: Online - Proto-DAC shield for Arduino A Direct digital synthesizer build using a R-2R ladder DAC - This is worth a look if you're interested in outputting audio. R-2R ladder DAC with output buffer For the best results, you should use an output buffer in the DAC. The buffer separates your R-2R ladder from the load you connect it to and makes the result non load dependent. Here's maybe the best tutorial I&

Vinculo - Arduino clone with USB slave / host capability

Image
I just got hold of  FTDI chip's new Vinculo developing platform, so here's a quick review for you! Vinculo is a 25€ development platform for the FTDI Vinculum II (VNC2) dual USB host/slave microcontroller. The board design has been copied from Arduino, and they even advertise it as Arduino-inspired and Arduino shield compatible. FTDI seems to have realized the potential that comes when having a large hobbyist userbase... Vinculo could be called a USB-enabled Arduino, but that really doesn't do the board justice. There are many features that set it apart from the Arduino, and it also beats Arduino in all the specs (see below). Of course, it's not nearly as user-friendly as the Arduino as a first platform. Look what I got in the mail! Vinculo board with the programming header uncovered (the pins on the right). Compared to Arduino, there are many differences:  - The USB ports on the Vinculo can not used for programming the microcontroller - they are use