Welcome! Log In Create A New Profile

Advanced

Help! Single Arduino control of a Darwin

Posted by ssloan 
Help! Single Arduino control of a Darwin
February 12, 2014 02:34AM
Hi Folks

I've just completed the mechanics of a Darwin RepStrap which was never completed and boxed up about 3 years ago.

I'm now at the point where I need to install the firmware for single Arduino control of generation 2 electronics. I've downloaded the firmware from github but when opening and then verifying the single Arduino file I get an error that "'ThermoplastExtruder' does not name a type", and when using the V2 firmware I get a similar issue with the snap.begin command ('snap' was not declared in this scope). I'm assuming that this is because I don't have all of the files in the correct library locations.

Can anyone give me some guidence? Does anyone remember how they got the firmware running back I the olden days of Darwins?

Thanks for reading

Steve
Re: Help! Single Arduino control of a Darwin
February 12, 2014 08:13AM
Just to verify, this is the setup you are using, correct?

What model of Arduino is it?
What is the link to the specific firmware you are using?

You may be able to use a modern firmware, which might help things go smoother...
Re: Help! Single Arduino control of a Darwin
February 12, 2014 02:58PM
Thanks for the response

Yes, that's the link to the Generation 2 setup I'm planning to use, along with an Arduino Duemilanove Atmega328 microcontroller.

The link to the Github directory I downloaded from is here.

I've copied all of the directories to the Arduino libraries directory but I'm still getting the errors.

Any help would be appreciated.

Thanks

Steve
Re: Help! Single Arduino control of a Darwin
February 20, 2014 08:27AM
Hey Steve, sorry for not checking this thread for a while... Are you still looking for a solution?

It's been a while since I've done this, but for some reason it seems like you should be using the Arduino sketch "GCode_Interpreter" and not any of the SNAP options. I think SNAP is actually a different communication protocol than GCode. I am pretty sure that the GCode_Interpreter will still work with a modern slicer and interface program (for example Marlin and Pronterface). You could also try loading a modern firmware like Marlin or Teacup on the Arduino - but they may be too big for the older Atmega328.
Re: Help! Single Arduino control of a Darwin
March 05, 2014 11:33AM
I ran Gen 2 electronics on my McWire some years ago, and got reasonable prints out of it despite the crappy DC motor MakerBot extruder I was using. When I have a chance, I'll look and see if I still have a copy of the firmware that I used.

AFAIK, the SNAP protocol was never implemented on the Arduino-based controllers, and was originally designed for the first generation PIC-based setup, where it was intended that multiple separate modules (each with their own micro-controller) would control each aspect of the machine.
See: [reprap.org] and [reprap.org]


Cameron

Help improve the RepRap wiki! Edit the following page to add suggestions, comments, pages that need updated or fixed, etc.: http://reprap.org/wiki/To_Do
Just click "Edit" in the top-right corner of the page and start typing.
If you are feeling adventurous, take on some of the requested to-do items yourself. Anyone can edit the wiki!
Re: Help! Single Arduino control of a Darwin
March 06, 2014 04:54AM
Cameron and Matt

Thanks for your replies.

I have tried to load the GCode_Interpreter into the Arduino 1.0.5 software and when I try to do a verify I get an error message for the "char word[COMMAND_SIZE];" line. I've not yet tried uploading this but I wouldn't expect it to work if it doesn't pass this stage.

I've attached a screenshot and text file for the error I'm seeing and I was hoping that someone with more Arduino knowledge than me might be able to help.

I believe I've loaded all required libraries etc. so I'm at a bit of a loss now.

Cheers

Steve
Attachments:
open | download - Arduino-error.gif (25.6 KB)
open | download - Arduino-log.txt (5.8 KB)
Re: Help! Single Arduino control of a Darwin
March 06, 2014 09:14AM
This brings back memories! smiling smiley

Take a look at this thread: Firmware WONT compile!! Try this, as nophead suggested in the linked thread:

Quote
nophead
Just replace all the occurrences of "word" in the RepRap code with something else, like "Word" and you will be fine.
Re: Help! Single Arduino control of a Darwin
March 06, 2014 05:56PM
Quote
ssloan
I have tried to load the GCode_Interpreter into the Arduino 1.0.5 software

It's unlikely that the code will compile properly in newer versions of the Arduino software. Try using an older version. Maybe even as far back as Arduino 18 or earlier - try for a version that was released around the time the GCode_Interpreter was released. [arduino.cc]

I remember way back when I was setting up my McWire I had to try a few versions of the Arduino software, as some versions just wouldn't compile the firmware.

Maybe before all that though, try the simple suggestion that MattMoses provided.


Cameron

Help improve the RepRap wiki! Edit the following page to add suggestions, comments, pages that need updated or fixed, etc.: http://reprap.org/wiki/To_Do
Just click "Edit" in the top-right corner of the page and start typing.
If you are feeling adventurous, take on some of the requested to-do items yourself. Anyone can edit the wiki!
Re: Help! Single Arduino control of a Darwin
March 12, 2014 03:11AM
I can't exactly recommend to use such an old firmware. No movement queue, so you get short interruptions between each pair of segments. Flakey acceleration which never really worked - the no. 1 recommendation at these days was to turn it off. Not even mentioning modern stuff like lookahead.

There isn't much point in not to use a modern firmware. A Darwin runs using three steppers for the axes just like every cartesian printer (e.g. the i3) still does. Teacup easily fits into a '328 and also still supports DC extruders. [reprap.org] All you have to do is to adjust pin settings - which varies for each individual printer with Gen2 electronics, so you have to do it anyways.


Generation 7 Electronics Teacup Firmware RepRap DIY
     
Re: Help! Single Arduino control of a Darwin
March 13, 2014 02:33PM
Matt

Thanks for the tip for getting the GCode_Interpreter compiled. After making this change I was able to load the software and test my Y & Z axis movements before my LINUX install died.

Traumflug

I've started looking over the notes for Teacup. I hadn't realised that there was anything else that would fit into a 328. Once I've got LINUX back up and running properly I'll give it a try.

Cheers again Guys.
Re: Help! Single Arduino control of a Darwin
April 09, 2014 09:17AM
I'm slowly getting there!

After an number of problems - a dead LINUX PC, 2 out of 3 stepper driver dying, PWM problems - I finally bought an Arduino Mega and a RAMPS1.4 board. This has been so much easier to set up.

I've got the steppers working and roughly calibrated and have even run a simulated build using Protaface.

I also have the extruder heating. The last problem I have is that I can't and don't know how to get the DC extruder working.

I've uncommented the following lines in the config.h file but where does I connect the motor and how do I control the speed? Is the 180 in the line below a speed?

#define DC_EXTRUDER HEATER_motor
#define DC_EXTRUDER_PWM 180

Hopefully someone will be able to help me with this and I'll be able to print something!

Thanks in advance.

Steve
Re: Help! Single Arduino control of a Darwin
April 09, 2014 01:33PM
It looks like the firmware you are using might be Teacup... Is this correct? (If not, what firmware are you using?)

It seems like Teacup would have you wire the DC extruder motor to one of the heater outputs, which would be one of the three in the "Heaters & Fans" part of the RAMPS 1.4 schematic.

I think "DC_EXTRUDER_PWM 180" sets the motor speed, as in 180/255 * full voltage. This may be the nominal or average speed (or even a constant speed). Not sure how firmware these days deals with a DC motor extruder (since stepper-driven extruders are almost universal).
Re: Help! Single Arduino control of a Darwin
April 09, 2014 03:06PM
Matt

Thanks for the reply. I should have said that I'd taken Traumflug's advice and installed Teacup.

I know that not many people are using DC extruders any more. One of the first priorities when I get the system going is to print the parts for a stepper extruder. At the moment I'm just working with what I've got. After all, there's no point in paying someone for the stepper extruder parts if I can print them myself at some point in the future!

As I say, I'm now frustratingly close to having this Darwin working with just the feed for the extruder to work out, and I think I need to do some work with the Thermistortable.h file as I'm not certain the hot end is actually getting hot enough.

Thanks again

Steven

P.S. I have also added the required "DEFINE_HEATER(motor, PH5, 1)" line in the config.h file and the firmware does compile. Does this mean that the output will be on the D8 connector?
Re: Help! Single Arduino control of a Darwin
April 09, 2014 09:10PM
Quote
ssloan
Does this mean that the output will be on the D8 connector?
Yes, I think this is correct. For the thermistor table you may need to copy over the numbers found in an older table (maybe there is a table with the older Gcode_Interpreter code). A newer one may work fine too, if things are configured properly.
Re: Help! Single Arduino control of a Darwin
April 10, 2014 03:26AM
Quote
MattMoses
I think "DC_EXTRUDER_PWM 180" sets the motor speed, as in 180/255 * full voltage. This may be the nominal or average speed (or even a constant speed).

Yes, and it's a constant speed (which was state of the art before we got stepper-driven extruders). Doing some mapping between head movement speed and extruder PWM values would be possible, but also require some coding.


Generation 7 Electronics Teacup Firmware RepRap DIY
     
Re: Help! Single Arduino control of a Darwin
April 10, 2014 08:27AM
Steve, I don't know if you're aware of this or not, but since the DC extruder is constant speed, you may need to modify the way the G-code is created. A typical block of G-code has lots of movement commands like this:
G1 X104.332 Y89.469 E29.15385
G1 X104.565 Y88.599 E29.18031
G1 X103.293 Y87.326 E29.23325
G1 X102.423 Y87.559 E29.25971
where the E values set the speed of the extruder. In your case, these values will be ignored and you will need to turn the extruder on/off with the commands (I think) M101 and M103 - see the G-code reference page. You may be able to get away with simply turning on the extruder at the beginning of a print and leaving it on until the end (an easy modification to make to a G-code file with a text editor) or you might need to turn it on and off many times during a print... kinda depends on the print I guess. I am not sure if a modern slicer can be configured to generate M101/M103 commands instead of E values.
Sorry, only registered users may post in this forum.

Click here to login