Welcome! Log In Create A New Profile

Advanced

Arduino with Gen 6 board

Posted by Javaid Butt 
Arduino with Gen 6 board
August 22, 2011 04:40PM
Hi,

I am working on a 3D printer (Mendel) having a Generation 6 electronics board. The printer has been assembled but I want to incorporate a powder dispenser to the printer and print using it. I have connected Arduino with Gen 6 and can communicate via I2C.

Now, the dispenser needs 1 digital and 1 analogue signal to run. The digital signal has (as you all know) two states i.e., 0 and 1.
I need help in sending a signal from the Gen 6 board to the Arduino to turn the dispenser ON and OFF. So when there is 1 on the output, the dispenser is dispensing and when there is 0, it is not.

Any suggestions !!!
Re: Arduino with Gen 6 board
August 22, 2011 05:04PM
Is it possible to send a signal when the motor of the extruder starts or something, any signal that can be used to turn the dispenser ON and OFF confused smiley
VDX
Re: Arduino with Gen 6 board
August 23, 2011 03:59AM
... you can change the firmware in the g-code-parser - look where the codes "M101" (=extruder ON) and "M103" (=extruder OFF) are parsed. Here you can add specific code to set a digital output to HIGH or LOW.


Viktor
--------
Aufruf zum Projekt "Müll-freie Meere" - [reprap.org]
Call for the project "garbage-free seas" - [reprap.org]
Re: Arduino with Gen 6 board
August 23, 2011 09:27AM
This is what I have found in the "process_g_code" file and as you can see, it is all commented out. And also case 103 hasn't been defined after "//turn extruder off." Case 104 is not commented out.

............
// Now, with E codes, there is no longer any idea of turning the extruder on or off.
// (But see valve on/off below.)

/*
			//turn extruder on, forward
			case 101:
				ex[extruder_in_use]->setDirection(1);
				ex[extruder_in_use]->setSpeed(extruder_speed);
				break;

			//turn extruder on, reverse
			case 102:
				ex[extruder_in_use]->setDirection(0);
				ex[extruder_in_use]->setSpeed(extruder_speed);
				break;

			//turn extruder off

*/
			//custom code for temperature control
			case 104:
				if (gc.seen & GCODE_S)
				{
					ex[extruder_in_use]->setTemperature((int)gc.S);
				}
				break;
.............
Will you please help me out here as I have just started working on this confused smiley

Edited 2 time(s). Last edit at 08/23/2011 11:18AM by Javaid Butt.
Re: Arduino with Gen 6 board
August 23, 2011 11:26AM
Here is the code that I am using in case you want to have a look.

FiveD_GCode_Interpreter_With_i2c_and_M117.zip
Re: Arduino with Gen 6 board
August 23, 2011 05:30PM
The 5D code that I have attached does not use M101 and M103 to turn the motor ON and OFF (maybe, that is why they have been commented out).

Someone suggested to look for when E is at zero, and when e is greater than zero. I found this in the cartesian_dda.pde file from line 275-291. If this is correct, will you please guide me through this!!! I have just started working on the programming aspect.
if (e_can_step)
		{
			dda_counter.e += delta_steps.e;
			
			if (dda_counter.e > 0)
			{
                                
				do_e_step();
                                real_move = true;
				dda_counter.e -= total_steps;
				
				if (e_direction)
					current_steps.e++;
				else
					current_steps.e--;
			}
		}

And for when e is at 0. Line 33 in the cartesian_dda.pde file.
// Default to the origin and not going anywhere
  
	target_position.x = 0.0;
	target_position.y = 0.0;
	target_position.z = 0.0;
	target_position.e = 0.0;
        target_position.f = SLOW_XY_FEEDRATE;

Edited 1 time(s). Last edit at 08/23/2011 07:19PM by Javaid Butt.
Sorry, only registered users may post in this forum.

Click here to login