Wednesday, December 24, 2008


Mother of all Boards...

Zach kindly let me have a prototype of his latest Sanguino board. I've just installed it on my RepRap (above) and it runs just fine.

The Sanguino is great as a RepRap controller, and I have been using one on my machine for months. But Zach rightly designed it as a general microcontroller with RepRap as one application, not specifically for RepRap.

He has now used the Sanguino as the basis of a dedicated RepRap motherboard, which is what is in the picture above. This has insulation-displacement connectors on for wiring to all the RepRap Generation 2 electronics, which makes it really quick and easy to hook up.

In addition, it has the components that will allow us to move to the Generation 3 Electronics, which will be needed for RepRap Version II "Mendel" somtime next year. Those extras are an SD card socket, which will allow an SD card with a G Gode file to be plugged in and run on the machine, so the RepRap doesn't need to be attached to a host computer to build things. It will also have RS485 communications to allow it to control an expanding number of other PCBs, particularly for multiple extruders and hence multiple materials.

As you can see, I haven't populated the board very fully. This was delibearate: I wanted to set up a minimal-Sanguino-to-contol-a-RepRap configuration. For that you need (on the new Motherboard or a conventional Sanguino):

  1. C5
  2. C6
  3. SV1
  4. C8
  5. JP8
  6. R1
  7. S1
  8. C1
  9. C2
  10. Q1
  11. C3
  12. JP5
  13. IC1
And you can also have the unneccessary but useful power indicator (hang the expense):

  1. R2
  2. power LED

On the new motherboard you also need:

  1. SV3
  2. SV4
  3. SV5
  4. SV6
  5. SV7
That's enough. Off to wrap presents now...

Awesome! Looking forward to using headers instead of soldering individual wires all the time! SD is a great option too; pretty soon kids will be trading SD cards instead of hockey cards. :)

I love the idea of the IDC connectors and also the new stepper motor controller with the RJ45 for the limit switches.

Will the reprap store sell a new kit for electronics with the new boards?
Stand-alone at last!

Merry Christmas, Adrian and all you reperific rappers.
Wow, very nice! And it appears to be a sanguino shield, in addition to the layout for a sanguino on-board, so those of us with existing electronics ought to be able to use it as well. That ought to be very nice for testing a new reprap with existing hardware! (Though a sanguino's not expensive)
As a later expansion on this idea, I think it would really make a lot of sense to consider an ARM microcontroller. They tend to come with a lot more RAM, they run at much higher speeds, and they have better compiler support. LPC series microcontroller from NXP are a good example. The LPC2364 has a built-in SD card port, loads more peripherals including USB and ethernet, they cost slightly more in quantity than the AVR's ($5.38 @ 100 vs $4.51 @ 100 for the AVR), but they come with double the program memory and 34k of RAM vs 4k of RAM for the AVR, and there are larger versions that fit the same footprint available, up to 512k of flash and 58k of RAM

The major disadvantage is that the LPC2364 is only available in LQFP100.

A major advantage is that programming any LPC requires only a serial port.

With a move to a motherboard architecture, I think it would be viable to use QFP variants.
I've been thinking in a very similar vein to Annirak--although I'm not sure where he got those prices--with particular regards to the LPC2468, which has the added bonus of support for external memory, useful for fun stuff like large instruction buffers, and which has about twice as many pins. Around $10 for a single one from digikey; that's only about $3 more than the atmega644p, which drives the Sanguino. Restricting ourselves to through-hole components seems like a bad long-term plan, particularly considering the much wider variety of much more powerful components available in surface mount packages for often incredible prices, such as is the case with LPC chips. Finally, surface mount circuits would be much, much easier to assemble in a largely automated form. No PCB drilling is required, simplifying the production of the board itself to the point that a light milling tool could do a single-layer board, and solder paste can be laid down directly with a syringe extruder before a pick-and-place tool drops parts into position.

Finally, ARMs sport similar, if not better, open source support than AVRs, to the extent of my knowledge. GCC supports them fully, and there's even a port of Linux (uClinux) that runs on these chips, as well as a wide range of libraries such as EFSL (Embedded Filesystems Library; makes working with FAT easy. ).
Greetings all,

Although I, too, am interested in more CPU power for reprap's realtime control, I'm wary of pushing for too much change, too soon after the last CPU change (PIC -> AVR.) (At least some of) the folks who had invested in the PIC-based electronics are still in the throes of converting to arduino. Too much (or too rapid) change can burn out team members (and consume limited budgets.)

Yes, there's good GCC and related support for the LPC2xxx chips. I'm also at the early stages of evaluating one of the Cortex variants of the ARM arch, the STM32 line -- those have 12-bit A2D channels, but the GCC/GDB/Eclipse support is less mature.

I plan to repStrap with my Sanguino until it cannot support my machine's control demands. By then, perhaps the best way forward will be clearer. (Possibly Arm or Cortex, but too soon to venture a guess.)

-- Larry
One nice thing about ARM is that the code, so long as it is written in C, is largely compatible. As long as the architectural aspects of the microcontroller are abstracted (I use an arch.c/arch.h module), porting from one microcontroller to another is pretty straight-forward. I believe this benefits the nature of reprap because it does not tie the project to just one MCU vendor. Others are software compatible with, hopefully, small hardware changes.

The LPC2378 and LPC2468 both have external memory buses. The 2378 is 8-bit while the 2468 is 16-bit.

The prices I have mentioned are the prices given by The LPC2468 is priced at $14.16USD @ 1, $11.31USD @ 100 at

Huh. I could've sworn digikey had it for $10 or so -- even had that in my notes. Oh well; mouser's got it for $13.46 per single chip still (but is same as digikey in units of 100).


I agree that rapid change can be harmful. However, it's important to note that there's a long way to go from concept to implementation; it's important that we begin to consider and even experiment with the next iteration of the microcontroller now, so that when we inevitably exhaust the possibilities offered by the Sanguino we are prepared with a well understood and tested new system, rather than being forced to limit the machine's capabilities until an alternative can be developed from scratch. This also enables us to experiment and try many things, rather than being forced to adopt the first thing that appears to be workable for the sake of continuing development ASAP.
ralith: i should probably put up a development timeline somewhere. that would help with the confusion.

keep in mind that the reprap project, our resources, and our community are very entangled. SMT stuff is great, but in order to make it the default technology, we need a way to make it pre-fab. yes, its easy to solder, but it simply is not appropriate to distribute kits as SMT only.

we're only now just getting to the scale as a project and as a community where it makes sense to provide fully assembled boards. this makes the switch to SMT possible. the 3rd generation boards are actually primarily SMT and will probably make lots of people happy.

anyway, to get back to your original question re:ARM. my current plan is to base the '4th generation' stuff on ARM we simply have too much invested in the Arduino / Sanguino environment as-is to make a move away from it just yet. i'd expect to see an ARM based motherboard in early 2010. obviously we'll try our hardest to stay as compatible as possible, which should be fairly easy.

This comment has been removed by the author.
This comment has been removed by the author.
Anyway wanted to say, Zach are you aware of the ATmega1284P? I mentioned it in the forum. Has 16k RAM and 128k flash. Unfortunately not available in DIP yet but samples available in TQ44 if you're lucky. As I understand it, it's basically pin compatible with the ATmega644P so could provide another boost to the life of the Sanguino presuming RAM, flash or EEProm is likely to be our problem. (If it's CPU speed or other similar limitations then obviously it'll be not much use)

That sounds great, and very much what I was hoping for. I'd like to be clear about something; when I talk about my ideas for playing with ARMs, people tend to assume I mean to advocate a switch right now. Such an immediate change would be silly, imo; the Sanguino covers are immediate needs quite nicely. However, ARMs are much more complex than AVRs, and as such there is more involved in designing and polishing a system based on one; this is why I think it advantageous to begin early, with the understanding that by the time a few experimental iterations have gone through and something reliable seems to exist, the time to move away from AVRs on a large scale will have arrived.

All that said, there doesn't seem to be any immediate need to move away from the Sanguino; we certainly haven't come close to exhausting its potential, and there's not much point executing yet another platform change until it's actually necessary for continued unrestricted advancement of the RepRap. Shiny as ARMs are, perhaps they can wait a while longer.
I agree with you completely. That being said, I'll be doing my development of toolhead controllers for LPC2103/6. The reason for that is this:

In addition to that, I've been having no end of trouble with the ATMega162 that I have.
This comment has been removed by the author.

Ooo, nice. The LPC2468 has something like that, but it costs about $70 and doesn't appear to have the breakout points, and I'm not sure it's even still in production.

By the way, d'ya think you could find your way onto IRC ( #reprap) sometime? I'd love to discuss this sort of thing in more detail in realtime. Besides, it's always fun to have more active IRCers.
grael (Graham Daniel)
I only just bumped into this blog, and so I've been fascinated to read through it.
Basically, there's a lot of interest in moving in the ARM direction, but concern about leaving the existing generation behind.

Some of you might have noticed I started my ARM project at the end of January, this year (2009)
It's a big project for one person, and I spend almost 3 months of my spare time designing the board, then a couple of weeks to get it made (I got 15 prototypes) from PCBCART in Hong Kong, and then another couple of weeks to get the last components to make up a board.

That takes us to not too long ago, I've been coming to grips with using C for the first time, and implementing the features of the board.

C is rewarding, But the build environment is challenging. Asking for help on the STM32 website is more miss than hit, sometimes people will help, sometimes not.

A couple of people tried talking me into using the LPC arm cortex instead, but I'm happy with the STMicroelectronics ARM Cortex I used (STM32F103VBT). It has an amazing amount of PWM outputs, and the I/O is very flexible. I used another STM chip years ago, that one was a slow 8 bit ST6265, but even then, STM seem to have been a manufacturer who specialises in I/O flexibility, and it really pays as a customer, because you can use the same chip in a lot more applications.

I don't know where Zach is heading with this generation, but I can see the advantages for those who want an easy start, or a small upgrade/extra machine.

My motherboard is not perfect, but the changes I'd make to a generation II are pretty small. My analogue load feedback is, at the moment, a tradeoff between microcontroller protection, and motor current sensitivity. I would prefer to have had some level translation and maybe even some gain, going back to the micro, but the board is perfectly useable as is, it's just that I have high granularity at low current, so if I use motors drawing under an amp, I'd be unlikely to be able to detect a stall during a build.

As with a board like the ardwino or sanguino, there are a lot of alternate uses the board can be put to, and I've already had interest in using it in all sorts of things I hadn't even considered myself.

I think the older REPRAP generations, especially those able to be assembled on single sided circuitboard, will have a long life. The moment there is a decision to make a PCB in more than one layer, it's likely that at least some aspects of production will be outsourced. Once it's outsourced, SMD assembly becomes a logical integration, and quality control step, that is better performed before the end user gets the board.

If I'd designed this as a strictly commercial project, there would have been differences, I would have produced it faster, and not implemented things that weren't strictly necessary. In the end though, it's real, and I'm building drivers for the hardware, one by one.

That estimate of early 2010 might be a bit off the actual pace ! :-)
Post a Comment

<< Home

This page is powered by Blogger. Isn't yours?

Subscribe to
Posts [Atom]