Welcome! Log In Create A New Profile

Advanced

Problem with host software and ardunio

Posted by drummerboyx 
Problem with host software and ardunio
November 10, 2009 07:43PM
I hooked up everything to my arduino and all my axis run with the host software perfectly. When I go to the extruder tab, it reads the temp alright but when I press the "extrude" button or the "heater on" button, nothing happens. I looked in my code and wired it up exactly as it said in my code. Also, in the preferences for the host software I set fiveD to false.

I'm really confused.

Thanks,
Drummerboyx
Re: Problem with host software and ardunio
November 10, 2009 10:18PM
Well, it sounds like you've got basic communications working OK if you can read the temp and move the axis.

Which exact version of the firmware, and which version of the host software (and what OS) are you running? Also, are you using the Gen3 electronics with a separate Extruder Controller?

One thing I often do for testing is to send Gcodes directly to the motherboard from a serial terminal (say, Hypertermianl if you're on windows), to isolate whether the problem is with your host software or your firmware. M105 checks the temperature, and M104 S50 would set the temperature to 50 deg C.

Also, check the LED's on the extruder controller - some versions of the firmware use different outputs to run the heater.

Wade
Re: Problem with host software and ardunio
November 10, 2009 10:22PM
I'm using Gen 2 reprap electronics, so I don't have an extruder controller board. I'm using which ever version firmware is the most resent.

Thanks!
Drummerboyx
Re: Problem with host software and ardunio
November 10, 2009 11:21PM
I have a gen2 setup and have got it working.

First are the relavant lights coming on ?
There is a debug LED on both DC motor board and PWM board?

The latest Firmware does not work due to a bug in the DC motor code.
Have you made the firmware change?

if you want my updated version see
[dev.forums.reprap.org]

You want the v1.9 version at the bottom.

Should work straight out of the box.

Stephen
Re: Problem with host software and ardunio
November 11, 2009 07:12AM
How do I open that file that you've attached?
Re: Problem with host software and ardunio
November 11, 2009 03:33PM
It looks like Stephen does his development under Linux.

A PC app that understand the gz/tar format is PowerArchiver.

I transferred the contents to zip file for you as an attachment.
Attachments:
open | download - gcodeArduinov19.zip (17.5 KB)
Re: Problem with host software and ardunio
November 11, 2009 03:44PM
Thanks! I just tried it out and the extruder motor works fine, but the heater and all 3 of my steppers don't. I hooked them up exactly as the code says. I have no clue what the problem is.

Thanks,
Drummerboyx
Re: Problem with host software and ardunio
November 11, 2009 04:09PM
Since you previously had stepper motors working take a look at the values for end & home sensors and stepper motor enable from your previous driver.

There can be various differences if they are active low or high depending on your hardware mix.
Re: Problem with host software and ardunio
November 11, 2009 04:16PM
In my previous set up I did not use the enable line from the driver. I just used step, direction, gnd, and +v.
Re: Problem with host software and ardunio
November 11, 2009 05:16PM
OK...Now My stepper motors sort of work. They can only go in one direction. In the host software I used the buttons that make the stepper motor move and it only moves when I press the right one. When I press the left one the motor does nothing. Also, The heater still dosen't work, but I think I know what the problem is...

Thanks,
Elijah Wood
Re: Problem with host software and ardunio
November 11, 2009 05:38PM
> They can only go in one direction
I suspect you are using 1.1 stepper boards and therefore have the older optical switchs which are swaped over .... I use the newer optical board with an led to show you if it's active or not.

I think you need to make the following change

Parameter.h

// Set to one if sensor outputs inverting (ie: 1 means open, 0 means closed)
// RepRap opto endstops are *not* inverting.
//#define ENDSTOPS_INVERTING 0
#define ENDSTOPS_INVERTING 1

needs to be

// Set to one if sensor outputs inverting (ie: 1 means open, 0 means closed)
// RepRap opto endstops are *not* inverting.
#define ENDSTOPS_INVERTING 0
//#define ENDSTOPS_INVERTING 1
Re: Problem with host software and ardunio
November 11, 2009 05:48PM
Hi drummerboyx ()

I don't suppose you could give me a list of the problems you have had and
how you solved them. I am trying to make the arduino firmware code and gen2
electronics as useable as possible.

regards

Stephen

P.s. freds is right I don't use windows. Sorry should have included a .zip.
Re: Problem with host software and ardunio
November 11, 2009 05:56PM
If you are in the debuging stage and you are using my firmware
you might be interested in enabling

// #define PROCESS_STRING_serial_monitor_debug
to
#define PROCESS_STRING_serial_monitor_debug

in the parameter file.

It allows you to use the serial monitor for debuging purposes.
The serial monitor comes with the arduino compiler and can be activated by clicking the button next to the upload buton and setting the speed to 19200.

You can now test out the firmware directly without having to use the pc software.

// tells you the temperature of the extruder
M105;

Turns your motor on
M108 S255;
M101;

// reverse motor
M102;

etc

See [reprap.org] for more Mcodes.

regards

Stephen
Re: Problem with host software and ardunio
November 11, 2009 07:24PM
Thanks! I'm going to test the new code change tomorrow and I'll keep you updated. The following problems I faced were:

1. I have a different thermistor and it was reading the temp. wrong. I had to play around with the #s in the code to get it to work, but I still don't know if it is accurate or not.

2. The stepper problem (which you had shown me above)

And that's about it. The firmware was great and I really didn't have to do much to get it to work.

Also, you should contact the RepRap guys and give them your code to post on their site. I thought it was sort of a hassle to ask it in the forums and wait for a response.

Thanks,
Drummerboyx
Re: Problem with host software and ardunio
November 11, 2009 09:48PM
Thanks for the info

Please Would you fill in the following to say what environment worked and how.
Just so people following you get their firmware code to work.
(I can only test so many options)

Just fill in the version numbers

Thanks

Stephen


// v1.9 tested on the following environment

// PC Setup
// OPERATING SYSTEM XXXXXXXX, Arduino vXX compiler,
// ReprapXXXXXX (global.FiveD=XXXX,extruder0.extruder speed 255, etc XXXXXXX )

// Electronics
// Arduino Diecimila,vX.X Stepper drivers,vX.X Temperature sensor,vX.X Opto enstop,vX.X PWM Drier,vX.X DC Motor driver, etc XXXXXX

// Extruder
// Makerbot.com/plastruder-mk4fs

// Firmware changes
// Parameter changes - #define INVERT_X_DIR X, #define USE_THERMISTOR, #define ENDSTOPS_INVERTING X, EXTRUDER_FORWARD false, EXTRUDER_REVERSE true

// Pin changes
// None
Re: Problem with host software and ardunio
November 12, 2009 01:57PM
I'll get you that ASAP! Just have to get the info.
Re: Problem with host software and ardunio
November 12, 2009 03:23PM
Ok, bad news... My stepper motors still only go in one direction. I made the changes and still nothing. Can you send me the file with the changes? Maybe I did them wrong. Also, I have V1.2 stepper drivers.
Re: Problem with host software and ardunio
November 12, 2009 05:49PM
What level do you have on the optical switch?
Does it have an led on it?

Try the following

Start reprap up.
Start REprap
Move it one way.
Move it the other way.

You said that it will only move one way.

Now Power off - complete reset.
turn off everything and repap and host computer

Now get a credit card (not paper) and stick it in the optical sensor.
If you have one with an LED it should light up.

Start reprap up.
Start REprap host software
Move it one way.
Move it the other way.

Report your findings.

Stephen
Re: Problem with host software and ardunio
November 12, 2009 05:52PM
P.s. If you look in the firmware pde I have lists my complete list of
electronic component versions with the changes I made to get it to work.

Please compare the versions and tell me if there are any differences with version 1.9

regards

Stephen
Re: Problem with host software and ardunio
November 12, 2009 10:06PM
Ok. I'll try get it all up and running this weekend.
Re: Problem with host software and ardunio
November 12, 2009 10:12PM
Also, I don't have an optoswitch for each axis yet. With my old set up and old firmware my reprap worked fine without the switches. I just couldn't home each axis.
Re: Problem with host software and ardunio
November 12, 2009 11:57PM
I thought I would get this to you before I forgot. I still don't have it working perfectly but I thought I would give you this to make it easier to help me get it working.

// v1.9 tested on the following environment

// PC Setup
// OPERATING SYSTEM Windows XP, Arduino v17 compiler,
// Reprap Newest software (global.FiveD=false,extruder0.extruder speed 255)

// Electronics
// Arduino Diecimila,v1.2 Stepper drivers,Homemade Temperature sensor,push button instead of Opto enstop,v1.1 PWM Drier,v1.1 DC Motor driver

// Extruder
// Homemade extruder with DC motor

// Firmware changes
// Parameter changes - #define INVERT_X_DIR X, #define USE_THERMISTOR, #define ENDSTOPS_INVERTING X, EXTRUDER_FORWARD false, EXTRUDER_REVERSE true

// Pin changes
// Moved some pins to make it easier to wire up
Re: Problem with host software and ardunio
November 13, 2009 06:57PM
Thanks for that.

I just had another thought. You have put the direction lead into the arduino?
Because if not it will be always low and keep going in the same direction.

The way to test this is to get hold of the test software on the how to build it page
set the pins to be on your arduino and then make sure the steper goes in both directions
with your current wireing.

regards

Stephen
Re: Problem with host software and ardunio
November 13, 2009 07:15PM
I'll keep you updated...
Re: Problem with host software and ardunio
November 15, 2009 09:29AM
EVERYTHING WORKS!!!!! I accidentally switched the wrong parameter in the parameters.h file. Everything works perfectly. Thanks for all of your help getting me through this.
Re: Problem with host software and ardunio
November 15, 2009 06:50PM
>Thanks for all of your help getting me through this.
Grin. Your welcome. Good feeling isn't it?

Now comes the fun bit.....
Calibrating

Tell me how you go because I still have not got past the spagetti stage.
Everything works fine but I can't work out what each parameter does.

Incidentally I gave up on the reprap host software for anything more
than debuging and testing axis/extruder.

I am attempting skeinforge and getting a much better quality of spagetti.

regards

Stephen

Ps.
Feed rate is how fast the extruder moves
Flowrate is how fast the extruder motor extrudes.
Re: Problem with host software and ardunio
November 16, 2009 07:55AM
I'm going to do one better:

I've attatched the .pde files that worked with my set up. Also, I didn't relize but when I gave you that sheet with what kind of electronics I'm using. I accadently put the wrong arduino. It's arudino duemilinove.

P.S. I'm new to windows (I'm a mac guy) so I don't know how make zip files so I've just attached the "real" files. I hope it works.
Attachments:
open | download - extruder.h (1.7 KB)
open | download - extruder.pde (13 KB)
open | download - GCode_Interpreter.pde (2.6 KB)
open | download - parameters.h (3.8 KB)
open | download - pins.h (2.7 KB)
open | download - process_string.pde (14 KB)
open | download - stepper_control.pde (11 KB)
open | download - ThermistorTable.h (1.2 KB)
Re: Problem with host software and ardunio
November 16, 2009 09:32AM
Check www.unlocklertool.com it will delete anything.
Re: Problem with host software and ardunio
November 21, 2009 12:33PM
Stephen,

I'm working on a mcwire repstrap with Gen2 electronics and the Arduino. Thanks for this modification.

Quick question, on the pins.h file, under the arduino section.

#define EXTRUDER_0_TEMPERATURE_PIN (byte) 0 // Analogue input

isn't pin 0 used by the arduino to communicate with the USB port? Shouldn't it be pin 14 instead? Am I missing something?

thanks...

Luis Freeman
Re: Problem with host software and ardunio
November 21, 2009 12:37PM
The analog pins are in a different catagory so the zero doesn't refer to the physical pin number.
Sorry, only registered users may post in this forum.

Click here to login