Instructables

Robot Brain: Build a single board computer in an evening

Picture of Robot Brain: Build a single board computer in an evening
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
taurus1234 years ago
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.
Because, sometimes, even the new technology is even more cluttered-up that the SCP-DOS 1.0 that later became Q-DOS/MS-DOS. (as Doug Goodall described.) and limited to bloat by libraries, excess code that gets hauled in, that's not needed. The Z80, was the powerhouse in its day, and today (believe it or not, a LOT of items on the market use a variant of the Z80, as their controller.) CP/M, was a simplified OS, made to run in (here's the bloat-ware shocker) UNDER 8K. (that's 8192 BYTES,) of memory. Yes, everyone knows about the Raspberry-Pi, the Arduino, the Beagle-Bone, etc.. But this was (a) a platform built from scratch, (b) using a FREE OS (pretty sure Novell gave CP/M's source code away for free when they folded. All they wanted, was Concurrent-DR-DOS for Netware when they bought-up the remainder of Digital Research Inc.) AND... SCP-DOS, (Seattle Computer's OS for the 8086) was a Intel Upconverted (Intel's 8080 to 8086 translation software) version of CP/M-80 (at the time, still copyrighted by Digital Research.)
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.
tinker2343 years ago
nice wow
etopsirhc3 years ago
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)  etopsirhc3 years ago
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
djsures3 years ago
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 :)
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.

jlon4 years ago
The link for the ROM image here on step 3 is apparently stale.  Is there a current one?
James Moxham (author)  jlon4 years ago
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.  
inventerboy4 years ago
 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)  inventerboy4 years ago
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. 
Kiteman5 years ago
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)  Kiteman5 years ago
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.
or just go into the edit step, type the word (s), select them, and hit link then paste the link.
Or just use this link:
http://tinyurl.com/d4wanr
PKM Kiteman5 years ago
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
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).
baneat5 years ago
very nice, but here's the question we all want to know. can it run crysis??
Dr_Acula baneat5 years ago
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.
szlatyka5 years ago
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!
Pretty impressive.
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)  iamdenteddisk5 years ago
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.
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)  James Moxham5 years ago
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.
marcwolf5 years ago
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.135 years ago
Nice Instructable!
I really want to get into basic computer electronics, probably start with an Arduino. :-)
James Moxham (author)  ll.135 years ago
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.
PKM5 years ago
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)  PKM5 years ago
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!
The book "Making Things Talk" is a good resource for radio protocols.
sedition5 years ago
Great instructible! I'm gonna have put this on my list of weekend projects.
jdege5 years ago
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)  jdege5 years ago
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.
ongissim5 years ago
Cool, it's similar to the 6502 computer that I'm making an instructable for.
Bongmaster5 years ago
looks fun :3