Robot Brain: Build a single board computer in an evening

 by James Moxham
CompletedBoard.jpg
Run out of memory on your Picaxe or Arduino? But a PC is overkill for the job? Take a look at this open source single board computer that can be programmed in languages like C, Basic, Forth, Pascal, or Fortran.

This board uses inexpensive ICs and deliberately uses big chips so it is easy to solder. It uses an operating system called CPM running on a Z80, which was popular in the late 1970s to mid 1980s. As a result, there is at least a gigabyte of software available including programming languages, spreadsheet programs and word processors. CPM is a text based operating system and is a simple version of DOS.

This board is perfect if you are building that highly complex robot or home automation system and keep finding that single chip computers like pics, arduinos and atmegas just don't have the memory.

Modern technology means that hard drives and floppy drives can exist on single memory chips, and computers that used to need a three phase power supply can now be emulated on a board powered by batteries.

A number of N8VEM boards are being built all over the world by a group of friendly enthusiasts http://groups.google.com.au/group/n8vem

Boards are an open source design, and you can build your own or buy one from an enthusiast in the US at cost price ($20). Eproms can be purchased pre-programmed or you can program your own.

Let's put one together and see what it can do...

 
Remove these adsRemove these ads by Signing Up

Step 1: Join the Google Group

BareBoard.jpg
You can browse the group http://groups.google.com.au/group/n8vem but if you send a request to join the group then you can contribute to the discussion. There is a library of files and lots of pictures of working boards.

I sent a message to the group a few weeks ago and asked to join. I ordered a board and it arrived a week later, which is pretty quick from the US to Australia.

I didn't have many of the parts, so I got the parts list from here http://n8vem.googlegroups.com/web/TestPrototype_BOM_PART-LIST.lst?gda=6DMrhVQAAABRoI8ydU505jGCwGWcAnRLVYTZaCdyJias028kLbDjM7mHeIlRNZNuWyWm5kKNAJr2D8gD3ctlIYKczaAghgqdUwk_6Qi3BU8HCN0q6OYwM6JXPqrFQS5SIfKND7QsaYY

Quite a few stores have the parts, including Digikey, Jameco and Futurlec. All the logic chips are specified as LS parts. LS is a bit old school and the chips use more power and run warm. I substituted all the LS chips for the more modern HCT range. HCT are directly compatible but use far less power. Similarly, I went for a CMOS Z80, a CMOS UART (16C550) and a CMOS input/output chip (82C55).

The board arrived about the same time as the parts, and it was time to start soldering.
tinker234 says: May 25, 2011. 4:05 PM
nice wow
etopsirhc says: Apr 11, 2011. 12:27 PM
so where can u actually find 1 to buy in kit or completed , and how many digital and analog I/O pins can u use for it ? *hoping for more than the audrino mega*
James Moxham (author) in reply to etopsirhcApr 11, 2011. 5:34 PM
The project has evolved a lot since this was written - lots of I/O boards are available now. There is a discussion group here http://groups.google.com/group/n8vem

Also the propeller chip might be worth a look http://www.smarthome.jigsy.com/propeller same size as a Z80 and almost the same cost, but it can do so much more - talk to an SD card, keyboard, drive video directly, mouse, and run an entire CP/M emulation if you want. More memory than an arduino, though it might be best to start with Arduino or Picaxe first before moving to the Propeller
djsures says: Feb 27, 2011. 9:55 AM
wow CPM. that's hilaroius! you don't hear those 3 letters anymore. it sure had its time back in the day. i was really young but was raised in an ultra-geeky family so i was very familiar with CPM. the fact that this board even has a uart is great! i might have to order one and play around with it for fun. :) nice instructable.

also, i think anyone dealing with newer microcontrollers can benefit from understanding the history of CPM. the Z80 may not be a comparable chip. but it sure has its place in history. you need to know the history before you can understand the technicals to move forward :)
Douglas W. Goodall says: Jan 31, 2011. 12:20 AM
Calling CP/M-80 a simple version of DOS is not right.

CP/M-80 existed for quite some time before DOS.

While Gary Kildall at Digital Research was writing CP/M-86,
Tim Patterson at Seattle Computer Products wrote a quick
and dirty copy of CP/M-80 for the 8086 to sell with his 8086
two card set. He called it 86DOS. Later after DRI released
CP/M-86, Tim sold the 86DOS to Bill Gates for $50K, and
subsequently, it became MS-DOS.

So you see, DOS is actually a cluttered up version of CP/M-80.

taurus123 says: Aug 6, 2010. 9:52 AM
Hey guys Are you really serious??? CPM?? DOS?? Wakeup and review the technology. Why should anyone fool with a dinosaur like this, while you can buy an ARM board for $150? Get real.
Saturn V in reply to taurus123Sep 6, 2010. 5:15 PM
Let's see....
A $20 board that I make and feel a connection to with basic, simple programming
OR 
A $150 boardthat I get from Amazon nd shipped to my house with confusing advanced programming.

Point made.
jlon says: May 19, 2010. 8:20 PM
The link for the ROM image here on step 3 is apparently stale.  Is there a current one?
James Moxham (author) in reply to jlonMay 19, 2010. 9:35 PM
Ah, yes, sorry about that. We ran out of space on that website, so all the files are now on this website http://n8vem-sbc.pbworks.com/

However, you need to join to get the files. A request to join is in the upper right corner. If there are any problems, the discussion group is here http://groups.google.com/group/n8vem and you can post a question.

The rom image files are in the 'Mini' folder.  
inventerboy says: Feb 3, 2010. 3:59 PM
 so can i control a robot with any pc with this like a micro controller.or is it just extra memory space
James Moxham (author) in reply to inventerboyFeb 3, 2010. 4:39 PM
It is like a microcontroller but with a lot more memory - more like a mini PC. The main use would be if you are using microcontrollers like Picaxe/Arduino and finding you run out of memory all the time. Also this board is more flexible - Picaxe can only program in BASIC and Arduino only in C but this board could use Basic or C (or many other languages too).

Since this instructable the board has got smaller - it now has an SD card with 64Mb of space and can drive a VGA screen directly, so you can truly have an independent computer for only about $50. 
Kiteman says: Aug 19, 2008. 9:43 AM
That second link in step 1 is awfully long.

Try making it into a link like this:
[http://n8vem.googlegroups.com/web/TestPrototype_BOM_PART-LIST.lst?gda=6DMrhVQAAABRoI8ydU505jGCwGWcAnRLVYTZaCdyJias028kLbDjM7mHeIlRNZNuWyWm5kKNAJr2D8gD3ctlIYKczaAghgqdUwk_6Qi3BU8HCN0q6OYwM6JXPqrFQS5SIfKND7QsaYY this]
Which looks like this.
James Moxham (author) in reply to KitemanAug 19, 2008. 3:47 PM
I might see if I can copy the files to another site as I agree, the google links are way too long. Will fix in the next day or two.
killersquirel11 in reply to James MoxhamOct 22, 2009. 1:07 PM
or just go into the edit step, type the word (s), select them, and hit link then paste the link.
Derin in reply to James MoxhamApr 19, 2009. 3:06 AM
Or just use this link:
http://tinyurl.com/d4wanr
PKM in reply to KitemanAug 19, 2008. 10:38 AM
Your link text got cut off there, oh cruel irony :)

James: Kiteman means
[http://n8vem.googlegroups.com/etcetera Text of the link]
ends up like this: Google or this: your very long link
killersquirel11 says: Oct 21, 2009. 12:12 PM
One thing which I think is worth mentioning is when you order from digikey, try to wait until you have multiple projects to buy stuff for.  Shipping is generally the biggest cost there so by ordering as much as possible at once you will cut down on the money you pay for shipping

Also, another, more powerful option is to build a Mini ITX computer (pulls ~35-40W) which can run OSes like Linux and/or Windows (with probably easier setup and programming).
baneat says: Mar 4, 2009. 4:08 PM
very nice, but here's the question we all want to know. can it run crysis??
Dr_Acula in reply to baneatMar 4, 2009. 5:25 PM
Err - not as such. But that does look a fun game. Looks like something to exercise my new graphics card - I might check it out.
szlatyka says: Dec 31, 2008. 3:05 AM
I'm sure I'll build one in the next year XD. I have already put a Primo togehter (it's a hungarian microcomputer from the 70's, based on the East German Z80-clone U880), so this will be fun too!
seabeepirate says: Dec 23, 2008. 4:57 AM
Pretty impressive.
iamdenteddisk says: Sep 28, 2008. 1:55 PM
uber cool,I love the z80 processer especialy for asm, some where here I got the original Cpm disc set all 6..its been about 10year since I used cpm. how much was total project for the computer? I got 2eprom programers 1 a new universal and an old stagg PPz gang programer that was used on the original cpm and z80'S I use it to make cartriges for C64-128 robots I build but my love is the ti86 calculator for its z80ASM I got to know how similar they are? you got to be canadian because that chineese eraser you show only came in 240V unless thers a new version? im intrested cause mine just shot its wad a few days ago..
James Moxham (author) in reply to iamdenteddiskSep 28, 2008. 7:11 PM
Canadian? You are very close. Australia actually. Please sign up to the Google group. The project is evolving day by day - have a look at the discussion section. The next part is a hard disk drive interface. Eprom programmers and erasors have come down a lot in price in the last 20 years - now I can finally afford them! There must be 110 to 240V adaptors around in the US from electronics shops. Certainly there are 240 to 110V ones available here. Eproms have come down in price too. I've been using a system where you write some code, program an eprom, find a mistake, program another and then erase them in batches of 6 or so. It can be just as fast as dowloading programs to pics/picaxes/basic stamps. In fact it can be faster, because the willem programmers use the parallel port and many pics use the serial port.
iamdenteddisk in reply to James MoxhamSep 29, 2008. 1:15 AM
I did join the group but didnt have much time to "snoop". I will be going back today to to find as much info as I can. You might want to look into eeproms, "electronicly eraseable" for prototypeing it is a little more eficenet because of wait time also if you bring your erase time for eproms up to 45min you risk less chance of corruption. I dealt with that alot on a non working programs with flawless code is hard to figure out/debug but corruption is possible by not fully eraseing the chip from previous program, causeing strange checksums. Very informitive you are james, thats in the budget and my main concern for timeing is interface as devices like cdrw,hdd,usb are the common goals of most builders but I also require interface with the phillips "pcf8574" I2c EXPANDER and I know it is possible with most z80's and you say it has RTC builtin so if it is variable the computer rocks in my book I want 10 of them!
James Moxham (author) in reply to James MoxhamSep 28, 2008. 7:24 PM
Addit - I didn't answer the question about cost. It was about $50 including the $20 for the board. I already had a few bits so hopefully that is the right price. I got all the bits at futurlec. Digikey also do a good price. The TTL chips are only 30c each or so. You can pay different prices for the Z80 - as low as $2 if you are ok about ones that only go to 4Mhz. Or pay $8 and get the more fancy CMOS ones that go to 10Mhz and don't even run warm. The eprom, ram and UART were the most expensive bits.
marcwolf says: Sep 17, 2008. 7:06 AM
Very nice little system.. And powerful too. Z80.. I remember those from my CPM days.. Had a Kaypro-2, and a TRS-80 Model 1 Level 2 :> :> Definately something to keep in mind for future projects. Dave
ll.13 says: Aug 20, 2008. 5:04 AM
Nice Instructable!
I really want to get into basic computer electronics, probably start with an Arduino. :-)
James Moxham (author) in reply to ll.13Aug 20, 2008. 6:46 AM
Absolutely. I wrote this last year for picaxe http://www.instructables.com/id/Control-real-world-devices-with-your-PC/

And Arduino is very similar. Start simple. Learn to solder. Learn to make a led flash. Learn a language like Basic (picaxe) or C (arduino).

Then if you do move into bigger boards like this one, your language programming skills will still be relevant and useful.
PKM says: Aug 19, 2008. 8:23 AM
This is really cool! The board reminds me of the inside of my old BBC, with those big chunky non-SMD chips everywhere. I appreciate the hands-on attitude to "just because it's technically a complete computer with an operating system and programming languages doesn't mean we can't solder anything" as well :) IDK why but I have a massive thing about devices with this level of technology- imagine this board with a character LCD on the TTY output, and maybe a packet radio connection for ghetto long-distance WLAN, and you'll see what I mean. It might be my inner steampunk coming out- it's got just enough potential to be able to do almost anything, but isn't so complex and abstract as to resemble magic like modern computers do. Anyway- thanks for indulging my retrotechnofetishism!
James Moxham (author) in reply to PKMAug 19, 2008. 3:50 PM
All those things are in the pipeline. The LCD prototype is on the bench in pieces, and the radio hardware already is working. Just need to think about the software protocols for radio packets and how to hand them over reliably from computer to computer. Thankyou for your encouraging words!
mycroftxxx in reply to James MoxhamAug 19, 2008. 4:59 PM
The book "Making Things Talk" is a good resource for radio protocols.
sedition says: Aug 19, 2008. 4:51 PM
Great instructible! I'm gonna have put this on my list of weekend projects.
jdege says: Aug 19, 2008. 3:21 PM
My first computer was a Heathkit H8 - 8080 processor, running at 2MHz. S50 bus, 4k RAM, expandable to 16K.

And yes, it ran CPM. Or it would have, had I ever managed to get it running.
James Moxham (author) in reply to jdegeAug 19, 2008. 3:53 PM
Now you can get it running! Before the internet everyone was working alone, or maybe with support from a few people in a local computer group. Now, if something doesn't work, the whole world can help.
ongissim says: Aug 19, 2008. 1:16 PM
Cool, it's similar to the 6502 computer that I'm making an instructable for.
Bongmaster says: Aug 19, 2008. 5:52 AM
looks fun :3
Pro

Get More Out of Instructables

Already have an Account?

close

PDF Downloads
As a Pro member, you will gain access to download any Instructable in the PDF format. You also have the ability to customize your PDF download.

Upgrade to Pro today!