DiyouPCB – Installing the software
Installing the tools
Attention: Do not connect to the printer the external power supply yet. In this step, you will only upload the firmware on the Arduino and you can do it just powering the Arduino through the USB cable.
To calibrate and use the printer you will need the following tools:
Software Tools |
|
The Arduino Development Environment |
|
Arduino firmware uploader |
|
Terminal emulator to connect with the printer (opcional) |
|
Graphical programming environment based on Java |
|
Graphical library for Processing. |
We recommend you to create a directory called DiyouPCB (wherever you want on your hard disk, for example in C: \Users\MyUser\DiyouPCB) that we'll be used to centralize all the printer software. We will reference it in the rest of this tutorial as the DiyouPCB directory.
Arduino IDE
The Arduino IDE will allow you to modify and compile the firmware source code. Please, follow the instructions on Arduino's web page to install it. By default it is installed in C:\Program Files\Arduino.
Xloader
Xloader is a small utility that allows you to upload the firmware on the Arduino. Download the file XloaderV1.0.zip from the web page and install it in C: \Users\MyUser\DiyouPCB\XLoader.
Putty
It is a terminal emulator that allows you to communicate with the printer during the calibration tests. You can also use the emulator included in the Arduino IDE (menu Tools- >Monitor Serial).
Download it from its web page and install it for example in C: \Users\MyUser\Putty\DiyouPCB.
Processing
It is a programming environment based on Java very easy to use and very powerful graphically. We used it to developed DiyouPCBRun: the software that runs on the PC to operate the printer.
Download Processing V2.0 and install it for example in C:\Users\MyUser\DiyouPCB\Processing.
ControlIP5
It is a set of libraries for graphics processing. It must be downloaded from their web page version 2.0.4 or higher that is compatible with Processing V2.0 and install it in the directory where Processing searches the sketches. To configure the directory you have to start processing and change the field Sketchbook Location at File- >Preferences to C:\Users\MyUser\DiyouPCB\Sketchbook.
Create a directory called libraries in C:\Users\MyUser\DiyouPCB\sketchbook where you will install ControlIP5. Follow the instructions from ControlIP5 web page.
Installing the software
Once you have downloaded the tools you need to download the software itself: DiyouPCBFirm and DiyouPCBRun from the downloads page.
Install DiyouPCBRun in the directory C:\Users\MyUser\DiyouPCB\Sketchbook. There is where Processing will find it. The installation process will also create a directory called PCBFiles with some files examples.
DiyouPCBFirm is the printer's firmware. Wil be installed in C:\Users\Myuser\DiyouPCB\DiyouPCBFirmV1_0.
Uploading the firmware
Attention: Do not connect the external power supply yet, because stepper motors can start to run and we still do not have uploaded the firmware.
Upload it is very simple. First connect the Arduino to the USB port on your Windows computer.
Then we need to find out the COM port that Windows has assigned to it. There are several ways to do this but the easiest is using the Arduino IDE.
Open it and on the Tools Menu->Card select Arduino UNO (if it is not already selected). Then in Tools- >Serial Port, you will see the COM port that is connected to the Arduino and in Tools->Serial Monitor you can connect with it. If the port does not appear a trick is to unplug the USB cable from the computer and plug it back in.
Once found out the COM port, exit from the Arduino IDE (otherwise the COM port won't be released) and open Xloader.
Configure the Xloader window
- In the Hex File field select C:\Users\MyUser\DiyouPCB\DiyouPCBFirmV1-0 \DiyouPCBFirm.hex
- In the field Device select: Uno(ATmega328)
- COM port is the port where the Arduino is connected.
- 115200 baud rate.
And finally, click the Upload button.
After clicking upload, you'll see the Arduino's RX/TX lights going wild. The upload process generally takes about a few seconds to finish. Once completed, a message will appear in the bottom left corner of XLoader telling you how many bytes were uploaded. If there was an error, it would show instead of the total bytes uploaded.
Then you will have the Arduino ready to go.
Compiling the firmware
Attention: it's only necessary to compile the firmware if you modified the firmware's code or any parameter of the configuration file.
To compile the code you have to use the Arduino IDE because it incorporates avrgcc: the C compiler that uses the Atmega328 which is the microprocessor of the Arduino.
Before use the compiler you have to modify the path environment variable of Windows.
Edit it and add at the end: C:\Program Files\Arduino\hardware\tools\avr\bin;C:\Program Files\Arduino\hardware\tools\avr\avr\bin;C:\Program Files\Arduino\hardware\tools\avr\utils\bin.
Take care do not delete the rest of text strings, simply add the new ones at the end, after a semicolon.
Then open a command window (by clicking on Run from the Windows menu. Then in the field "Open" type "cmd" and return.
When the DOS black window will open type:
CD C:\Users\MyUser\DiyouPCB\DiyouPCBFirmV1_0
Make clean
Make DiyouPCBFirm.hex
Then it will appear somewhat similar to the following:
Don't worry about the warning messages; they are normal.
If everything went well you will have created (or updated) the file DiyouPCBFirm.hex and then you can upload it to the Arduino with Xloader.
Configuring Putty
With Putty you can connect to the printer and run commands manually. It is very useful during the testing and calibration process.
Open the application Puttytel.exe from the directory where you have installed it. Then configure the tool, as shown below.
First configure the terminal tab.
Then set up the Arduino COM port of and the speed (115200) on the tab Session.
You can save the configuration by cliking on Default Setting button and then Save.
Finally press the Open button to connect with the Arduino. The following window will be opened:
These messages will tell you that you have successfully connected to the printer.
Then you can manually type commands. For more information about the printer commands go to the calibration section.
Connecting with DiyouPCBRun
Once uou have connected with putty, you can try to run DiyouPCBRun which is the program that will allow you to print PCB's.
Before you use it we have to make sure that no other program (Putty, Xloader, etc. ) is using the Arduino COM port. Then run Processing.
You will see a window similar to this.
In the tab menu: File->Sketchbook open the file DiyouPCBRun. A window will appear with the sketch source code.
To run the sketch, kust press the button: in the upper left corner. In a few seconds the application window will appear.
To connect to the printer first you have to select the Arduino COM port and then click the Connect button.
In the lower window you will see a message indicating that you are connected.
For more information on how to use this application go to the section: how to use the printer.
You have the software installed. Next step is to calibrate the printer.