Welcome! Log In Create A New Profile

Advanced

Modifying Firmware for different printing methods

Posted by piscosour00 
Modifying Firmware for different printing methods
September 01, 2014 02:36PM
Hi everyone,

I am a beginner with building 3D printers. I have just completed building a Mini Kossel delta printer as well as an Ultimaker. I am using RAMPS 1.4 boards on Arduino Mega 256. For both, instead of using an extrusion system, I am using a valve that pushes out pressurized material controlled by the microcontroller. The valve is pre-programmed. All it needs is 5 volts to open and it does its thing.

I have been tinkering with the Marlin firmware to control both my printers, and have decided to use it for the time being. I have been studying the code to try and decide how best to modify it to use my desired printing method. I made a very crude change to the code (namely to the get_coordinates() function in the Marlin_main.cpp file) in the hopes of manipulating the G-code instructions sent to my printer to work for my valve. Basically, since I do not use the E-axis commands, I programmed my printers to respond to an E by just sending 5 volts to my valve to open and close if the next line in the G-code does not include an E.

It sort of works. However, after homing, the gantry starts moving to the first point in space where it should start pushing out material, but material starts coming out even before it makes it there. I believe this is happening because the printer sees the command from the g-code before its able to execute it.

My next approach is to look for the command queue. If I can find it, it should just mean setting the pin to HIGH when the command is at the front of the queue and is being processed, and setting the pin to LOW at the end of the command.

If anyone has done something similar before, I'm all ears.

Also, in reading another post on this subforum, I wondered if also changing the pin set by default to control the E0 (E0_ENABLE_PIN) to the pin that is connected to my valve? Would the other pins normally associated with E0 control (i.e. E0_STEP_PIN, E0_DIR_PIN), be better candidates?

Thanks,

Edited 1 time(s). Last edit at 09/01/2014 05:09PM by piscosour00.
Re: Modifying Firmware for different printing methods
September 02, 2014 05:21AM
Step sends out pulses, only (one for each step), so no steady signal there. Dir changes with, well, direction. The advantage of Dir is, it's likely set at exactly the place where you should open your valve. It isn't un-set at the end of a move, though, because as long as there are no stepper pulses, Dir doesn't matter.


Generation 7 Electronics Teacup Firmware RepRap DIY
     
Re: Modifying Firmware for different printing methods
October 08, 2014 05:36PM
Try adding st_synchronize() before you open the valve. This will have the printer complete all buffered moves before continueing.
Sorry, only registered users may post in this forum.

Click here to login