Welcome! Log In Create A New Profile

Advanced

Dumb Electronics Question

Posted by maitri982 
Dumb Electronics Question
February 11, 2010 09:52AM
After reviewing everything here, it is not clear to me why a motherboard of any type is needed for 3D printing. As I understand it, there are these items to control\manage:

* 3-axis stepper motors and one extruder stepper motor
* Various end stops sensors
* Temperature Sensing
* Extruder heater

For motor control a simple board like this can be used:

[www.phidgets.com]

and the temp and end stops with this:

[www.phidgets.com]

I know these are stock items and not built by the user, but almost no one is building boards from scratch anyway...instead buying them from MakerBot.

if these boards are hooked to my PC which runs the software, what need it there for Arduino?

Being an electronics neophyte...i apologize for this simple question...
Re: Dumb Electronics Question
February 11, 2010 01:36PM
Timing is the issue. You want to start one segment as soon as the previous one is done. Otherwise, plastic will ooze out of the nozzle and make a mess. I'm not entirely sure what features that stepper board has available. If you can queue up a few moves so you aren't running at the whims of the OS thread scheduler it could work.



Darwin clone, Gen 2 electronics, Arduino Duemilanove w/ AtMega328, 5D Firmware, Pinchwheel extruder
[www.codeerrors.com]
Re: Dumb Electronics Question
February 11, 2010 01:36PM
From all appearances, this appears to suggest replacing one firmware design with another. It looks viable, although 1A output max and unipolar only would seem a little limiting on motor choices.

It also seems like some dependency on host realtime responsiveness might be required, and 60 updates per second seems a bit slow to me (Though, if you're doing straight linear segments, that is probably fine, assuming it can get the velocity / positioning timing right.)
Re: Dumb Electronics Question
February 11, 2010 01:46PM
thanks for the feedback...

I was only throwing out phidgets as one example. i think it would make this whole project much more attractive if there was less electronics involved. One board for steppers and one board for sensors woudl be great.

Cheap netbooks can be bought for under $200...so it is getting hard to justify a dedicated board that needs wired up for this project. I am no compelled by the idea of letting the 3d printer run standlone since either way you do it it needs a CPU...whats the difference if its a laptop attached versus a dedicated board?

I can understand at a high level the issue with timing, but if this is solvable with Arduino then it should be solvable with a windows\linux laptop IMO. But not by me as that is not my skill set...
Re: Dumb Electronics Question
February 11, 2010 02:02PM
It is solvable with a windows or linux laptop, but it is actually more difficult to solve it that way than with a cheap microcontroller such as the arduino. The operating systems that we use are not intended for real-time control, so it takes significant work to make them operate in that manner. If you wanted to go about doing this, your best bet would probably be to start with EMC2: [www.linuxcnc.org]
Re: Dumb Electronics Question
February 11, 2010 02:35PM
>> Cheap netbooks can be bought for under $200...so it is getting hard to justify a dedicated board that needs wired up for this project. I am no compelled by the idea of letting the 3d printer run standlone since either way you do it it needs a CPU...whats the difference if its a laptop attached versus a dedicated board?

Hmm.... cheap netbook for $200 + stepper motor driver cost ($20+)....

Seems awfully expensive for the 'cheap' solution when you compare it to the "I already have a computer, I just need to add the $30 arduino + stepper motor driver cost (20+).
Re: Dumb Electronics Question
February 11, 2010 02:39PM
Most people already have a computer...so cost=$0.

Plus there is time to consider. Putting that Arduino board on there and flashing ROM etc is not going to appeal to the masses...and it is just ugly smiling smiley
Re: Dumb Electronics Question
February 11, 2010 02:45PM
maitri982 Wrote:
-------------------------------------------------------
> Most people already have a computer...so cost=$0.
>

You forget that you have to remove the operating system and install a realtime system to get the realtime behavior. Or, you have to reboot it into "realtime mode".

You might think it's easy to kludge linux or windows to give it realtime behavior, but it is exceedingly complex and a difficult problem to solve if you still want to use the operating system for normal activity while it is printing for 8 hours.

I believe the 'parallel port' bit bangers tried exactly the solution you are proposing, but print quality suffered greatly because of lack of real time (or perhaps there were other issues too? I can't recall right now.)
Re: Dumb Electronics Question
February 11, 2010 03:45PM
Plus don't forget the current system can print direct from an SD card w/o having a computer attached!


Bob Morrison
Wörth am Rhein, Germany
"Luke, use the source!"
BLOG - PHOTOS - Thingiverse
Re: Dumb Electronics Question
February 11, 2010 04:16PM
There are in effect only 3 effective solutions to PC-CAM. Two of these are (low cost) commercial KCam4 and Mach3. EMC2 is the only public (linux) real time driver. The creators of Kcam and Mach (Kelly and Art) originally released these as shareware, Now the versions are crippleware with a trial period.

Note that the above are all x86 processor is required, even on the linux based EMC2. None recommend running from a laptop. All of these programs have had over 10 years of development, with 1000s of users. Even supporting a small book publishing niche.

Parallel ports are also on the way out, which is why products like MaxStepper exist. MaxStepper is a more commercial variation on the RepRap Hardware pods. (Perhaps we should call this controller an hPod? put it into a snazzy steampunk inspired case and sell it to the maker crowd.)

More history (my favorite subject, history of technology)

NC control, dates back to the WWII era of the 1940s, where unskilled (read female) labor was used to operate automatic lathes. These machines were driven by paper tape (The only useful thing the stock market industry gave us, ticker tape.) The numbers on the tape controlled the feed servos, and worked with simple counter registers that repeated the tool moments.

By the late 1970s NC control was perfected. This was taught at trade schools, to support the expanding industrial complex industry using [untrusted] labor. These devices were quickly adapted to the early personal computers.

G-code is a compromise by the reprap project. One I am glad for, since it falls into my own areas of interest and experience.

Ideally as if when Moors law continues, The hardware pod will be able through vector processors (like game graphics engines) be able to take the solid model primitives and do the "boolean" additions and subtractions, without the need of surface primitives. This is an area wide open for research, although I do not think it will appeal to the make/steampunk fadbook user.

None of this is really applicable, to repraps which can replicate themselves. If looking at an autofab, with the old addage of no one wants to know what happens in a sausage factory, then the electronics are the intestines. And the firmware that icky stuff contained inside.

The best way to make PC boards is by engraving (sometimes confusingly called milling.)[1] Personally I am surprised there is not more discussion on this here. There is plenty of discussion on the Yahoo/e-groups forum.

I intend for my own repstrap CNC mill to make it's own next generation controller by engraving the boards. A Mendel would be ideal for engraving PC boards. Since I am wondering off topic, I will start a new thread for this.

The short version is that a Mendel, with simple electronics, memory card slot and serial back channel, can replicate itself. A $200 notebook with obsolete win98 and poor java library support can not replicate itself. Although obsolete notebooks tend to breed, especially if they have 68K/PPC processors. Get two PPC notebooks and a bastard win98 notebook appears from out of nowhere. One can only hope that when the 98 book reaches adolescence, it comes out of the closet and declares itself a Linux machine.

-julie

[1] Isolation routing using eagle
Re: Dumb Electronics Question
February 17, 2010 07:00AM
Hi Guys

Im a masters student at Brunel University, London,and im thinking of studying the reprap, Darwin and Mendel machines.
My report will be focused on the problems anyone in the movement may have faced.

So what problems have you faced????....Feel free to list them, big or small.

The reprap machine at school is having serious malfunctions with the extruder so i know your not alone.

Id appreciate your feedback

Thanks
Re: Dumb Electronics Question
February 17, 2010 08:49AM
Nelson,

You should start a new topic with this question. I think you will get more responses that way.



Darwin clone, Gen 2 electronics, Arduino Duemilanove w/ AtMega328, 5D Firmware, Pinchwheel extruder
[www.codeerrors.com]
Re: Dumb Electronics Question
April 25, 2010 07:05AM
Like many dumb questions, this gets at something rather critical.
Timing.
Where in the printing process do you do the critical timing that
makes the steppers turn and everything go smoothly.
For Mendel this is done on the Sanguino MotherBoard.
But there are other ways to do this and
Software like EMC and Mach3 accomplish this on a laptop
for use in ordinary CNC systems
There are RepRapers using this approach.
google (reprap mendel emc)
or goto reprap.org/wiki/EmcRepStrap

Very good question.
Re: Dumb Electronics Question
May 04, 2010 09:26PM
Bad topic title, I usually skip over these types.

But a very good question. I've picked up complete, ready to use, P-III computers up off the curb on trash day. I'd be happy to commit one to running a bunch of steppers, running the PC headless and sending commands via the ethernet port built into the mobo.

Your power usage would be more, but the cost of power in the developed world means that the break even point would be very far down the road. Headless, A P-III of mine runs at 33 watts. By using a few tricks like under-clocking, using a memory stick instead of a hard drive, and slowing down the fans, you might cut that in half. You could also power the stepper boards off the same supply.
Re: Dumb Electronics Question
May 05, 2010 07:08AM
I have had the same thoughts also. Why use a microcontroller when its sitting next to a computer that is miles better.

It was no contest when PCs had parallel ports, as using the PC was the way to go, but now they only seem to have a USB port the issue of timing does arise and to many this is where their investigation stopped.

There is a way however to get accurate timing as shown here with a simple circuit.

USb stepper control

It uses an off the shelf usb/serial convertor and a few logic ICs. I'm no electronics expert, but this does seem feasible. Perhaps others who have a little more electronics knowledge could comment. It also seems to overcome the problem of stepper driver boards never having enough power. You just build your circuit with uprated components.

Also remember that microsoft visual C# , vb etc. is now free to download, so it wouldn't be too much trouble to transfer the firmware to the host PC. Its also a much more friendly environment to program in than the arduino environment as it has good debugging etc. linux also has many free C compilers.
Re: Dumb Electronics Question
May 05, 2010 08:15AM
martinprice2004 Wrote:
-------------------------------------------------------
> I have had the same thoughts also. Why use a
> microcontroller when its sitting next to a
> computer that is miles better.

Mostly, because modern operating systems cannot guarantee realtime response. They are much faster, but they might be running something else when the signal comes in indicating immediate attention required.

That said, anyone wanting to explore running from a computer should probably look into the EMC2 reprap, which runs a modified version of realtime linux to ensure guaranteed response times.


> Also remember that microsoft visual C# , vb etc.
> is now free to download, so it wouldn't be too
> much trouble to transfer the firmware to the host
> PC. Its also a much more friendly environment to
> program in than the arduino environment as it has
> good debugging etc. linux also has many free C
> compilers.

C# uses garbage collection, which almost guarantees it's realtime response timings will be much greater than may be required, unless you slow printing down. That said, I use C# for my simulations and analysis, because it has very powerful techniques available (closures, functional style programming, etc.) If you can disable garbage collection, and preallocate all structures needed, and avoid any library function that performs allocations, you'd probably be okay.

BTW, this question comes up over and over. Perhaps we need a FAQ at the forum level, that includes questions like this and provides references if people want to go the "minimal electronics and firmware, use my computer" route.
Re: Dumb Electronics Question
May 05, 2010 04:08PM
With reference to C# Garbage collection. I think we really need to get a sense of scale here. Unless you are clearing huge swages of memory the delays will be very small and won't be noticed by a stepper motor program. Garbage collection also occurs in Visual C# when processor usage is less intense. It can be switched off if required and conducted at the programmers request.

Modern PCs run many task simultaneously at all times (even the old ones did) this is why your game doesn't stop when windows messenger recieves an email notification. Its a common misconception that an idle program isn't doing anything. Its performing hundreds of tasks every second all time sliced through the processor.

If delays due to software and internal pc issues were such a big problem how is it that slow computers (286 windows 3.1 etc. ) have successfully run CNC machines since the mid 1980's without issue? A PC is capable of running a garage full of repraps whilst still answering you email.

The only thing that has changed today is the move to USB interfacing which does cause port timing problems. This generally occurs between stepper motors so one axis moves out of sync with another and has nothing to do with the processor bieng overloaded with work or the miniscule time a C# program takes to garbage collect (recover released memory).

The circuit I suggested in the above post makes an attempt to address the port timing issue by only releasing data to all steppers when the data has completely arrived by use of simple logic gates after the USB interface.

If I read the circuit correctly the USB interface also has a buffer for the data which further improves things.

Edited 1 time(s). Last edit at 05/05/2010 04:21PM by martinprice2004.
Re: Dumb Electronics Question
May 05, 2010 07:23PM
martinprice2004 Wrote:
-------------------------------------------------------
> With reference to C# Garbage collection. I think
> we really need to get a sense of scale here.
> Unless you are clearing huge swages of memory the
> delays will be very small and won't be noticed by
> a stepper motor program. Garbage collection also
> occurs in Visual C# when processor usage is less
> intense. It can be switched off if required and
> conducted at the programmers request.

I have not been convinced by the RTOS features on Windows, and I have seen little in way of supporting real time responsiveness in C# running on windows (Even XNA, which theoretically SHOULD have realtime response to do something such as dynamic sound generation lacks that ability.) There was a link I found for an embedded C# environment, but that actually compiled to code to run on a microcontroller, not in the windows OS itself. I've measured the realtime responses of code produced by both free and professional C# editions, for windows and console applications, and it falls short of the guaranteed .1-.5ms timings needed to run bitbanging at the print rate of a standard mendel or darwin -- There are semi-regular delays that pause 20 to 40ms at times. One failure out of a million is still a failure in context of a realtime system, and get the timing wrong could be a catastrophic hardware failure.


> If delays due to software and internal pc issues
> were such a big problem how is it that slow
> computers (286 windows 3.1 etc. ) have
> successfully run CNC machines since the mid 1980's
> without issue?

To specifically answer your question, if the below doesn't make sense, a 286 CPU is more than up to task at managing a CNC if that is the only application you run, and it running on top of a dedicated RTOS.

Based on this comment among others, I suspect you may misunderstand the subtle difference between high performance and real time... these have very two extremely different meanings. You can have an ultra fast superduper computer with fancy operating system running games at a gazillion frames per second, that, once in a while, pauses to collect it's wits and isn't even noticed by the player playing the game. It still might have horrible realtime guarantees, compared to the superslow 6502 running its USB keyboard ... It can easily respond within a millisecond, every single millisecond, forever (or, near enough.. smiling smiley ), where as that 50 or 100 ms delay the game player didn't even notice is an order of magnitude worse performant.

Have you read and understood the wikipedia article on real time computing, or similar? The reason I refered you to look into EMC was the fact that others seemed to have moderate success with it.
Re: Dumb Electronics Question
May 06, 2010 04:29AM
I did understand the difference. Unfortunately controlling a reprap is not a real time computing application. Real time computing as general rule involves systems that require virtually instant response from the OS. They also normally involve a feedback loop which is time critical. The Wiki article suggests such a system eg ABS braking where if there is a delay the system fails.

The reprap machine does not worry if the signal is delayed by a few microseconds as long as the data stream is relatively consistent this is accomplished by using a buffer. Like I said the timing issue is nothing to do with the operating system occasionally taking a siesta but to do with the signals to each motor or across each coil bieng slightly out of sync so the stepper motor skips a beat every now and again. Buffering the data and pushing it to the motors in a timed manner will overcome this. This is effectively what you are using the arduino for in addition to the calculations for movement.

The EMC projects limited success was as far as I can tell due to the lack of input for temperature measurement which could be an issue running the circuit detailed in the link.

The reason I am trying to promote this way of thinking is that for many people its the electronics that are the biggest headache for most people when building a reprap. PCBs are tricky to assemble and built up units are expensive and hard to come by. If we could come up with some effective way to drive steppers directly from the PC the electronics would be very simple, in fact a fully assembled unit would be quite cheap and compact.

Edited 1 time(s). Last edit at 05/06/2010 06:56AM by martinprice2004.
Re: Dumb Electronics Question
May 06, 2010 08:33AM
If you think it can be done, only one way to find out... go do it. I agree with you that it probably can be done, it's all an amount of effort and/or installing the correct modules or operating systems onto the PC. I recall reading a few posts that discussed trying to do parallel port bit-banging, and that should have similar results with a USB style parallel style port. You might want to search and see if anyone got any further than just musing upon it.

I consider the microcontroller to be the smallest 'headache' in terms of acquiring or building the electronics. It took me all of 5 minutes to order something that could be used, for $49 (An arduino mega), and it arrived fully built 3 days later. Cheaper solutions exist in the form of Sanguino, Arduino, Arduino clones, and so on. If you're motivation relates to using something like easier to write/maintain C# for logic control, I'd suggest you look into FEZ mini or FEZ domino, rather than trying to do everything on the host. This would allow a lot more breathing room in terms of real time constraints on the more unpredictable timing for the application running on the host, as the dedicated microcontroller can busy loop without any performance impact on other applications you'd want to run on a more expensive modern computer; the free Visual C# compiler can be used to compile for these microcontrollers.
Re: Dumb Electronics Question
May 07, 2010 09:17AM
Indeed, this "USB interfaces" are microcontollers itself, and are very like an Arduino. Yes, this is just another way to do it. Non-standart, sorry to say.
TC
Re: Dumb Electronics Question
May 08, 2010 12:27PM
martinprice2004 Wrote:

> The reason I am trying to promote this way of
> thinking is that for many people its the
> electronics that are the biggest headache for most
> people when building a reprap. PCBs are tricky to
> assemble and built up units are expensive and hard
> to come by. If we could come up with some
> effective way to drive steppers directly from the
> PC the electronics would be very simple, in fact a
> fully assembled unit would be quite cheap and
> compact.


I agree with many of these points:

- RepRap electronics are a barrier for many people
- many people don't have the skills to acquire and assemble the electronics
- a cost effective, simple solution is needed

However, I think the best approach forward is to improve the electronics in RepRap and not try to replace them with a PC-only solution. There seem to be a number of people collaborating on a variety of approaches to improve RepRap electronics (including me).

[forums.reprap.org]
[forums.reprap.org]
[forums.reprap.org]?
[forums.reprap.org]
Re: Dumb Electronics Question
May 08, 2010 02:26PM
The reprap foundation has realised this shortfall in complicated electronics and I think the arduino mega is now the forerunner for the next generation electronics. Clone arduinos are seriously cheap so technology may overcome the cost or availability issue.

Current reprap electronics are not easy to obtain, makerbot are nearly always out of stock, so the arduino system would help matters. I currently run an arduino mega unit and it works very well on my machine, but by the time you have bought 4 driver boards the cost does get more prohibitive for some builders.

If we could use the processing power of the PC the goal of the reprap actually printing its own electronics would be much more easy to achieve. I cannot see the reprap printing its own microcontroller in the near future, but I could see it printing such things as mosfets ,pcbs, resistors and a plug socket for a small usb convertor.

Edited 1 time(s). Last edit at 05/08/2010 02:31PM by martinprice2004.
TC
Re: Dumb Electronics Question
May 08, 2010 02:45PM
I think it is important to look beyond the electronics issues and to also consider the firmware required to make it all work.

Unfortunately, the firmware appears to be complicated by the use of a resource-constrained and underpowered micro.

I think a cleaner firmware base is needed and the way to get there is to migrate to an ARM-based system.
Re: Dumb Electronics Question
May 08, 2010 03:06PM
martinprice2004 Wrote:
-------------------------------------------------------

> If we could use the processing power of the PC the
> goal of the reprap actually printing its own
> electronics would be much more easy to achieve. I
> cannot see the reprap printing its own
> microcontroller in the near future...

If the RepRap can create PCBs for the stepper and temp drivers, then it can just as easily print out PCB for a microcontroller. A low end entry level system could use an easy to solder DIP chip microcontroller. This adds only a few dollars to the cost of the electronics. I still don't see the argument that moving the microcontrol logic to a PC saves much -- only adds complexity to the constraints on the host software (specifically.. how to get sub ms timing accurate from millisecond to millisecond.)


> but I could
> see it printing such things as mosfets ,pcbs,

Printing MOSFETs? That's interesting.. could you give reference to the specific techniques that would be used?

> resistors and a plug socket for a small usb
> convertor.


TC Wrote:
-------------------------------------------------------
> Unfortunately, the firmware appears to be
> complicated by the use of a resource-constrained
> and underpowered micro.

My opinion takes the opposite view... constrain the software, not the hardware: I'd say, "Unfortunately, too many non-realtime logic components have been pushed into the microcontroller logic block, increasing complexity and load on a low power and cheap microcontroller."

In that regard, I see no reason why logic shouldn't be moved from the microcontroller to the host controller -- acceleration logic, path optimization, temperature conversions, etc. None of this requires real time analysis (except for possibly a very simple deceleration logic block in case resistance or error is detected in closed loop feedback.)
TC
Re: Dumb Electronics Question
May 08, 2010 03:54PM
There clearly are many ways to partition a system like RepRap from electronics, firmware, and software perspectives. My own view is that a microcontroller will be embedded in the RepRap machine.

Ultimately, I think that it is hard to predict how simple, or complex, the firmware embedded in the RepRap will need to be. Future capabilities may require more computing resources, and not less.


I believe that use an ARM microcontroller supports a wider range of solutions and is thus a better choice (will yield a more extensible system). I haven't heard any compelling arguments to dissuade me from using ARM and this is simply the approach I am most interested in working on.

Transforming the current solution to an ARM based solution seems to be straight forward. Transforming the current solution into a system where much of the code is migrated to the host seems more ambitious (at least to me) even though I do see why this could be appealing to some.
Re: Dumb Electronics Question
May 08, 2010 04:10PM
TC Wrote:
-------------------------------------------------------
> lots of good points for using ARM.

I'm not at all opposed to using ARM either. Flexibility and choices are always nice. I just don't see it as a necessary step for the current hardware. Assuming the ARM controller is cheap, there's no reason to think you couldn't just replace the low power device with a higher power ARM (assuming you have the right line drivers to convert voltage levels if you need to switch between 3v3 and 5v.)
Re: Dumb Electronics Question
May 08, 2010 07:17PM
Printing Mosfets

There are a few people doing experiments to make simple electronic components from readily available items. A transistor or mosfet is a simple gate device containing if my memory serves me right 3 layers, so much simpler than a microcontroller.

It is not inconcevable that this could be printed on a reprap, perhaps doped and then overprinted with another layer. The component would be large, but as you dont need many for a stepper driver would be possible to make this and also the connections to them.

Here is a video of a transistor made from a silicon wafer.

nmos transistor

Here is a homemade transistor made from zinc oxide. Diodes can also be made by oxidizing aluminium sheet

homebrew transistor

This is clearly not a power mosfet just yet, but it proves that a semiconductor switch can be done with simple materials.
Re: Dumb Electronics Question
May 11, 2010 02:49AM
I say that you could claim that the motherboard IS the USB to parallel board.
anyone agree?
Sorry, only registered users may post in this forum.

Click here to login