Monday, October 22, 2007

Brilliant collection of hobby electronics videos

http://dev.emcelettronica.com/ETUBE

This is a collection of YouTube videos about different topics in hobby electronics. I've only just discovered this and haven't yet checked out many of the videos, but it's great to see that so many have been posted. It seems to mostly be two guys working for Make Magazine.

Thursday, October 18, 2007

It's a good time to be an electronics hobbyist

OurPCB is a Chinese PCB fab outfit with an initial cost of $57.00 and a subsequent charge of around 15 to 25 cents per square inch for 2-layer boards and 50 to 75 cents per square inch for 4-layer boards. The per-square-inch costs shrink for bigger orders. So PCB fab and assembly is cheap. What do I do with this? Obviously there is a huge opportunity to do something.

PCBs and assembly (even surface mount assembly) are no longer a significant obstacle to complex electronic projects. The next obstacle is that I'm lazy about learning. To some extent that can be addressed by prioritizing what to learn - if USB does all the communication I need, I can ignore PCI.

We could have an electronics hobbyist renaissance as good as the 1970s, starting with a series of articles in Make magazine. O'Reilly would probably love it.

The economics works better for big boards than for small boards. I can envision scalable VLIW array processors spanning several FPGAs, or maybe tightly networked DSPs or GPUs. I like the look of the Analog Devices ADSP-31362. I could review some of the molecular modeling code out there (Amber, CHARMM, Gamess, Gaussian, Gromacs, NAMD) and build an scalable architecture optimized for molecular modeling, large-scale simulations, and other interesting things.

Building a supercomputer, that's so unimaginative. I don't have any interesting problems to feed it. I suppose I could build it and let other hobbyists figure out what problems to throw at it.

Wednesday, October 17, 2007

Some of the code for the board

Much of this code was written by a genius named Wolfgang Wieser, who deserves the Nobel Prize in hobbyist electronics. I've tweaked his code in places.

The firmware is at http://will.ware.googlepages.com/fx2_firmware.tgz and the Eagle design files are at http://will.ware.googlepages.com/n1ibt_board.tgz.

I work in Linux, and the stuff in these tarballs is written to work on a Linux box. To build the firmware you'll need SDCC on your machine. I've built the firmware successfully on Mandriva 2006 and Fedora Core 5. I have had trouble getting it to work on Ubuntu and hope to get that fixed because I'm migrating my home machines to Ubuntu.

Verilog/FPGA tools for Linux

Until I get more organized with this, it's just a collection of random links. I'll need to figure out a way to program the FPGA on my board.Go to the Xilinx web page for downloading WebPACK and grab a free download. It's a shell script; run it to install the Xilinx tools on your hard disk. It will take about a gigabyte so make sure to install it in a partition with that much room. Start reading doc/usenglish/books/docs/qst/qst.pdf. That's as far as I've gotten today.

Good Verilog tutorial here.

More about the board -- progress stalled, hoping to pick it up again

Periodically people email me and ask how things are going with my SDR board. Things are quite thoroughly stalled. I can program the FX2 over the USB cable, and I can wiggle the I/O pins, and I've connected the I/O pins to the FPGA's JTAG programming pins. Theoretically it should be pretty easy to program the FPGA after that. But that's where it is stalled; for some reason the FPGA won't program correctly. Go figure.

One thought is to make up a board with a lot more testpoints, like this.

This design is for a temporary two-layer board that I would use only to get the design and development effort back on track. Once I'd resolved the FPGA programming issues, I'd go back to a four-layer design with a lot fewer testpoints.

But if you're one of those impatient folks who wants to play with a software-defined radio RIGHT NOW then you should check out these links, many of which describe projects that are much further along than my board.

The software-defined radio board (an old post)

Two years after my first attempt, I am working on a new board for software-defined radio. In the past, I pursued this as a political agenda, but that made me rush, and ultimately design a crummy board that didn't work. I've split the design into two pieces and this board is the first piece. It has an 8-bit processor with USB slave capability, and it has a Xilinx XC3S400 FPGA with 400K gates, lots of on-chip RAM, and 16 hardware multipliers, each 18-bit by 18-bit. The USB channel can get data to or from your laptop at over 50 megabytes per second. The board has 46 general purpose I/O pins and six dedicated pins. Not counting assembly, which you can do cheaply at home, the board costs about $70, so it's a pretty good deal for a hobbyist.

The second piece of the radio is a board with fast digital-to-analog and analog-to-digital converters, to translate the signals between the digital domain and the world of radio electronics. A receiver would use an ADC, a transmitter would use a DAC. I'd like to design a receiver board first, but I want to get the USB/FPGA board up and running before that.

If you had this thing connected to your laptop, you'd install GNU Radio and you could transmit and receive radio signals. Depending on the analog hardware you had, you could do this on any of several radio bands, and with the USB bandwidth and a fast ADC, you could pull in whole television signals, maybe even HDTV signals. And that's when things get interesting politically, because that's the battleground for fighting the Broadcast Flag battle.

The USB/FPGA board is a remarkable example of what a low-budget electronics hobbyist can do these days. A couple years ago I spent some money on a license for CadSoft Eagle to do four-layer boards but I expect it to fill my hobbyist needs for a long time. Now I can send my Gerber files to PCB fab outfits in China like this one and get boards for ridiculously low prices. As a result, my electronics projects cost very little more than the price of the parts. It's cool, and it calls for a renaissance of electronics hobby activity. To us oldtimers it seemed like the 1970s was the peak for that kind of thing, but it can come back stronger than ever.

Monday, October 01, 2007

Things are a little different for Ubuntu

On an Ubuntu box I needed to change my 1xEVDO files. Now /etc/ppp/peers/1xevdo look like this.
-detach
ttyACM0
115200
debug
noauth
defaultroute
usepeerdns
connect-delay 10000
user 5089547611@vzw3g.com
show-password
crtscts
lock
lcp-echo-failure 4
lcp-echo-interval 65535
connect '/usr/sbin/chat -v -t3 -f /etc/ppp/peers/1xevdo_chat'
And /etc/ppp/peers/1xevdo_chat looks like this.
TIMEOUT 10
ABORT 'NO CARRIER'
ABORT 'BUSY'
ABORT 'NO DIALTONE'
ABORT 'NO ANSWER'
ABORT 'ERROR'
SAY 'Starting CDMA modem script\n'
'' 'ATZ'
'OK' 'ATE0V1'
OK-AT-OK 'ATDT#777'
CONNECT \d\c
That seems to do the trick. This stuff was cribbed from an article at Linux.com. It seems to work a good bit better, actually, so I should probably try this on the FC5 box as well.