We are the MAKERS

Fab Academy 2017

Output Devices


Luckely, in our FabLab Kamp-Lintfort we have a wide choice of available output devices. Because this will be my first experience, I decided to start with something simple, to get used to the process.

To combine this weekly assigment with my final project, the aim of this week is to control the Ultrasonic Atomizer, which is a basically a 24V DC Motor

I started with designing the board! I took as a reference the satshakit from Daniele Ingrassia.

satshakit is a 100% Arduino IDE and libraries compatible, fabbable and open source board, and also an improved version of Fabkit.

Main improvements and features over Fabkit are:

My bible and #1 guide for this assigment was the ATmega328p pinout

The most important component which I wanted to integrate in my board is the ULN2003A , which is an array of seven NPN Darlington transistors capable of 500 mA, 50 V output

The software which I will be using for the board design is

EAGLE (Easily Applicable Graphical Layout Editor) is a flexible and expandable EDA schematic capture, PCB layout, autorouter and CAM program. EAGLE is popular among hobbyists because of its freeware license and rich availability of component libraries on the web.

Eagle has two windows that are used simultaneously to design a board:

After I installed EAGLE, the first thing which I want to do is Create a New Schematic. A schematic in electronics is a drawing representing a circuit. It uses symbols to represent real-world electronic components. The most basic symbol is a simple conductor (traces), shown simply as a line. If wires connect in a diagram, they are shown with a dot at the intersection.

In order to place my components on the schematics, I have to download and use special Libraries. Eagle has a lot of built in libraries of components that we can use. The fab network also maintains a library which is constantly updated:


In order to install the library, in the EAGLE environment, go to the top toolbar and select the Library menu. Then select use and open the .lbr file that I just downloaded.

Now I can go to Add component and selecting the library, I choose the component which I want to place.

Here is the list of components that I used:

This is how the final schematics looks:

The board layout after I routed all the connections:

When I double check everything, I can Export my file as a .png picture.

In the appearing window, I increase the resolution to 1500 dpi, click on monochrome, and select window mode.

To edit the .png image, I will be using I open my image in GIMP, and using the rectangular select tool, I select the image leaving some space from all the sides. After I press File and Copy the selected area. To continue working with the selected picture, I click again on File, and Create from the Clipboard

More detailed procedures can be found in my previous documentation Electronics Design week!

At the output I have two .png files which I called inside_cut.png and the outside_cut.png.


Now I can proceed to the CNC milling machine. So, again I used FabModules to convert the .PNG files into Gcodes for the Roland machine.

Let’s start to work with the Fab Modules. When I introduce the ip adress into the browser window, the first interface that will appear is:

After I press on th gray button input format, a new menu should appear with the option to load the .PNG image. Here I upload the first image, which is the inside engraving. After doing that, the preview of the image will appear in the Fab Modules and also other fields and other parameters will show up

On the right side of the window, we have many input parameters. In order to be able to move the machine, we have to input the following parameters:

    mod_lp.py /dev/usb/lp0     into the send command field

    hostname_of_your_machine     into the server field (just the address without http or /)

In order to move the machine I just enter in the respective fields the x, y and z position coordinates. Before moving the machine I have to make sure that the zjog parameter is always set to 0, even if it will change automatically. To move the machine I have to press the move to xyz0 button.

* A small life hack while adjusting the z0 axis, is to use the multimeter and check if there is connection between the tool and the surface.

The tool for engraving the PCB is suggested to use diameter from 0.2 mm and below, while for cutting we can use a 1 mm tool.

And the result was really great! This is my final PCB Board:



While preceeding to the programming of the board, I noticed a little mistake. I was planning to use the SPI connection for communicating with the board, but I forgot to design the connection for the SCK pin. In my design I placed a LED to see when the data is transmited, but I forgot to assign it a phisical pinheader.

In order to fix it without milling another board, I decided to make a small hole on the trace, and solder the pin directly.

Honestly, I came up with the solution a little bit late. At first I panicked because of the time pressure, and used just a wire holding it directly to the processor pin while programming :D    This was really funny!!!

I connect my arduino board to the USB hub, in the tools menu select the right board (Arduino Uno/Genuino) and the port, after go to File--> examplesand open the Arduino as ISP sketch. Upload the code.

After I see done uploading, which means that the code is uploaded to the board, I disconnect the arduino from the PC. The next step is to connect my PCB board to Arduino using some wires. The connection scheme is this one:

I connect the arduino board to the USB hub. Under Tools select the right board, select Arduino as ISP programmer, double check the parameters, and press the Burn Bootloader button.

And I see Done Uploading! Good sign) To test the board, I upload the Blink example.


I planned to use the FTDI cable, since I designed the connection in advance, but again I faced a mistake! The problem is that I forgot to place a 100nF capacitor in series between the RST of the microcontroller and the RST pin.

So I was not able to use the FTDI cable((( Instead, I programmed it using the SPI connection!

And its blinking!!!

When I see that the board is working, I will connect a DC motor! I used the following sckematics to connect the motor to the ULN2003 driver, as well as aditional power supply (9V battery)

I used the same blink code with 5 seconds delay to test the connections!

So lets go further! Now I would like to control the speed of the DC motor. To make it more interesting, I want to control the speed using the serial monitor.

I found an open source code from Adafruit about controling DC motors, and here is my code:

int motorPin = 10;
void setup() 
  pinMode(motorPin, OUTPUT);
  while (! Serial);
  Serial.println("Speed 0 to 255");
void loop() 
  if (Serial.available())
    int speed = Serial.parseInt();
    if (speed >= 0 && speed <= 255)
      analogWrite(motorPin, speed);

The ULN2003 acts like a switch, controlling the power to the motor, Arduino pin 10 is used to turn the ULN2003 driver on and off and is given the name 'motorPin' in the sketch.

In the 'loop' function, the command Serial.parseInt is used to read the number entered as text in the Serial Monitor and convert it into an 'int'. I could type any number here, so the 'if' statement on the next line only does an analog write with this number if the number is between 0 and 255.

Proof video:

And now I want to test the Ultrasonic Atomizer. It is actually the same DC motor, but uses 24V. That is why I had to use a bench power supply. The connections are the same!

Here I do not need to control the amount of fog, only the working time matters, that is why I control it only HIGH or LOW

Looks nice, isn't it?)

Download Files:

Eagle schematics (.sch)

Eagle board layout (.brd)

Inside Cut (.png)

Outside Cut (.png)

© 2017 Albot Dima . All rights reserved | Albot.Dumitru@hsrw.org

Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.