# KS0552 Keyestudio Writing Machine for Arduino DIY This is a CoreXY writing machine. It is compatible with distinct styles fonts like hollow font, filled font and monoline fonts. A customized special signature is not a dreamy reverie for you. In addition, it can draw and outline sleek and beautiful lines. With this amazing machine, you can create art works yourself. # Read me frist **Download the Code and library from the link: ** # 1. Features 1. coreXY parallel motion 2. Simple and stable structure 3. Highly precise rail is used, well-performed writing and drawing 4. Simple control software # 2. Parameters | Power supply | | | ------------ | ---- | | Voltage | 12V | | Current | 4A | | Power | 48W | **Control Board** Control Chip: Mega328P Input Voltage: 12V ![](media/a5f758376d2fdc636e7739d3fb02fa6c.png) Dimension: 297 * 210 ![](media/070824d73f1bf86564af7e7628086454.png) # 3. Preparation ## 3.1 Installation | Step 1 | | | --------------------------------------- | ------------------------------------------------------------ | | Components Required | ![](installation/media/91cd1fb63fc56436be7ba6554e9c2971.png) | | Dismantle two screws | ![](installation/media/0096aa27476bb6be51dd3d7b7524b164.png) | | As shown: | ![](installation/media/f6dfa732b9ccee8efa134b95c256eaec.png) | | Insert polish rods into the bearing | ![](installation/media/38859161b297d6930896dae58f2a3d8b.png) | | | ![](installation/media/e0c433fc33e0b155946fcb5c3397891c.png) | | Assemble the dismantled component again | ![](installation/media/50d2719ccafda5b729823f3e8cb95e4e.png) | | | ![](installation/media/ae88db2f3bd8e114c8e66bf1bee5914b.png) | | Synchronous Belt | | | ------------------------------------------------------------ | ------------------------------------------------------------ | | GT2 | ![](installation/media/8f6e02cc41103193d569774e88638bd0.png) | | Loosen two clap plates | ![](installation/media/a7fe67c789278234a0012f4f98cae0e6.jpeg) | | Make a synchronous belt
go through the right clap plate
and fix them together | ![](installation/media/f7fe14210d4828a52e4e7c19a4e246eb.jpeg) | | make it go through the
synchronous wheel | ![](installation/media/5ef82929fff0e92244e925dee7c19554.jpeg) | | Hang the synchronous belt
on the synchronous wheel
of right motor | ![](installation/media/150f11cff681659581e64da18110a874.jpeg) | | | ![](installation/media/c3655f1d6fb229c4187740b9ffaa7dad.jpeg) | | make the belt clamber
onto the right wheel | ![](installation/media/b3b98030e678fc78e5846c5b7eada2a2.jpeg) | | hang on the upper one | ![](installation/media/29c1527252e8df21bd1173abdae7db71.jpeg) | | clamber on the left one | ![](installation/media/292dd389823cb38abb9beec361d23262.jpeg) | | Go through the left driving
wheel of the left motor | ![](installation/media/906cb0e18a5cc30b8331042fdadb8d15.jpeg) | | pass through the lower left
synchronization wheel | ![](installation/media/70cf1d3f03af3936bdd44246c154c85d.jpeg) | | pass through the clap plate
with the the other end of
synchronous belt and
lock it tightly | ![](installation/media/2117d1ab11e13b59071470cac4d446bb.jpeg) | | Wiring up | | | ------------------------------------------------------------ | ------------------------------------------------------------ | | Left motor | ![wu1](./installation/media/wu1.JPG)![wu2](./installation/media/wu2.JPG) | | Wire up the left motor | ![wu4](./installation/media/wu4.JPG)![](./installation/media/wu3.JPG) | | You need to interface the servo with the control board using extension Dupont wires | ![](installation/media/3e93fd0b1e7f7f3423226eb751275829.jpeg)![](installation/media/ed0c3f45192e168efbfdb3c9dc718356.jpeg) | | Adjust the servo to initial angle | | | ------------------------------------------------------------ | ------------------------------------------------------------ | | Pull the pen holder out | ![](installation/media/423f05207c7e62afb43b32484550f7e1.jpeg) | | Rotate the servo anticlockwise
until it stuck
(the state that rotation
is restricted) | ![](installation/media/dbf7633638315bf6a56b89777a2c10c7.jpeg) | | fix the pen holder onto
the sliding trail | ![](installation/media/23f199e5fded4c0552eca274f6612723.jpeg) | | Hold a pen | | | ------------------------------------------ | ------------------------------------------------------------ | | Rotate the knob anticlockwise | ![](installation/media/7992390e99b50f7750ba379923c834c9.jpeg) | | Put a pen and adjust it at a proper height | ![](installation/media/94955c8e2ff02d7bf5a1ba54b37cfe3a.jpeg) | | lock it tightly | ![](installation/media/a6f41935ae9a38a65bd02bd68d38ea82.jpeg) | ## 3.2 Install Arduino IDE and burn firmware Browse the file ![](media/2073af28c187714035196e0de350befc.png) ## (1). Install Inkscape and Gcode Inkscape aims at generating Gcode that can be identified by the machine. They are included in the folder we provide, as shown below; ![](media/8dd3a14426106d111dfc5ff1e8258351.png) Double-click inkscape-1.1.2_2022-02-05_b8e25be833-x64.msi to install and you will see ![](media/122dcd65dede887b9c924ba24e9b4346.png) on the desktop ## (2). Add extension package Double-click Inkscape and click **Time to Draw** then **New Document**. ![](media/a88ea47afa88bf6e0a590c331b0eaa4f.png) ![](media/8d4aaf4c91d2c35a5ca16a5c74ca66a9.png) Copy all files of the extension package **inkscape_extension**. ![](media/0e241ef4042ea5edc73cdd38747019ef.png) Click **Edit** and **Preferences** ![](media/bf0d2932e80eab3d362c8e51394bde6f.png) Click **System** and open **User extensions** ![](media/4ec683ee0dbb9145ab2d2cc86a4252f0.png) Then all files of the extension package to the following directory ![](media/e48a8c7ba63c42b54c445f4be8d13f33.png) Check if the extension package is well installed ## (3). Turn off inkscape and reboot it Click **Extensions**,then you will view keyestudio drawing and KM-LASER. That means successful installation. ![](media/b2e5abbdd5bfdadb84c5d4c4c6213d7d.png) ## 3.3 Install Universal Gcode Sender Universal Gcode Sender is designed to enable the movement of the machine through hand and command control as well as send **Gcode** You can download installation package:[http://winder.github.io/ugs_website/download/](http://winder.github.io/ugs_website/download/). Also, we provide it in the folder. ![](media/7c70bff8c6b93204e03870f361507107.png) ## (1). Unzip software package Copy ugs-platform-app-win.zi to D:\\Program Files ![](media/b51a598345c680a4942a408b96427cef.png) ## (2). Open the software Open the bin folder from the unzipped folder. D:\\Program Files\\ugs-platform-app-win\\ugsplatform-win\\bin If your computer is 64-bit, double-click ugsplatform64.exe ![](media/c35f887c432b979cb9311e10c3baab97.png) Click ugsplatform64.exe then right-click Create shortcut to generate a shortcut key, as shown below; ![](media/2f67ca66792cf3b551a60cc14c919c2e.png) ![](media/0803d7328e60d0cdb1215edd2e9ae819.png) Then copy it to your desktop. ![](media/adfd71d10898bdfd415fbb0f30945895.png) # 4. Modify firmware parameters ## 4.1 Wire up a power supply with USB cables ![](media/54815f9a0a3a3a597d217858e953a6c1.png) ## 4.2 Connect the machine to the Universal Gcode Sender Wire up in accordance to the following figure ![](media/8c25fa56a8248b1c47757065eb639e21.png) The LED on the control board will flash after the board is well connected. And Universal Gcode Sender will show as follows; ![](media/fc9f73debe49fa710b4d43a1c9399a1d.png) ## 4.3 Control the machine to move Power up, keep moving parts not too close in that collision will occur during movement. ![](media/f979f6c0bf3c983fb22332bf8c8be43c.png) Set steps of X and Y axis,click direction keys. Normally,the machine will move at X and Y axis. Step size XY stands for movement distance while clicking a key Feed rate is speed ![](media/bcc0b40c6d887a29f41192f4b190c2d8.png) ## 4.4 Set motion parameter | **steps of rotation** | **200** | | --------------------- | ------- | | **belt pulley** | **20** | | **GT2 belt** | **2mm** | Through calculation, 80 steps is needed when the x and y axis of the machine moves 1mm, the following formula is shown below: x_steps_per_mm = y_steps_per_mm =![51c3bb36a1411b4594ed2f5715666b29](media/09103594a6893ad13258bb416d9860aa.png) **Parameters description in the formula** Steps = Steps of the stepper motor(the step of the 1.8 degree motor is 200) Microstepping = driver configuration of the stepper motor (RAMPS is default as 1/16 etc.) BeltPitch = teeth pitch of synchronous belt (T5 is 5.00mm , XL is 5.08mm , GT2 is 2.0mm etc.) We use GT2 PulleyTeeth =2o tooth **Finally, substitute the parameters into the formula** $$ x_steps_per_mm = y_steps_per_mm =200*16 / (2*20) = 80 $$ Parameter \$100 and \$101. We decide how many steps the machine move 1 mm. need to set \$100=80, \$101=80 If above two parameters differ from real parameters of the machine, the size of newly produced pictures will be not as same as the defined pictures ## 4.5 Setting method Click **Console**,a command box will appear, as shown below; ![](media/573532892a7c5cce5d6f88006644a5e4.png) Input \$\$ and click **Enter**,then you can click all parameters of the firmware. ![](media/d139fc03595e18f7df974920caad9547.png) Set \$100=80, \$101=80, then you need to input \$100=80 + Enter and \$101=80 + Enter ![](media/fb2dd65fa9701dc9a2d7b84d2fffaca1.png)![](media/62c96b51a7ed14ba2da0229ec5c01bc4.png) ## 4.6 Adjust the distance between the writing head and the paper | Control command | | | --------------- | --------------------------------------------------------- | | Write | M3 S50 (0\~90correspond to the rotation angle of 0\~180) | | Hold the pen | M5 S0 | Put an A4 paper under the machine ![](media/390874b0ce1d7be232cfb77bd6e131c6.png) Send a command to control the pen holder Power up, connect USB cables. Lift the pen holder, M5 S0 + Enter ![Img](./media/img-20231026132110.png) Lower the pen holder, M3 S50 + Enter, fix the pen on the holder and make the writing head touch the paper. ![Img](./media/img-20231026132125.png) ![](media/632bb3074ed8d4a7bc44b5bc09c33b07.png) At this step, the pen holder is well adjusted. ## 4.7 Adjust speed to write and draw Set parameters of the machine to \$110 and \$111 and acceleration value to \$120 and \$121. Input \$\$ in the Command to check the configuration parameter and view \$110, \$111, \$120 and \$121 ![](media/c8de9e7a459ed85b94772ea0225db979.png) We turn \$110 and \$111into 500,\$120 and 121 are equal to 10 We turn \$110 and \$111 into 5000,\$120 and 121 are turned into 200 In Command, input:\$110 = 5000 + Enter,\$111 = 5000 + Enter; \$120 = 200 + Enter,\$121 = 200 + Enter ![](media/66fb7d57fb4d22f92a4e1ea4215a4d8a.png) Input \$\$ ![](media/71eaafc47c4fb4eebf900b0854e495b6.png) You can adjust speed values if you think speed is too fast or slow. # 5. Generate pictures into Gcode through Inkscape Roughly all pictures can be identified and generated into contour pictures through Inkscape, then transformed into Gcode through an extension tool ## 5.1 Generate pictures into Gcode We provide example pictures in the file. However, you can choose pictures you like. ![](media/fe4be9a361d7ad09b500556abd5ae0cf.png) Open Inkscape. Click A4 and landscape ![](media/6a2ff861cb96eb36507076415310cc61.png) ## 5.2 Open example pictures You only need to drag example pictures to the interface of the software. ![](media/8ed930d140e576932bf6bace55e432a3.png) ## 5.3 Generate outline picture Click Path > Trace Bitmap > Update, then generate Bitmap pictures, as shown below; ![](media/31f174b5089134e69485d9a12e92b978.png) Drag the generated picture aside then delete the original one. ![](media/3b8f4f16c5555b29cd71952cb596b141.png) Adjust the size and location of bitmap picture and keep it in the paper. ![](media/4288ffc82c54a8a242ae296e5358eb04.png) Produce Gcode ![](media/470cae3b28e5668165841f089a4c1aab.png) Adjust speed of x and y axis and how much the pen holder can lower down. Save the path of Gcode and name, then click Apply. ![](media/e66a3d3aa0a27a691a4aee2d40dfec28.png) Click OK ![](media/e3c666ff1b3a8ad69627df9fd7d02fb2.png) Open the path you saved then a new Gcode file is produced ![](media/916bd7e081bcb71b140e76e7fe7d0ccc.png) # 6. Control the machine to draw via Universal Gcode Sender We transform the picture gear 2 into gear2.gcode then send gear2.gcode to the pen plotter to draw gears. Open Universal Gcode Sender Click File > Open ![](media/b3fb6bad94c7ab44041a99a51217e72f.png) Save the path of the gcode and open gear2.gcode ![](media/386b676a7ab18149ae77ab2568ceedc2.png) ![](media/cdcb62e22f1343a3773a97ecaa1973da.png) **Connect and draw** Move the X and Y axis at the start point, leave an A4 paper under the machine and keep them aligned, as shown below ![](media/04fc4590b43b5636afafbaf0b46be3df.png) Follow the instruction to operate ![](media/420511d5a77979e4ffc5d3b4a21f036e.png) Normally, the pen plotter will start drawing the gear # 7. Turn fonts into Gcode through Inkscape ![](media/e0e7b6a1ae75d335b41700c0f0e37974.png) This is a poem named Nothing Gold Can Stay The headline is filled font, the author name is not filled and the poem is monoline font. That indicates gcode is completed through three methods ## 7.1 Write a poem through inkscape Adjust the size of fonts, as shown below ![](media/9f8c4a6ae3c92a8888eb6f2635a45382.png) ## 7.2 Deal with filled fonts The headline is filled Select the headline and click Path \> Object to path ![](media/34f0e2cefe530dedf76edd1880ec90c9.png) Then click the headline again and click Extension \> KM-LASER \> FILL:HATCH FILL ![](media/d25be4726f2cf0237ca78ff9c2e80e9e.png) Then a page appears and keep parameter unchanged and click Apply ![](media/831233dbb1618a9b628eb1a0b668758a.png) Now, you will find the font of the headline change ![](media/075a20aa1c6e809475d90ccfa601abf4.png) ## 7.3 Hollow Fonts The name of author is set to hollow fonts Select the name and click Path \> Object to Path ![](media/1469767619a5f179d135b77bbd5421b4.png) ## 7.4 Mongline fonts Follow the instruction as below: ![](media/b31fa7918b6e9bd79a64a2b540f42a19.png) ![](media/4eeb8cb1f13e156030e29a3d2b204aea.png) ![](media/f6f859882b0316dfdbdf5093fdd1d088.png) ## 7.5 Transform fonts into Gcode Click keyestudio drawing \> Gcode Generator to generate gcode. ![](media/9526e19dfa0a3386d59663e8123b321a.png) Remember to modify the name of Gcode ![](media/72ea19acab049f7f038c05a6b0081d47.png) ![](media/7390be71a5dbe5d523a8d7425364f74d.png) ## 7.6 Control the machine to write through Universal Gcode Sender Move the X and Y axis at the start point, leave an A4 paper under the machine and keep them aligned, as shown below ![](media/04fc4590b43b5636afafbaf0b46be3df.png) Open the above generated Gcode through Gcode Sender Connect and click start. Then a poem Nothing Gold Can Stay will be shown ![](media/700313462efa96e6bb1b332f2232ef90.png)