Cluster of Microcontrollers?

Have questions about a SparkFun product or board? This is the place to be.

Moderators: phalanx, TS-Tim

Postby silic0re » Mon Mar 12, 2007 11:27 am

thanks! i tried to make this board look really clean and yet still have some "cool" factor. :) (i do have a picture of the underside of the board here: http://cogsci.mcmaster.ca/~peter/picclu ... _small.jpg , although it is a little blurry. I tried to keep all the wiring pretty clean on the underside, but there are a few pretty long wirewrap jumpers on there.).


it seems we've actually had the same idea -- my plan was, once I have a good working piece of software and understanding of how to code for the cluster, to get some modular PCB's that use surface mount versions of the dsPIC made up. I was trying to think of what shape to make them -- the cube idea with right angled headers had come to mind as well, and then putting a plug on one side of the cube to interface it with some main board.

I was actually thinking that if I get fancy I might be able to include two interfaces on each little 'PIC cluster cube' -- one that just brings out the straight I2C connected to each of the dsPICs, and another that uses one of the dsPICs on each cube as a 'router'. The 'router' for each cube would be connected to the host, and maybe to the other routers as well, to make a more complex (and potentially more efficient) communications topology. That might speed up interprocessor communications quite a bit, while keeping the simple I2C interface behind the router of a given cube just to interface with 4-10 dsPICs.


i definitely agree though, a huge cluster of PICs in a modular design would certainly be way cool! :) of course there would have to be blinky lights on each cube... :)
silic0re
 
Posts: 349
Joined: Wed Apr 26, 2006 5:35 pm

Postby saipan59 » Mon Mar 12, 2007 11:51 am

...And I think that after you make "the cube", you should mount it inside a large transparent sphere, with the cube supported in the middle by the wires that go radially in all directions. And some of the 'wires' should be those colored light-tube things, so that you can 'see' data moving in and out of the 'brain', which will of course soon take over the world because its smarter than we are, and knows that humans are like a virus that must be terminated...

Pete
saipan59
 
Posts: 228
Joined: Wed Nov 22, 2006 9:04 am
Location: Colo. Springs

Postby saipan59 » Mon Mar 12, 2007 11:56 am

Here's pix of the boards I made recently, which are designed to 'stack' on each other without the need for any cables.
http://www.geocities.com/saipan59/robots/stack1.jpg
http://www.geocities.com/saipan59/robots/stack2.jpg
Each set of 3 boards was a single 'mini-board' from ExpressPCB, then I cut them apart by hand with a jeweler's saw.
One board has a PIC18F2620 on it, the other 2 boards are 'peripherals'.

Pete
saipan59
 
Posts: 228
Joined: Wed Nov 22, 2006 9:04 am
Location: Colo. Springs

Postby daveg » Mon Mar 19, 2007 7:21 am

Nice project, I think this is going to turn into something very nice.
I have been thinking of building a cluster of pics for some time now, but unfortunately have never come up with a practical application other than blinkenlights ;-)

I have an idea about how to program the pics tha i have not read about here.
If I'm correct, the flash program memory is writable from within the pic. How about programming all the pics with a bootloader. That way you just have to program the pics once in a programmer and then stick em on the board. You can distribute the new program to each pic via the i2c network. The boatloader in the pics then programs the flash program memory. do a reset and you're good to go.
daveg
 
Posts: 1
Joined: Mon Mar 19, 2007 7:08 am
Location: Arnhem, The Netherlands

Postby silic0re » Sun Mar 25, 2007 10:33 pm

hi dave,
i definitely had the same thought -- it would be ideal to build an i2c bootloader into the cluster software such that it could be updated easily and without the use of an ICSD.

i've had a lot of responses from people who'd love to see schematics and open source software since this was featured on hackaday.com . to them, i definitely plan on releasing the schematics and sample code as open source, and i think it'd be neat if other people started building these small hobbiest microcontroller clusters. I've even considered building a larger cluster if the performance of the small PIC cluster is actually useful!

thanks,
silic0re
silic0re
 
Posts: 349
Joined: Wed Apr 26, 2006 5:35 pm

Postby silic0re » Wed Mar 28, 2007 10:04 pm

A quick update:
I wrote some very inefficient prime finding code (that would take some time to run) for both the dsPIC and my PC. The code would find the first 100 primes after some number (I used 10,000 and 20,000 in the tests).

The dsPIC runtime was about 1 second starting at 10 000, and about 2 seconds when starting from 20 000, on one of the dsPIC30F3012's overclocked using a 24mhz oscillator. The PC version (running on a 2.4ghz processor) ran at least an order of magnitude faster (it took about 10 seconds to find the first 10000 primes after 20 000).
silic0re
 
Posts: 349
Joined: Wed Apr 26, 2006 5:35 pm

Postby phalanx » Thu Mar 29, 2007 6:52 am

silic0re wrote:PC version (running on a 2.4ghz processor) ran at least an order of magnitude faster...


"At least" is a slight understatement!

The dsPIC is around 30MIPS and is considerably slower with floating point math.

A 2.4GHz Core2 Duo runs at about 22,000MIPS on much larger chunks of data. It can also process floating point numbers natively at about 15GFLOPS! That's smokin'! :shock:
User avatar
phalanx
Non-SFE Guru
 
Posts: 1928
Joined: Sun Nov 30, 2003 8:57 am
Location: Candia, NH

Postby silic0re » Thu Mar 29, 2007 8:03 am

There isn't any floating point involved in my algorithm, just a modulo, so the dsPIC is running pretty speedy. When I get into algorithms that require floating point, then "several orders of magnitude faster" will easily apply.

I think that part of some people's thoughts about the PIC cluster come from the fact that it can essentially solve general purpose problems, but in that class even a light-weight PC would probably solve most problems you can think of much faster. The really interesting question isn't so much how much faster a PC is in general, but rather (at least to me), what sorts of problems can the PIC cluster solve particularly well?

(even the first connection machine didn't have any floating point units :) )

That being said, it's also just a cool project. There's something neat about building your own cluster of microcontrollers and getting them to solve problems, regardless of if it's 10 times slower than your desktop.
silic0re
 
Posts: 349
Joined: Wed Apr 26, 2006 5:35 pm

Previous

Return to SparkFun Product Questions

Who is online

Users browsing this forum: No registered users and 8 guests