All right, so I’ve got it to move in one direction while it prints. Now I need it to go back to where it started, while at the same time;
- Taking control of the belt drive stepper (from now on the X axis)
- Telling the computer (my laptop) that the printer is busy
- Telling the printer a new piece of paper has been fed
- Starting the powder roller motor
- Raising the supply bin
- Lowering the build bin
- Moving the roller across the bins (to spread the powder)
- Stopping the powder roller motor
- Giving the printer back control of the X axis
- Telling the computer (my laptop) that the printer is ready for the next page
- Then it needs to wait while the printer does its thing and repeat at the appropriate time, as many times as necessary.
To that end I’m using a 3 axis CNC setup to run the show. Without going into a full explanation of CNC, I’ll just say that the software allows you to use the computers parallel port to send the step and direction signals to the stepper drivers. It also allows several configurable outputs and inputs that can be used to activate relays and transistors or to monitor switches and sensors. A relatively simple list of commands (g-code) tells the software what to do.
So basically this is what happens;
- I use one of the outputs to switch the step input to the X axis from the encoder to the computer. This puts the computer in control of the X axis. I used some switching transistors but probably could have used a simple SPDT relay.
- Another of the outputs is used to activate a relay that breaks the circuit on pin #11 of the parallel port of the inkjet printer. (I don’t know how this is done on a USB connection) This tells the printing computer (my laptop) that the printer is busy so it won’t try to print.
- I had used yet another output to supply power to an opto-interrupter that I placed over top of the paper sensor on the printer. The idea was that by turning the sensor on and off, I could simulate a paper present/not present state. It worked, for a while, but stopped when the sensor apparently burned out. Now I have a “flag” on a small rod that the printer literally backs into as it reaches the end of the page, telling it that the paper is out. As the axis moves forward again it pulls away from the flag and thinks the next page has been loaded.
- I use the “spindle on” output to trip a relay and power the powder roller.
- The bins are the Y and Z axis. I use incremental mode to move the floors of the bins by the thickness of the slices. The supply bin has to move twice the distance because it’s half the volume. I will install limit switches to stop the machine if one them goes to its limit.
- I use the command to “Home” the X axis. I have an optical sensor at the starting position. The home command moves the stepper in the direction and speed specified until the sensor is tripped then backs off until it is not. This gives very accurate placement of the axis. While it is moving, the roller is pushing a new layer of powder across the build chamber.
- Next the powder roller is stopped.
- The relay for the X axis step signal is switched back to the encoder (giving the printer control of the stepper).
- The relay breaking connection on pin#11 is switched off so the laptop thinks the printer is ready for the next page and starts printing again.
- Lastly, while the printer is printing, the software waits for a “handshake”. There is an input in TurboCNC that can be configured for a PLC handshake. One of the commands allows the software to pause and wait for the input to change state (high or low). I have a trip switch at the back of the X axis that the printer activates when it reaches the back of the supply bin. When this switch is tripped the software goes back to step 1
There are also subroutines to prep the printer/bins for the first page and to input the number and thickness of layers. I also have a countdown displayed so I know how many layers are left.
It’s probably not the most elegant solution (It certainly isn’t the most compact), as it requires at least 2 computers and monitors. But as I said earlier, I was already familiar with CNC and didn’t want to learn how to build and program a PIC. Also, I already had the old computer and monitor (are you sensing a theme?).
At this point I had not yet installed the bins. I placed a stack of paper under the printer and tested the repeat registration by printing multiple copies of the windows teat page. The printer returned reliably to the same starting position and the multiple prints all lined up perfectly.
Next up, the powder bins.