Sunday, August 16, 2009

Couple of 08 boards revisited

Finally had time to finish and test two boards from 08.

The SLA smart charger from here.


And the SPI Bios programmer based on this project.


The SPI bios programmer worked fine, I substituted the original design's CD4049 with a 74HC04, which is the same functionality-wise but with a different pinout. The small adapter board was made because the SMD pads in the main PCB design turned out to be the narrow version (I didn't double-check during design), and I needed the wide one. Soldered the SST25VF080B onto the adapter, inserted it into the DIP8 socket, and modified the original program code for the smaller chip (the only difference between the original project's SST25VF016B is size. The 016B is 2 megabytes, while the 080B is only 1.
Erased the chip, wrote the new bios, read it back, compared. It worked just fine. (Though the mobo had other problems)

Finally found an SMD LM339 to finish the the SLA Charger. I substituted several componens from the original design, with ones I had at home. It seems to work just fine at the moment, but the power transistor requires substantial cooling. I will have to find some sort of case for this sooner or later.

Saturday, July 11, 2009

Zipit2 clock, email / twitter monitor


This was my second (and last) project involving the Zipit2.
It culminated in a PHP script that generates images based on dynamic information, called ImgUI. This can then be displayed on any device that is capable of pulling and displaying images from an HTTP server. The idea should be reusable for any device that fits the criteria.
For the ZipIt2, the quick and dirty way to display images on the screen was to switch the tty over to graphical mode, then just dump raw data to /dev/fb0. This has to be the right orientation and format. I've coded up a tool that takes raw RGB888 pixeldata flips it the right way, then converts it to BGR565. This is used by the script. A minimal shell script on the z2 then just pulls a new image every minute or so and dumps it to the framebuffer. Above you see the Z2 displaying the clock "applet". Thanks to PHP's imap extension I also have one that checks specific folders on imap accounts, and displays unread mail.



Plus I also included a sample twitter applet:



I'm releasing this under the MIT license.

Includes applets seen above, z2 output driver and script, plus a readme file that should tell you everything you need to know.

Download here: ImgUI Z2

Wednesday, July 8, 2009

Relay on LPT port



I made this (on a piece of leftover junk PCB) to remotely switch an external HDD connected to my home server on/off.
I went with the "Safer New Design" from here, but then decided to opto-isolate it anyway. An LPT port data pin switches the led in a 4N25 opto-coupler, which then switches an external power brick's connection to the board. The relay then switches the mains on an extension cord. I pulled the NAIS 5v/220V relay from a broken monitor. Although with this design the switching voltage isn't really that important. As long as it's within the accepted ranges of the opto-coupler and transistor.


Coded up this simple command-line tool in FreeBasic to use it with:

dim as string myCmd
dim as ubyte myState

myCmd = ucase(command$(1))
if myCmd <> "ON" and myCmd <> "OFF" then goto state
if myCmd = "ON" then out &h378,1
if myCmd = "OFF" then out &h378,0

state:
myState = inp(&h378)
if myState = 0 then print "Relay is OFF" else print "Relay is ON"

Update:
I decided to release my board layout along with some notes on this project, in case anyone wants to build this. The notes say it all.

You can check it out here or download it as an Eagle BRD (v5.6)

In case you build it, leave a comment :)

Tuesday, July 7, 2009

Zipit2 mikmod

Due to the projects I've done with the first iteration, curiosity did bring me to buy a Zipit2 eventually. I loved the free IM forever, or similar text on the box even-though they're selling the services now for $100 a year or so.. that makes the initial impression somewhat negative. :-) Anyway, Aeronix kinda supports re-purposing the device this time around. There's some licensing debacle that's keeping the DIYer community away from the device. There does seem to be progress though. I've done two small projects with the Z2 before selling it. (Yes, I don't actually have it anymore). The first one was trying to get mikmod and mad player to work. Basically nothing compiled for the ZipIt1 worked well on the Z2. Nothing that had to do with audio anyway. I don't really know that much about the intricacies of playback on DMA based audio interfaces, but it seemed to have all kinds of buffer problems if I just dumped data out on /dev/dsp (that worked fine with the Z1). I did somewhat manage to get mikmod playing after trying random buffer sizes for about an hour.. but I think it was mostly luck that it worked, and it still hiccuped from time to time. (Then again, so does the stream player in the official software, so maybe it's a general driver bug? or maybe they didn't fully grasp it either..)

Here's a video of mikmod working on the Z2. I won't release anything because I have no idea where I put the files anymore :-) You'll probably need to crank up the volume to hear anything, sorry about that.