Activity Technical exchange LaserMakerdownload mobile phoneAPP English
release
design project

Present a complete idea, including design specifications, drawing files, parameter settings, etc

design drawings

Display drawing files

post

Technical exchange area, where any questions or doubts can be discussed

[Course works] Mini Writing Machine

[Copy link]
18436 |13
Published 2021-7-28 14:35:50 | Display all floors |Reading Mode
This post ends with OREO Yu 2021-9-14 14:50 edit

Mini Writing Machine

preface:
    Have you ever tried using a laser cutting machine to cut mechanical parts, such as phone stands, small decorations, pen holders, and other items that are assembled through card slots? thisThis project utilizes servo motors in conjunction with laser cutting mechanical parts to achieve precise marking and writing control with a marker pen. We believe that through the design concept of this project, we can create more creative maker works.

    *To ensure a reading experience, it is recommended to use a computer to view the tutorial section of this page
    *It is recommended to read all tutorial sections in their entirety before starting to purchase parts


agreement:
    This work adopts the Creative Commons Attribution-Non commercial use-Sharing in the same way 4.0 International license agreement for licensing.
    When you use the drawings or source code related to this work, it is deemed that you agree to and comply with the contents of this agreement.

Project Information:
    LaserMakerSource file: Contains laser cutting drawings for shell, internal mechanical structural parts, etc
    MicroPythonControl board source code: including control board program source code
    Computer side program: includes a computer side font parsing program, used in conjunction with the control board
    *Please download the updated content and historical versions of this version at the end of this post"Update content"View in the middle
   



Material Preparation/Software installation:
    Material List:
    [Attention]The program is based onmicroPythonWrite, but do not guarantee all runsmicroPythonThe platform can run the code normally.
    The program has currently been adapted for the following hardware/Verify and ensure the normal operation of the program:
    Control board:
        Sheng SiLABPLUSControl board, firmware versionV2.3.0Purchase address:https://m.tb.cn/h.fYCjvsX?sm=c6a13a
        DFROBOTControl board, firmware versionV2.1.0Purchase address:https://www.dfrobot.com.cn/goods-1902.html
   
    Tool List:
   
    Software used:
    LaserMakerFree laser modeling software, official website:https://www.lasermaker.com.cn/
    mPython: Sheng SiLABPLUSThe graphical programming software launched, official website:https://labplus.cn/software
    Mind+:DFROBOTThe graphical programming software launched, official website:http://mindplus.cc/

tutorial production/Demonstration effect:
    Notes:
        ·[supplement add replenish complement]Copper columns should use hexagonal parts20mmLength, excluding external thread length
        ·When tightening the locking nut, do not tighten it too tightly. The friction between the parts should be based on the fact that when only one of them is held, the other can slide freely
        ·Before installing the servo, be sure to use the control board to power on and reset the servo to the default angle
    Pin definition:
        ·Dot the servo:0
        ·Swing arm servo:1
        ·Stepper motorA:13
        ·Stepper motorB:14
        ·Stepper motorC:15
        ·Stepper motorD:16
   
If the phone cannot redirect, please copy to the browser address and open:
  1. https://www.bilibili.com/video/BV1Lg411V7Vp/
Copy code
[Attention]This link is a diversity connection, please click "Gobilibili”Link Jump Play View Full Tutorial Video

Usage tutorial:
    Mini Writing Machine Menu Button Instructions:
        P: Previous option
        Y:Paper return (only available on specific interfaces)
        T:
retain
        H:
retain
        O:
Paper feed (only available on specific interfaces)
        N: Next option
        A: Confirm
        B: Return

Parameter Adjustment Tutorial:
   Follow the upload steps in the video tutorial to modify the source code of the control boardconfig.pyAfter uploading the internal parameters, simply upload them back to the control board
    1.Adjust the step delay of the swing arm servo and dot servo to a larger value first(200ms)Left and right, ensure that the servo has sufficient operating time:
        Swing arm servo -> Step delay200Or higher
        Dot the servo motor -> Lift delay200Or higher
        Dot the servo motor -> Descent delay:200Or higher
    2.Disable compensation algorithm
        Before starting the adjustment, please set all the parameters related to the compensation algorithm to0To prevent the intervention of compensation algorithms from affecting the adjustment effect:
            Swing arm servo -> Dead zone compensation:0
            Swing arm servo -> angel_fix: Within the array16All numbers are set as0
            Dot the servo motor -> angel_fix:0
    3.Select the dot calibration test in the development and debugging tool, adjust the servo parameters until the pen tip can evenly print error lines and patterns
   
   
        Adjust the basic parameters firstFinally, adjust the parameters of compensation algorithm
        Compensation algorithm adjustment sequence:
        Dot the servo motorAngel fix -> Dead zone compensation for swing arm servo motor -> Swing arm servoAngel fix

        For the description of the functions of each parameter, please refer to the comments in the configuration file. Here, we specifically explain the compensation algorithm parameters:

        Swing arm servo -> Dead zone compensation: When the swing arm servo moves in the opposite direction (the pen head returns to the first row), the accuracy may decrease due to the dead zone(Baidu Baike Explanation on Dead Zone)Dead zone compensation refers to using the return angle of additional motion to offset the dead zone

        Swing arm servo -> angel_fixDuring development, it was discovered that servos have different effects onPWMInconsistent sensitivity of intervals, i.e. outputPWMThe change in servo angle is not linear,Angel fixParameters can affect every step of the program outputPWMPerform individual compensation, from left to right within the array16Number corresponds vertically from top to bottom16Extra compensation for steps (positive value)Down, negative values up)Before adjusting other parameters of the swing arm servo, all values here should be0If any value is not0Please modify and readjust the parameters of the swing arm servo motor,Angel fixIt should be the last step in the parameter adjustment process

        Dot the servo motor -> angel_fixCompensate for the tilting of the paper lifting structure caused by installation, which usually occurs when one side of the rudder head is higher and the other side is lower. When the lower part cannot be tapped (the pen tip is not in contact with the paper), set it as a positive value; When the upper part cannot be dotted, set it as a negative value

    4.Select the swing arm calibration test in the development and debugging tool, and adjust the step distance of the stepper motorPWMValue until the printed pattern is square
   
    5.Reasonably set the delay of the servo motor to ensure sufficient action time for the servo motor
        The smaller the delay setting of the servo motor, the faster the printing speed, but the time left for the servo motor to operate is also smaller. When the value is too small, it may cause the servo motor to send a return signal before reaching the specified angle, resulting in a decrease in printing effect
        Swing arm servo -> Step delay
        Dot the servo motor -> Lift delay
        Dot the servo motor -> fall delay

Custom print content:
    Using the program folder on the computerexeProgram generates custom text files
   
    Wireless connection (recommended):
    firstconfig.pySet up in the middleWiFiAnd computerIPconfiguration,Then select Wireless Connection from the Mini Writing Machine menu(Beta)function,And start the program folder on the computer sideexeProgram, enter text and file name, click the load button to transfer the file to the control board, click print to immediately print the text content
    Wired connection:
    Start the program folder on the computerexeFile, enter text and file name, click the load button to display successfully, then enteroutputFolder, find the corresponding file name, and then follow the steps in the video tutorial to upload the file generated by the program.binFormat files to the control boardbinIn the folder, restart the control panel to see the new files under the user files.

    binOnce the file is uploaded to the control board, it can be printed offline. When printing again, there is no need to connect to a computer, simply select the corresponding file

doubt/Suggestions for improvement/BUGFeedback
    Any feedback about this project is welcome through the comment section, and I will reply as soon as I see it.

Supported functions:
    Pen head path optimization: already supported
    Pen path prediction: already supported
    Print Preview: Supported
    Printing pause: already supported
    Menu Function Interface: Supported
    Servo dead zone compensation algorithm: already supported
    Servo step compensation: Supported
    Wireless file transfer: Supported
    Offline printing: already supported
    Automatic screensaver/Auto screen off: already supported

Features to be supported:(There are too many holes dug, fill them slowly haha)

    First usemicroPythonProgramming, there are many areas that I haven't figured out yet, take your time to study haha

    Bidirectional Printing: Planned Support
    Cancel print task: Planned support
    A flashing program/An update program: Planned support
    Remote Printing Task: Planned Support

    use directlyTCPConnection: Planned
    Adding custom character editor to computer program: planned
    mDNSNo lossIPConnect computer:in the plan

    Optimization of parsing program: planned
    Touch key anti misoperation optimization: planned
    No computer program parsing (offline parsing): Planned

    Parameter Adjustment Tutorial: Planned
    Usage tutorial: Planned

Program Description:
    The project program uses a multi file structure and calls modules to each other to achieve handwriting functionality.
    In general, only changes are neededconfig.pyThe parameters in can be used. If there is a need to change the code, please refer to the following information to locate the code that needs to be changed:
    config.pyThe configuration file lists the parameters that can be changed for the writing machine
    main.pyMain program, program main loop implemented in this file (including startup, menu content declaration, etc.)
    printer_core.pyCore program, including the implementation of parsing, printing and other related functions
    printer_file_system.py: File system function encapsulation
    printer_global_variable.pyGlobal variables are uniformly stored in this file
    printer_gui.pyScreen function implementation, including automatic centering of text, automatic updating of display, file preview, etc
    printer_gui_menu.pyImplementation of menu interface functions
    printer_info.py: Includes author information, program version, and other related details *Please do not modify the version number arbitrarily, as updates may be implemented according to the version number in subsequent updates
    printer_input.py: Includes implementation of input event preprocessing
    printer_network.pyImplementation of network related functions, including network connection, automatic download of local area network files, etc
    printer_servo.pyImplementation of control functions including dot servo and swing arm servo
    printer_stepper.pyImplementation of stepper motor control function

Update content:
    *Please see the latest version above"Project materials"Download in the middle
    210914:
        Control board program:
            ·Core programstructureoptimize enhance improve refine
            ·Logic optimization of pen trajectory prediction algorithm
            ·Optimization of servo motor library
            ·Optimization of stepper motor library
            ·Used itloggingUnified management and operation of moduleslog
            ·Removed screensaver function
    210830:
        Download the old version:
        Control board program:
            ·Use parsing program insteadFrameBufferClass parsing, significantly improving parsing speed and significantly reducing storage usage
            ·Logic optimization of pen trajectory prediction algorithm
            ·Removed dot calibration mode (due to changes in the core program, this mode is no longer supported in the new architecture, please use dot calibration testing as a replacement)
            ·Optimization of core program structure (departing from global variable references and using module internal structures instead)
        Directory structure:
            ·New Material List
            ·New Tool List
    210828:
        Download the old version:
        ·The first open source version of the project


This post contains more resources

You need login Can I download or view without an account?Register Now

x
reply

Use items report

Published 2021-8-14 19:22:48 | Display all floors
I'm really looking forward to it
reply
reply support oppose

Use items report

Published 2021-8-21 16:51:05 | Display all floors
Support open source for such good projects! I admire your passion for innovation and look forward to your next sharing
reply
reply support oppose

Use items report

OP (Original Poster) Published 2021-8-29 13:03:38 | Display all floors
simplesky999 Published 2021-8-14 19:22
I'm really looking forward to it

Thanks for your support! The project is now fully open source, welcome to follow
reply
reply support oppose

Use items report

OP (Original Poster) Published 2021-8-29 13:03:50 | Display all floors
haodong Published 2021-8-21 16:51
Support open source for such good projects! I admire your passion for innovation and look forward to your next sharing

Thanks for your support! The project is now fully open source, welcome to follow
reply
reply support oppose

Use items report

Published 2021-8-30 09:27:35 | Display all floors
Front row support
reply
reply support oppose

Use items report

Published 2021-8-30 10:34:23 | Display all floors
Rear support!Congrats
reply
reply support oppose

Use items report

OP (Original Poster) Published 2021-8-31 11:51:11 | Display all floors

Hahaha, thank you for your support

This post contains more resources

You need login Can I download or view without an account?Register Now

x
reply
reply support oppose

Use items report

OP (Original Poster) Published 2021-8-31 11:51:27 | Display all floors

Hahaha, thank you for your support


This post contains more resources

You need login Can I download or view without an account?Register Now

x
reply
reply support oppose

Use items report

Published 2021-10-18 13:52:59 | Display all floors
After uploading the program, there is an error message when restarting! May I ask where the big god went wrong?

This post contains more resources

You need login Can I download or view without an account?Register Now

x
reply
reply support oppose

Use items report

OP (Original Poster) Published 2021-10-26 15:57:46 | Display all floors
linuxearth Published 2021-10-18 13:52
After uploading the program, there is an error message when restarting! May I ask where the big god went wrong?

This firmware version is too old, update the control board firmware tov2.3.0That will do.
reply
reply support oppose

Use items report

Published 2021-11-8 14:45:49 | Display all floors
I am using Shengsi's expansion board,2I don't know how to connect the wiring diagram of a servo motor and a motor. There is no wiring diagram in the video
reply
reply support oppose

Use items report

OP (Original Poster) Published 2021-11-9 11:07:08 | Display all floors
linuxearth Published 2021-11-8 14:45
I am using Shengsi's expansion board,2I don't know how to connect the wiring diagram of a servo motor and a motor. There is no wiring diagram in the video

There are pin definitions in the tutorial, just connect them according to the pin definitions inside. Identify the signal pins of the Chu servo motor, correspond to the pin definitions in the article, and be careful not to connect the other two positive and negative poles incorrectly
reply
reply support oppose

Use items report

Published 2023-6-16 16:35:33 | Display all floors

support!

support!
support!
reply
reply support oppose

Use items report

You need to log in before you can reply to the post login | Register Now

This version of the points rules

advertisement
Quick reply Back to top Back to list