Welcome! Log In Create A New Profile

Advanced

Arduino as simplified comm/controller board

Posted by Anonymous User 
Anonymous User
Arduino as simplified comm/controller board
September 21, 2007 05:27AM
Hi all,

I was looking for some electronic for another project this morning, and got on this page:

[www.arduino.cc]

"Arduino is an open-source electronics prototyping platform based on flexible, easy-to-use hardware and software. It's intended for artists, designers, hobbyists, and anyone interested in creating interactive objects or environments."

As someone tried to plug this to RepRap hardware? The environment is written in Java and based on Processing, avr-gcc, and other open source software, so it could easily be programmed to control our RepRap machine I think.

The board is kind of cheap too, 27
VDX
Re: Arduino as simplified comm/controller board
September 21, 2007 05:51AM
... i had very good experiences with stepper-motors and motor-controllers from Nanotec (www.nanotec.de)

The microstep-controlers costs 30
Anonymous User
Re: Arduino as simplified comm/controller board
September 21, 2007 09:25AM
I was poking around CVS last night and stumbled across this:

[reprap.svn.sourceforge.net]

I really wonder if this guy ever sleeps :-)
Re: Arduino as simplified comm/controller board
September 21, 2007 12:53PM
hehehe....

you discovered my little secret. i'm building a 'shield' for arduino that lets you control 3 stepper motors + 6 endstops, and you still have input for 6 analog signals. a shield is basically a pcb with downward facing headers you can directly plug into an arduino. after the stepper shield, i was going to work on a motor shield that has controls for like 3 motors / 3 TIP120's, and some free pins for inputs. hopefully it wont require much of a change to the RepRap control software.

the arduino project is really sweet, and if this goes well, i think it would be a good idea to move all of our electronics over to it. there are a huge number of reasons, and i'd really like to hold off on this discussion for a while, but i'll list them here anyway:

* they have already solved the firmware toolchain problem, and have an integrated IDE. its SUPER simple to use. nobody has to worry about programming a microcontroller anymore
* arduino is open source, as are we.
* did i mention its ridiculously easy to use?
* it already supports USB
* you can buy them off the shelf, or as a kit.
* the wiring language is really nice to program in as well.

its all an experiment right now, but hopefully one that goes well. if it does, then it will benefit both us and arduino. someone could use the stepper shield for a completely different use than reprap, whereas with our current boards, you are basically locked into reprap.

who knows... maybe its a good idea, maybe not. it sure is fun though. =)

oh, also... those boards are based off the L297/L298 'chopper' style circuit, which from what i've read is the *best* way to drive stepper motors.
Anonymous User
Re: Arduino as simplified comm/controller board
September 21, 2007 01:35PM
Quick comments and background.

An Aurdino is basically an AVR microcontroller with a bootloader, compiler, and IDE. Similar in concept to a PICAXE or Basic Stamp only (I think) more powerful and open source. AVR microcontrollers are very similar in capability to PICs and are probably the most direct competitor.

We would not be limited to buying Aurdino hardware from others, but could design our own cards to optimize the design.
Anonymous User
Re: Arduino as simplified comm/controller board
September 21, 2007 01:47PM
Looks good. That's the nice thing about the way this is progressing -- by the time 1.0 is done, it looks like we'll have a bunch of different implementations to choose from -- we've got MSP430 implementations, a few PIC and dsPIC ones, soon Arduino and who knows what else. Like you said, it's much too early to get into that discussion, but it's never too early to start experimenting.
Re: Arduino as simplified comm/controller board
September 21, 2007 03:02PM
yes, one of the main benefits of Arduino is that they've solved all the very tricky issues in the firmware <-> microcontroller toolchain. programming an arduino is very simple: plug your board in via usb, write your code, click upload. thats it. they've solved everything and packaged it into a nice, simple to use package that is still powerful.

since they are open source, we are free to build our project on top of theirs. the nice thing is that we will benefit from any upgrades and bugfixes they make to their hardware as well as software. we will then be free to focus on the core of our project: building an awesome, open source 3D printer.

there is really no reason we should be re-inventing the wheel when there are other open source projects out there we can use to build on. unfortunately, i'm only realizing this now, after i've spent much time and effort on alternative paths.

oh well, i guess thats why they put erasers on pencils, right?

d0ubled Wrote:
-------------------------------------------------------
> Quick comments and background.
>
> An Aurdino is basically an AVR microcontroller
> with a bootloader, compiler, and IDE. Similar in
> concept to a PICAXE or Basic Stamp only (I think)
> more powerful and open source. AVR
> microcontrollers are very similar in capability to
> PICs and are probably the most direct competitor.
>
> We would not be limited to buying Aurdino hardware
> from others, but could design our own cards to
> optimize the design.
Anonymous User
Re: Arduino as simplified comm/controller board
September 21, 2007 03:07PM
I've just bought one this afternoon, and begin to play with tonight, it's really simple indeed.

All this easy steps on hardware will allow me to discover a lot more about electronics in coming days - Java/Ruby developer speaking winking smiley
Anonymous User
Re: Arduino as simplified comm/controller board
September 21, 2007 04:05PM
Zach wrote:
> oh, also... those boards are based off the L297/L298 'chopper' style circuit, which from what i've read is the *best* way to drive stepper motors.

Not sure they are the BEST but they have the big advantage of being closest to the current implementation. They dissipate quite a bit of heat due to inefficient drivers.

[octopart.com]
or
[octopart.com]

are more modern chips with better drivers while maintaining the ease of use.

Sparkfun makes a development board for the A3967
[www.sparkfun.com]
not sure if it would have enough torque at 12V though.

just some thoughts.
Anonymous User
Re: Arduino as simplified comm/controller board
September 21, 2007 04:12PM
Just to make sure:

I am not criticizing your design Zach, nothing wrong with using L298/L297s (at least that I know of winking smiley ) just offering potential alternates in case they were helpful. Nice work.

-David

PS is the design in eagle instead of kicad?
Re: Arduino as simplified comm/controller board
September 21, 2007 06:04PM
hey d0ubled,

no worries about criticism... i'd rather someone point out flaws than me get worthless boards made. thanks for pointing out the l6208 chip. that guy seems to be quite the chip. i'm going to look at the designs on the net i can find around it. i dont have much know-how in the electrical department, so i'm pretty much limited to copying other designs. if i can find a good reference design, i'd consider switching. also, the l6208 seems to be slightly more expensive, but can also drive an extra 0.8 amps which is good for future expansion.

what would your recommendation be? do you think it would be worth it to completely rework my design to use the l6208 chip, or will the l297/l298 chip be good enough to get the job done? i'd rather get a known-good design going, and then get back to the real task of making a great open source printer.

ps. yes, the design is in Eagle. i didnt really feel like building all teh stuff from the ground up in kicad. also, eagle has a great autorouter as well as a free evaluation version people can use to contribute changes. its also pretty much the standard in the hobbiest community.
Anonymous User
Re: Arduino as simplified comm/controller board
September 21, 2007 09:53PM
> no worries about criticism...

In that case...

Just kidding. I'm sure the 297 design will work well, but I'm not sure it will be worth the cost. Chopper control is great, but its main advantage is that it overcomes the inductance of the motor by driving it with a voltage much higher than the motor is rated for. You'd get that advantage if you were driving the standard motor with a 24 or 48V supply, or if you found, say, a 2 or 3V motor to use with our current supply. The nanotech motor is rated for something like 8.5V, and I think the most we can supply it from our 12V power supply is around 9.5V after the 298's voltage drops. I doubt the 1V of difference is worth the trouble and cost -- those 297s are more expensive than I expected. If you're thinking of changing motors or power supplies, ignore what I said.

My knowledge of stepper control is based on a lot of reading and very little practical experience, so take it with the appropriate amount of salt.

> ps. yes, the design is in Eagle.

Welcome to the Dark Side =)
Re: Arduino as simplified comm/controller board
September 22, 2007 03:56AM
I feel if you use a stepper controller chip like the A3967 they have spent quite a bit of time resolving all those little issues that take something from being OK to excellent (like resonance).

They can also be changed from full to eighth step increasing resolution (if the mechanics allow) with nothing more than a jumper change. This allows 200 step motors to be used with the current Darwin design with no loss of resolution

They are cheap and if mounted on a daughter board on the main pic/ Arduino board they can be up/down graded as the true motor size/current required is known.

If further down the road the servo motor design gets sorted the stepper controller daughter board can be changed for a MOSFET output stage daughter board.

I've done quite a lot of electronic development and splitting a design across daughter boards allows the design to evolve in sections without having to redesign everything.

On steppers current/voltage the lower voltage stepper is able to run faster due to a lower coil inductance but requires more current to derive the same torque as a higher voltage model the speed becomes an issue over 150-200rpm so if below this a higher voltage stepper will work requiring less current and therefore cheaper drive chips.

Ian
Re: Arduino as simplified comm/controller board
September 23, 2007 10:59PM
I have been using the Arduino for quite a while, and I have found it to be remarkably robust to date. My wife and I are using it for teaching robotics to grade school kids, so it is also very, very easy to use. In case anyone wants to hack around with one, they can be had in kit form for 15$US each (one at a time - less in quantity 4+) from: [www.moderndevice.com]

I am going to take a look at what Zach has posted and take a look. It would be amazing if we could tap into the toolchain in order to facilitate user-initiated firmware updates. Being able to easily (and openly) provide this capability would be fantastic!
Re: Arduino as simplified comm/controller board
September 24, 2007 09:22PM
hey guys... just wanted to give you a heads up on the progress. the board has been routed in Eagle, and the files are all here: [reprap.svn.sourceforge.net]

check it out and let me know what you think. if i dont find any bugs by friday, i think i'm going to order a test batch. wish me luck!
Re: Arduino as simplified comm/controller board
September 25, 2007 03:06AM
Hi Zach

Why not use one of the all in micro stepping driver chips less board space easier setup with more flexibility (i.e. micro stepping) the IMT901 from nanotec Farnell do this chip or the A3967 if less power is required this only cost
VDX
Re: Arduino as simplified comm/controller board
September 25, 2007 03:42AM
... some years ago i developed on my own microstepper-drivers with the IMT901 for driving a laser-cut-plotter and have some prototypes of single-chip- and two-chip-boards with latches for my part ...

But as i mentioned in the posting above, for others the ready-to-use module SMC11 ( [www.nanotec.de] ) from nanotec could be the easier alternative.

A single one costs 29
Re: Arduino as simplified comm/controller board
September 25, 2007 04:16PM
a few updates:

1. i've reconsidered my design, and realized that its stupid to put all 3 stepper drivers on one board. i'm breaking it up into one board that only controls 3 stepper motors. you then plug each of these boards into your arduino board and go from there. you can then control as many stepper boards as you need. its basically the same technique we're doing now, except you plug it into an arduino instead of a serial network.

i'd like to stay away from SMT if possible. the L297/L298 combo is definitely not the cheapest combination, but its proven to work, and can drive up to 2A/coil. i'm also going to try and get a L293D based design going that can drive smaller motors up to 1A/coil. i think the L293D based design accomplishes the same thing as a A3967.

also on a more philosophical level, i'd rather go with an open source based design. sure, we can buy off the shelf parts and do it that way. but one of the reasons to do our own design is because it ultimately makes it cheaper. even if we buy in bulk, the SMC11 boards are still $50 /ea. if we are making our own boards, then we can do them for $20-$30 / ea. depending on the type of board, as well as build in things that make the project easier for us (limit switch headers, MOLEX power in, etc,)

plus, i'm really enjoying working with these circuits, and i'm learning alot from them. reprap is a project i'm involved in first and foremost as a hobby that is fun. i'm not pushing these boards as a replacement to the reprap boards, but am just trying to solve some interesting problems. if i come up with some boards that are easy to use with an arduino it benefits both us and the arduino community.
VDX
Re: Arduino as simplified comm/controller board
September 25, 2007 04:39PM
Hi Zach,

... i had to design stepperdriver-boards with discrete transistors, the MC3479, L297/L298 and the IMT901.

The IMT 901 was much better, because of the simple layouting and connecting, high possible currents and frequencies and microstepping ...

Actually there are better driver-chips, some with up to 1/128 microsteps, but i agree, that the design should avoid SMT and higher complexities.

I didn't know, if the MC3479 is actual, but if fullstep and 500Hz with 0,8 Amps is enough, then this would be an extreme simple layout ...

Viktor
Anonymous User
Re: Arduino as simplified comm/controller board
September 26, 2007 12:39AM
Unfortunately I dont have a computer with eagle on it currently but if you post a pdf of the schematic I would be happy to do a quick review of it for you.
VDX
Re: Arduino as simplified comm/controller board
September 26, 2007 02:05AM
... here are the data-sheets of the IC's with connection diagrammes

ms3479p: [www.ortodoxism.ro]

IMT901: [www.nanotec.de][1].pdf

Viktor
Anonymous User
Re: Arduino as simplified comm/controller board
September 26, 2007 11:51AM
Some suggestions:
- the path from the 298 through the current sense resistor to ground is high current. You can leave the sense trace that goes to the 4k7 small, but of course Eagle doesn't make that easy.
- Speaking of which, do you have a resistor picked out? I haven't looked, but .5" sounds a bit small. I guess they need to be at least 2W (I^2*R)?
- Those are some big diodes -- they're spaced out over twice as much as the ones on the universal board. I'm not sure about the UF5404s, but the UF4005s I used were the same size as the 1N4005s. If you can switch to a physically smaller diode, with the same packing as on the universal board, you'll save almost 3 square inches.
- If you intend to stack another shield on top of this one (I don't understand the extra power/analog jumpers otherwise), make sure the tall components (7805 and L298) aren't in the way. Actually, if you're putting something on top of it, you'll want all the min/max connections out from under it too.
- add mounting holes. I always forget these in version 1, but they're going to be particularly useful since you're stacking a big heavy board with lots of connectors on top of a small one.
Re: Arduino as simplified comm/controller board
September 27, 2007 10:56AM
emf Wrote:
-------------------------------------------------------
> Some suggestions:
> - the path from the 298 through the current sense
> resistor to ground is high current. You can leave
> the sense trace that goes to the 4k7 small, but of
> course Eagle doesn't make that easy.

yeah, its probably easiest just to make that big rather than small. is there something i need to change there?

> - Speaking of which, do you have a resistor
> picked out? I haven't looked, but .5" sounds a
> bit small. I guess they need to be at least 2W
> (I^2*R)?

not specifically yet. from what i've seen people have been using 1-2W resistors. once i get the board ready for production, i'll do an audit of all the module footprints to make sure they are the right sizes.

> - Those are some big diodes -- they're spaced out
> over twice as much as the ones on the universal
> board. I'm not sure about the UF5404s, but the
> UF4005s I used were the same size as the 1N4005s.
> If you can switch to a physically smaller diode,
> with the same packing as on the universal board,
> you'll save almost 3 square inches.

yeah, as with above i need to do a module footprint audit. smaller components are definitely better.

> - If you intend to stack another shield on top of
> this one (I don't understand the extra
> power/analog jumpers otherwise), make sure the
> tall components (7805 and L298) aren't in the way.
> Actually, if you're putting something on top of
> it, you'll want all the min/max connections out
> from under it too.

well, that was my original intent, however after careful reconsideration, i've decided to move back to a one-board/one-stepper design like reprap uses. the difference here is that each board will still be wired up to one arduino, so you will have one arduino controlling all the stepper motors. it will be much more modular and robust that way (as well as giving you more freedom over how you control your steppers.)

for the shield, i was putting those extra headers there so people could tap into them if needed.

> - add mounting holes. I always forget these in
> version 1, but they're going to be particularly
> useful since you're stacking a big heavy board
> with lots of connectors on top of a small one.

yeah, definitely. i havent quite figured out how to do it in Eagle, but i know theres a tutorial out there.
Re: Arduino as simplified comm/controller board
September 28, 2007 02:26PM
Is the plan to have a single Arduino with a stack of stepper motor control shields, one atop another? I think that would work out well, especially since you could hook the stepper drivers up to a single nice big heatsink, which would also serve to keep everything aligned nicely.
Re: Arduino as simplified comm/controller board
September 28, 2007 05:00PM
well, i decided to move to a one-board / one-stepper model, and move away from the 3 stepper version. i also decided to move away from the shield. instead, you'll just have multiple boards wired together, as we do now.

a shield would be cool, but i just dont know how easy or practical that would be. i also dont know how you'd set it up so that 3 identical boards all use different pins. thats a tricky part there.

also, the arduino doesnt have enough pins to run a full reprap machine, you could probably fit all of it onto one board, but you might have to cut some corners. i'll do some experimentation for sure. so you'll probably have to end up using 2 arduinos, and then handle that in the software. it should be pretty easy, you just specify that motor X is on arduino 1, pins 1-2. min x is on arduino 1, pin 3, etc. we could have a standard config and then just tell people what pins to wire what to.

i think the benefit of this is that all of our boards become very modular, and very useful to not just us, but other people in the open source hardware community. i'm working on: a stepper board, a dual motor driver board based of the L293D, and a simple triple TIP120 driver board. i asked nophead if he'd make me a diagram of his temperature circuit, so if that makes sense, we could make a small pcb of that as well, or you could just wire it up inline.

the stepper motor board has headers for the opto interrupts (which are very easily used on an arduino, and a great example of a nice, modular design), and with 3 of these you would have all the electronics you need to drive your cartesian bot.

for the extruder, you would need one motor driver board, and one of the TIP120 boards (the extruder has 1 motor, 1 heater, 1 thermistor, and an optional fan). eventually we'll probably also try and use a limit detector to tell if you're out of filament or not.

basically, i think its pretty darn good idea to switch to arduino. i'm definitely speaking only for myself, and not the development team, but there are quite a few reasons:

* fantastic firmware development environment
* USB compatible
* simpler, more modular boards
* no more mucking with PIC's, crappy SDCC, poor programmers, etc.
* large Arduino community that loves our project
* collaboration within the open source community
* Arduino has built-in PWM, lots of digital in/outs, and 10 bit analog inputs!!

anyway, i'm going to be working on these designs alot this weekend, and hopefully i'll have some cool stuff to show by monday. wish me luck!
Re: Arduino as simplified comm/controller board
September 29, 2007 05:05AM
Not wishing to throw more in the mix but you know that Microchip do a free student edition of the C18 complier for the 18 range of chips these have on board USB, UART etc up to 12 bit ADC all for a few $.

In the past I've used stuff similar to the Arduino and while they get you going very quickly, with a project like RepRap i can't help thinking you will quickly reach its limits and then be designing to work around the hardware limitations, you already mention using 2, at least with the PIC range or other micro controllers you can readily move up to a higher functioning product often with no code re-writing.

I'm not saying don't go there just tread with caution and try to do the impossible and look into the future.

All that said the Arduino does look very nice piece of kit you can have a lot of fun with, and it's very accessible to everyone.

Finally splitting up the design i think is very good way to go with the drive circuits separate from the logic stuff apart from any electrical advantages it means each can be developed in isolation.
Re: Arduino as simplified comm/controller board
September 29, 2007 12:02PM
thanks for your input. i'll definitely add it to the pile of stuff i'm considering. =)

the way i've worked out that this setup would work is that you use one arduino for the 3 axis machine, and one arduino to control your toolheads (you could easily put a thermoplast and a support extruder on one board, for example)

also, keep in mind that RepRap also uses a similar, but more complicated system to control each of its modules. with our v1.0 electronics, each board controls one single thing (one axis, one extruder, etc.) additionally, we have our own token ring network which can cause some major headaches. with the arduino, we're leaving the network setup to the pros (by using UScool smiley. Then the host software just has to make a decision on which serial port to send the commands to (3 axis controller, or extruder, etc.) I think it is actually a simplification over our current system.

i really like how the arduino also gives you lots of room for experimentation, and allows easy access to all its digital IO pins. its a platform *designed* for tinkering, which is exactly what we need right now.

i'm glad you agree with me on making the electronics more modular, because with these circuits you could theoretically drive them with whatever logic circuit you come up with. for example if you really want to use a big PIC and do it all on one board, you could definitely mount everything on a big piece of perfboard and then wire it all up as one board.
Sounds like there will be two USB cables needed, resulting in two emulated COM ports on the PC.

I think a better approach would be to have a single master controller on the device that communicates with the PC using USB, then a CAN bus connecting the master to the axis controllers, extruders, etc. This would have the following advantages:

- only a single USB cable to the PC
- more powerful master can receive batches of commands from PC and then process in real time (Windows isn't a real time OS)
- CAN bus allows for message priorities and has good properities for industrial communication
- scaleable - CAN supports as many nodes as you can fit into the bandwidth of the network (for example multiple extruders)

If a custom PCB is designed for this and licensed under the GPL then people can source their own boards, etc.

The downsides to this approach are:

- more effort (designing PCB, implementing USB protocol)
- not as easily accessible to hobbists for "hacking"

I believe open source USB protocol stacks are available, but not sure of their quality.

Andy
Re: Arduino as simplified comm/controller board
September 29, 2007 12:59PM
Yes I am with Andy on this one. Nobody expects one device to take up several USB ports. Supporting USB is an overhead that you only want to do once at the device end.

I would use one big micro controller to handle the link to the host and drive three axes and a differential multidrop bus, such as CAN, to the other nodes which can be tiny micros to control things like extruders.

All machines need at least 3 axes and it is much easier, in fact trivial, to synchronise them when they are driven from the same controller. Synchronising them across a bus is more difficult but using a ring is madness.


[www.hydraraptor.blogspot.com]
Re: Arduino as simplified comm/controller board
September 29, 2007 01:36PM
nophead Wrote:
-------------------------------------------------------
>
> All machines need at least 3 axes and it is much
> easier, in fact trivial, to synchronise them when
> they are driven from the same controller.
> Synchronising them across a bus is more difficult
> but using a ring is madness.
>

Hear! Hear! smileys with beer
Sorry, only registered users may post in this forum.

Click here to login