Rolando Maroño Vazquez
Week 16: Interfaces

For the interfaces assignment I decided to use the interface I must design for my final project which is a DLP printer. The interface I needed to create is the projection of slices of my model while I control the time of the projection and I also control the movement of a stepper motor that goes up while I control the distance it moves.

Foir this assignment I decided to use the Processing software. In this software I can create easily an interface.  The interface in this case is the change of the projection of the slice while automatically the motor moves.

First we downloaded the software and started doing the tutorials to be familiarized with the work space and the language. I thought it was going to be easy.

So I typed the example codes of the first lessons. The language is based in java. Is very easy to use.

I played with it for a while. Then I thought that there were two main activities that our program must do, the first is project the images with a 3 seconds delay, the second thing is two control de motor because after every snapshot must move .75 mm up. I decided to do both things apart first.

The image above shows the code that we needed to project the image. You can store all of the image in one folder, then the software has a counter, with this counter it will change every photo automatically until it ran out of photos. When he is done, the printing will be finished. The code needs to every slice be store in a file with the program, in the software you give the command img=loadImage("p1luis0152.png"); after this, you only have to give a command to add a number and search the netc image, this means that if you look for p1luis0152 you will add and then you will look for p1luis0153, etc.

The image above shows the projection of one image, this was only a test. This was a static image, only one, but it worked. The the code was improved to show a sucession of images.

The next part was the arduino part.

This was the circuit we made to test the coneection. It's a photoresistor to sense light, connected to an analogic input from the arduino. We used a bought arduino because this was quicker. The whole test programming was made in less than 20 minutes.

This was the code that we used to connect the arduino to processing. This gets whatever the arduino is sending by serial port. The value sent will be converted in a color that will be displayed in a square. The hardest part was to make processing get the data from the right COM. At the end I fixed the code with a little add on (Serial.list()[2])

The arduino code was a really simple one, it only read the analog pin, divided into 4 and send it via serial.

This is the square that will change the colour.

After that we were ready to program the software that will control the projection and the movement for the stepper motor. Below we can see the code that was developed in processing exclusively for this project.

The code is very simple. first search in the same folder in which the processing program is caontained for the images in which you specify its name in the program. Then it will sort each one going one by one, the program also first eliminates two 0s that added before the number of id of the picture, this numbers are provided by the Creation Workshop software which is the one that does the slices. After that the motor moves .75 mm.

Other part of the program is that the image will be printed out in the projector area.

Above we have the arduino code, this is made to work with the processing code shown above. We can say that the processing code controls the coordination between the projection images; the processing send the first image, then wait 3 seconds, then send the signal to the arduino to move, but it is in the arduino code in which we send the signal to control de driver and move the stepper motor the steps needed to go up the distance of .75 mm

For the electronics I show the other boards that were made, one was the driver which was also used in the fabuluous CNC tufting machine and my programmer that was due in the week 6 assignment.

The image above shows the smd driver that was used in the DLP printer. This driver works as a gestalt node sort of circuit, and is connected to a micro controller with an I2C protocol, with this protocol the micro controller works as a master and the driver and the limit switches board works as slaves, providing of signals and information to the micro controller and the micro controller taking the decisions to move the adeuate parts of the machine. With this driver we can hold one stepper motor.

The image above shows my micro controller that I baptised as a Roluino. This Roluino is the master mind behind the DLP printer. With this micro controller I upload the program developed in arduino and I can move the machine as is expected.

Above we have a video of the machine working with the processing projecting the slice and motor moving.

You can download the softwares from here.

Arduino program ino

Processing

Stepper library