ADAM'S WEB PRESENCE

15 September 2008

New board is populated

Filed under: Products — adam @ 9:06 am

The RS232 Rate Converter and its Programming Adapter

I finally got my lazy arse into gear and assembled the PCB. I got the parts from DigiKey - it still amazes me that it is easier and cheaper to get electronic parts that were manufactured in China or somewhere shipped halfway around the world from the USA than it is to buy them here in Australia!

In any case, I’ve now assembled the board. I did it by hand-soldering this time instead of solder reflow. I think reflow is easier. I’ll do that next time.

Since I had so many spare boards, I hacked one up to be a programming adapter. This is a new feature to make it easy to set up the firmware when I eventually have to make dozens of these things. When the SAM7 chips come from the factory, they need certain pins pulled high to get the USB booloader started. I have put a header on the board to bring out all these pins to a ribbon cable, the USB lines are also brought out. All I need to do now is flip a switch to start the bootloader, then flip it back and download the firmware via USB.

Having all the USB-related parts on a separate board also means I don’t need to install those parts on the production boards which saves a little time and money since they are not needed for normal operation.

I was very pleased to see that apart from one little solder bridge (my bad, easy fixed), the board fired up perfectly and worked first time! I need to do some more thorough testing but it is looking very good so far.


24 August 2008

The boards are here

Filed under: Products — adam @ 8:53 pm

Woohoo! My boards have arrived from China. It cost US$99 for a minimum run of boards from Golden Phoenix, by far the cheapest price I found. That price included Fedexing them to my door.

I ordered 16 boards but they sent me 22 and they were in my hand 8 days after placing the order. The best price I could find from an Australian manufacturer was around $300.

Visually they look perfect although I have not electrically tested them. So far I am impressed!

But I have been slack and have not ordered the parts so I cannot assemble them yet. I’d better get onto that.


12 August 2008

Working prototype of RS232 Rate Converter

Filed under: Products — adam @ 8:33 pm

First prototype of the RS232 Rate Converter

I am making some progress toward a manufacturable design of my RS232 baud rate converter. I now have the prototype working.

As you can see from the photo, I had to add a couple of wires to the PCB but only a couple and I am very pleased about that!

I am going to revise the board design before sending it for manufacture - apart from the couple of patches I also forgot to bring out the chip programming lines and the reset line. These are not needed for normal operation but will be needed to initially program the chip. To this end I am putting a new 10-way header on the board for programming and debugging.

Another issue I had when bringing the thing from prototype to a production stage was the firmware. I realized there really should be some way for end users to update the firmware either to patch bugs or add new features when customers inevitably request them. I do not want to be physically mailing these things back and forth for modification once they are sold. To that end, I have written a boot loader and firmware update utility.

I’m now ready to get the board manufactured. I want to do a small run of 20 or so to start off with. I used BatchPCB for my prototype but they are not cost-effective for more than one or two boards. After comparing a few different places, I have also come to the conclusion that local Australian PCB manufacturers are 3 to 4 times the price of an offshore fab. So I am going to try a Chinese manufacturer.


4 August 2008

Commercializing my Hobby

Filed under: Products — adam @ 6:52 pm

I enjoy designing little electronic devices in my spare time. I like working with circuit boards and digital chips, I’ve posted a few of my projects here on my blog in the past.

And some people have been reading those blog entries and have been asking me to make stuff for them. I’ve given in to a few people here and there and built some. I think this indicates a clear although small demand for these devices.

So I’ve decided to have a go at manufacturing some things for sale. I’ve reviewed my designs and I think these two are obvious candidates:

1. RS232 Speed Converter
2. MIDI Clock Source

I’m going to start with the RS232 Speed Converter since that design requires the least amount of work to get it to production. I’ll post my progress here on this blog. Let’s see if I can sell something. Wish me luck!


21 July 2008

Linux Equivalent of the Windows GetTickCount() function

Filed under: Nerd Notes — adam @ 4:08 pm

GetTickCount() is a real handy function in Windows but does not exist in Linux. This code will give a similar result:

#include <sys/time.h>

unsigned GetTickCount()
{
        struct timeval tv;
        if(gettimeofday(&tv, NULL) != 0)
                return 0;

        return (tv.tv_sec * 1000) + (tv.tv_usec / 1000);
}

14 July 2008

Gravatar support

Filed under: General — adam @ 10:54 am

Just a quick note that this site now supports Gravatars. So if you make a comment here and are registered over at www.gravatar.com, your picture will appear next to your comment like magic!


3 June 2008

UDEV swapped my drives!

Filed under: Nerd Notes — adam @ 4:18 pm

After doing a dist-upgrade on a Debian Etch system, it would no longer boot! It loads the kernel and then stops displaying the following message:

Waiting for root filesystem

I’ve just spent a few torturous hours trying to get it back up again. It took me a while to figure out what was happening but it seems that the updated package for UDEV changes the GRUB configuration so it tries to mount hdb1 instead of hda1 as the root file system. Of course hdb1 does not exist on this single-drive machine so it just sits there like a moron.

Turns out it is not frozen. If you wait about 3 minutes, it will eventually come up with the following prompt:

(initfs)

I found that I can kind of get the system running by typing the following commands. These are for a single-partition system on an EXT3 file system on an IDE hard drive. If your system is different, you will need to modify them a bit:

mkdir /mnt

mount /dev/hda1 -t ext3 /mnt

chroot /mnt

login

Then log in. The next thing to do is to correct the GRUB configuration:

nano -w /boot/grub/menu.lst

Change the root=/dev/sdb1 entry to root=/dev/sda1. Once again, this is for a single IDE drive, you may need to change it if you are booting from SATA or some other kind of device.

Now regenerate the initramfs image:

dpkg-reconfigure initramfs-tools

At last we can reboot. The system came up fine for me after this.

reboot

26 May 2008

Adaptec 1430SA on Debian Linux “Etch”

Filed under: Nerd Notes — adam @ 4:38 pm

Well folks, I just got saddled with this Adaptec/Marvel piece of poo and now I have to make it work on a Debian server. The server belongs to my employer and is running Debian “Etch”.

The Etch release of Debian does not have a driver for this card built-in and even though Adaptec claim to support Linux, their drivers simply do not work unless you are running some specific outdated versions of Red Hat or SUSE. That’s not what I call Linux support!

I’m not the only one discovering this, Brent Norris wrote a wonderful article titled “Adaptec 1420SA is JUNK!” on his blog which describes pretty much the exact situation I find myself in which Adaptec just doesn’t want to know about Linux.

When are these guys (by whom I mean most major hardware manufacturers) going to realize that Linux is here to stay and is getting real popular, especially in the server room.

Anyway, enough ranting. After a couple of hours Googling around, I see that there is an open source driver available for this card and it is built into Linux kernel version 2.6.22. Debian Etch uses 2.6.18 so all I need to do is upgrade the kernel.

The easiest way to install the upgraded kernel is to get a DEB package from Debian Backports. Go to this page:

http://packages.debian.org/etch-backports/admin/

and grab a kernel, there are usually a couple of different versions available there.

Install it and reboot. Works great so far.

PS. I notice that the driver for this card was released into the Linux kernel by Red Hat corporation. So it seems even they are fed up with Adaptec’s poor support for Linux!


13 May 2008

Extract Chapters from a DVD

Filed under: Homemade Creations, Products — adam @ 11:07 pm

I have this video camera, a Sony DVD201E which records straight to a mini-DVD disc. I want to copy the recorded video onto my PC but the software which comes with the camera is pretty awful. Besides it is Windows-only and I do prefer to use Linux.

So I have made a little Linux app which can extract scenes from a DVD disc. The camera records each scene as a DVD “chapter”. My application reads a DVD disc and copies each chapter into a separate MPEG file. I’ll publish it here in case anyone else finds it useful.

Downloading and Compiling

I’m just releasing this as source code at the moment. I have tested it under Ubuntu 7.10 but It will probably work fine on any UNIX-based system. You can download it here:

DvdChapterExtract-1.2.tar.bz2 (16k)

You will need libdvdread and libavformat before you compile. So install those:

sudo apt-get install libdvdread-dev libavformat-dev

Next unpack and compile:

tar jxf DvdChapterExtract-1.2.tar.bz2

cd DvdChapterExtract/Release

make all

Usage

1. You need to record your discs in Video mode, not “VR” mode. VR is a Sony proprietary format which cannot be read in a regular DVD drive.

2. After recording your disc, you must Finalize it in-camera.

3. Put the disc into the DVD drive on your PC.

4. Launch the DVD chapter extract tool like so (assuming /dev/scd0 is the name of your DVD drive).

./DvdChapterExtract -d /dev/scd0

It will extract each chapter into a separate file called chapter001.mpeg, chapter002.mpeg and so on. These can be loaded directly into any video editing software.

The camera also tags each chapter with some meta-data such as the date and time the scene was recorded. I have not yet figured out how to read that data.


30 April 2008

No more advertising

Filed under: General — adam @ 8:36 pm

As you can see, I have removed all the Google ads from this blog.

This blog gets around 1000 page views per day and I’ve been running the ads for about a year and a half now. In all that time Google have not paid me anything. Not a cent! So they are gone.


« Previous PageNext Page »

Powered by WordPress