Disclosure of Invention
In order to solve the technical problem, the invention provides a dot matrix light source and a method for matching light emission in 3D printing slice imaging.
The invention relates to a dot matrix light source which is suitable for 3D printing slice imaging to carry out matching luminescence, and adopts the following technical scheme, wherein the technical scheme comprises the following steps: host computer, host computer software, 3D print the main control board, 3D print firmware, control input plug, LED dot matrix control drive module and LED dot matrix module.
The upper computer is connected with the 3D printing main control board through a serial port; the 3D printing main control board is connected with a control input plug through an I/O port arranged on a 3D printing firmware, and a power supply lead is also connected with the control input plug; the control input plug is connected with the LED dot matrix control driving module; the output end of the LED dot matrix control driving module is correspondingly connected with the pins of the LED dot matrix module.
The upper computer is provided with the upper computer software, and has the functions of 3D printing slice analysis and LED dot matrix control signal sending.
3D prints the firmware in the main control board is printed to 3D, contains LED dot matrix functional module in the firmware, wherein contains: the functions of setting an I/O port of the 3D printing main control board, identifying and communicating control signals of the LED dot matrix module.
The LED dot matrix control driving module is composed of a dot matrix control chip and a driving circuit, the dot matrix control chip is used for controlling the lighting of any LED on the LED dot matrix module, and the driving circuit provides matched voltage and current for the LED dot matrix module.
The LED dot matrix module has the same size as the display size of an LCD screen adopted on a 3D printer, partition units with a certain number of rows and columns are formed after partition of the size, LEDs are installed in the middle of the partition units, and common cathodes or common anodes are connected according to different driving modes to form the LED dot matrix module.
The LED can be an LED patch or an LED lamp bead.
And the control input plug, the LED dot matrix control driving module and the LED dot matrix module are mutually connected and welded on the dot matrix lamp panel.
Through the arrangement and connection, each partition unit on the display area of the LCD screen corresponds to one LED on the LED dot matrix module, and the lighting and extinguishing states of each LED can be independently controlled, so that the dot matrix light source which is suitable for 3D printing slice imaging and performs matched light emitting is realized.
The invention relates to a method for matching a luminous dot matrix light source suitable for 3D printing slice imaging, which comprises the following steps: a setting method of a dot matrix light source and a control method of the dot matrix light source.
The setting method of the lattice light source adopts the following technical scheme, and comprises the following steps:
step one, size setting: the size of the LED dot matrix module is set to be consistent with the display size of the LCD screen. When installed, the two dimensions are perfectly aligned.
Step two, zoning: the above dimensions are equally divided to form a plurality of divisional cells in a fixed number of rows and columns. As can be seen from the first step, the display size of the LCD panel completely matches the size of the LED dot matrix module, and therefore, the resulting division units are completely matched and in a one-to-one correspondence relationship for the divisions of the LED dot matrix module, i.e., for the divisions of the display area of the LCD panel.
Rules to be followed for compartmentalization: firstly, the size of the partitioned unit is larger than or equal to that of the LED lens so as to ensure smooth installation; next, the shape of the formed section unit depends on the characteristics of the LED lens, and if the lens is circular, the shape of the section unit is: square or nearly square; if the light-gathering shape of the lens is rectangular (including square), the shape of the partition unit is set to be a rectangle in equal proportion to the shape of the lens (in practical application, the rectangle in equal proportion is also approximate). After the light emitted by the LED is vertically projected onto the LCD screen through the lens, the formed illumination area can meet the requirement of covering the corresponding zone unit; finally, the power of the individual LEDs is to meet the curing requirements of 3D printing.
Thirdly, constructing an LED dot matrix module: the LED dot matrix module of the present invention is configured by mounting one LED at the center of each partition unit, and connecting the LEDs in a common cathode or common anode in rows and columns according to the driving method.
Fourthly, setting the distance between the LED dot matrix module and the LCD screen: and setting the distance between the LED dot matrix module and the LCD screen according to the size of the partition unit formed in the second step and the selected light-emitting angle of the LED lens, so that the illumination area projected by each LED on the LCD screen can cover the corresponding partition unit.
Through the four steps, the lattice light source of the invention achieves the effects that: each partition unit on the display area of the LCD screen corresponds to one LED, and in the process of printing each layer, as long as the LEDs corresponding to the partition units containing curing contents (including slice imaging) on the LCD screen are lightened, sufficient and effective curing light sources can be provided for the printing of the layer without lightening the whole LED dot matrix module.
The control method of the lattice light source adopts the following technical scheme, and comprises the following steps:
step one, setting control parameters: according to the number of rows and columns of the partition units formed in the second step in the setting method of the dot matrix light source, the whole system is correspondingly set, and the method comprises the following steps: the slice analysis parameters of the upper computer software, the element number of the control array, the control parameters of the 3D printing firmware, the connection setting of the LED dot matrix control driving module and the like all correspond to each other.
Step two, analyzing the 3D printing slice: and analyzing the 3D printed slices of each layer through upper computer software, and formatting the 3D printed slices into a control array of the LED dot matrix module. The implementation mode is two types: the first is generated by resolving slice data imaging of each layer, and the second is generated by directly resolving slice data of each layer.
The first analysis method: and analyzing the slice data for imaging. The specific method comprises the following steps: and traversing the pixel values of the slice data imaging, and performing a search cycle in each partition unit. If the RGB values are searched in a certain compartment cell: 255 pixels (the image of this value is displayed in white, i.e. contains the cured content), i.e. the control values for the cells are: 0, jumping out of the loop to complete the search of the partition unit; if no RGB values are found in the zone cell: 255 pixels indicate that no solidified content is contained in the cell, that is, the control value of the cell is: "1", the search setting of the zone unit is completed. Then, this operation is repeated, and the search setting is performed on the next compartment until the setting of all the compartments is completed, that is, a dot matrix light source control array suitable for the slice data imaging is generated.
The second analysis method described above: the slice data is directly parsed. The specific method comprises the following steps: and if intersection exists, adding a new intersection coordinate value in the existing slice data every time, and generating the intersection calculated slice data after all the intersection is finished. Then, through the slice data, if the partition unit contains the coordinate value of the slice data point, that is, the partition unit contains the solidified content, the control value is set to "0", and if the partition unit does not contain the solidified content, that is, the partition unit does not contain the solidified content, the control value is set to "1". After all the partition units are set, a dot matrix light source control array corresponding to the slice data is generated.
In the generated control array, the corresponding LED is lighted up by setting the zone unit with the value of 0; for a zone cell with a value of "1", the corresponding LED will be in the off state.
Thirdly, matching and lighting the LED dot matrix module: when the LCD screen is lightened for printing, the generated dot matrix light source control array is sent to the 3D printing main control board through the serial port of the upper computer through the upper computer software, the control signal is sent to the LED dot matrix control driving module through the set I/O port on the 3D printing main control board after the 3D printing firmware is read, and the LED dot matrix control driving module lightens the LED corresponding to the partition unit containing the curing content on the LED dot matrix module according to the control signal, so that the dot matrix light source which is suitable for 3D printing slice imaging and matched for light emitting is realized.
The invention has the beneficial effects that:
1. in the process of printing each layer, the dot matrix light source of the invention can only light the LED containing the solidified content area according to the slice imaging, but not light the whole LED lamp panel in the prior art, thereby having the characteristics of saving energy consumption, reducing heating, reducing the damage of high temperature to the LCD screen, and the adverse effect on the whole printer, and the like.
2. In the whole printing process, because the size and the position of each layer of curing area are not the same, the positions of the lighted LEDs corresponding to the curing area are not the same, namely: the printing of each layer is not all illuminated by the same LED to provide a light source. This reduces the frequency of emission of the individual LEDs, thereby extending the lifetime of the overall light source.
3. The cost of the printer is also reduced as a whole due to the fact that a constant current power supply which is required to be equipped for the existing LED light source is omitted.
Detailed Description
The invention is further illustrated by the following examples and figures.
In this embodiment, an 8.9-inch LCD screen is taken as an example, and the display size is as follows: 192 × 120mm, display pixels: 2560X 1600; the diameter of the adopted LED lens is as follows: 6mm, the luminous angle is: 30 degrees.
The invention provides a lattice light source which is suitable for 3D printing slice imaging to carry out matching luminescence, as shown in figure 1, the lattice light source comprises: host computer 1, host computer software, 3D print main control board 2, 3D print firmware, LED dot matrix control drive module 301, LED dot matrix module 302, control input plug 303.
The upper computer 1 is provided with the upper computer software of the invention and is connected with the 3D printing main control board 2 through a serial port.
On 3D prints main control board 2, downloaded the 3D who contains LED dot matrix functional module and printed the firmware, the I/O mouth that sets for in 3D prints the firmware links to each other with control input plug 303, and the power supply lead also links to each other with control input plug 303. In this embodiment, as shown in fig. 4, the I/O port is a 12864 interface on the 3D printing main control board 2, and is used as a port for signal communication and power supply.
As shown in fig. 3, 4 and 5, the control input plug 303 is connected to the LED dot matrix control driving module 301, the output end of the LED dot matrix control driving module 301 is correspondingly connected to the pins of the LED dot matrix module 302, and the connection mode is as follows: and when the actually controlled LED dot matrix line number is less than the number of the pins after the chip cascade connection, connecting the head pin and the tail pin after the chip cascade connection in a balanced vacant mode.
In this embodiment, the 2 74HC138 chips have 16 output pins, which can control and drive 16 rows of LEDs, while the LED dot matrix module 302 that actually needs to be controlled only has 10 rows of LEDs, so that 6 pins are left vacant. During connection, the 6 vacant pins are subjected to balanced vacancy on head and tail pins after chip cascade connection, namely: the first 3 output ends (H1-H3) of the first 74HC138 chip and the last 3 output ends (H14-H16) of the second 74HC138 chip are vacant, and the output ends (H4-H13) of the selected pins are connected with the LED dot matrix module 302; if the number of rows of LEDs to be controlled is odd, the equalization null is relative, such as: the number of LED rows to be controlled is 11, the first 2 output terminals (H1-H2) of the first 74HC138 chip and the last 3 output terminals (H14-H16) of the second 74HC138 chip can be left vacant, and the output terminals (H3-H13) of the pins are selected to connect with the LED dot matrix module 302. The connection is carried out by adopting the mode, so that the control code is coherent and concise, and the work of all chips is relatively balanced.
The control input plug 303, the LED dot matrix control driving module 301 and the LED dot matrix module 302 are connected to each other and welded to the dot matrix lamp panel 3.
As shown in fig. 2, 5 and 6, the LED dot matrix module 302 of the present embodiment is composed of 10 rows and 16 columns of LEDs 3022, and is connected by a common anode.
As shown in fig. 3, the LED dot matrix control driving module 301 is composed of a dot matrix control chip and a driving circuit. The dot matrix control chip is used for controlling the lighting of any LED3022 on the LED dot matrix module 302, and the driving circuit consists of a triode (Q4-Q13) and a resistor and provides matched voltage and current for the LED dot matrix module 302.
Through the arrangement and connection, each zone unit 401 on the display area 4 of the LCD screen corresponds to one LED3022 on the LED dot matrix module 302, and the lighting and extinguishing states of each LED3022 can be controlled independently, so that the dot matrix light source which is suitable for 3D printing slice imaging and performs matched light emitting is realized.
The invention relates to a method for matching a luminous dot matrix light source suitable for 3D printing slice imaging, which comprises the following steps: a setting method of a dot matrix light source and a control method of the dot matrix light source.
The setting method of the lattice light source adopts the following technical scheme, and comprises the following steps:
step one, size setting: the LED dot matrix module 302 is sized to correspond to the size of the display area 4 of the LCD screen.
The 8.9 inch LCD screen adopted in this embodiment, its display size is: 192X 120 mm. Thus, the LED dot matrix module 302 is sized to: 192X 120 mm. When installed, the two dimensions are perfectly aligned.
Step two, zoning: the above dimensions are equally divided to form a number of divisional cells 3021 in a fixed number of rows and columns.
By integrating the display size of the LCD screen, the diameter of the LED lens, and the power of the LED, the present embodiment divides the above sizes into: 10 rows and 16 columns, 160 section cells 3021 are obtained, each section cell 3021 having a square shape and dimensions: 12 x 12mm, this result being in accordance with the setting rules described previously.
For some sizes of LCD screens, the cell size obtained after partitioning is a rectangle close to a square, which also meets the design requirements. For example, the display size of the 10-inch LCD screen is as follows: 196.6X 147.5mm, which are divided into: 12 rows and 16 columns, the resulting cell size is: 12.2875X 12.2917mm, is a rectangle that is approximately square.
As shown in fig. 2, since the display size of the LCD screen completely matches the size of the LED dot matrix module 302, the resulting division units are completely matched and in a one-to-one correspondence relationship for the divisions of the LED dot matrix module 302, that is, for the division of the display area 4 of the LCD screen.
Thirdly, constructing an LED dot matrix module 302: one LED3022 is mounted at the center of each unit 3021, and is connected in a common anode manner in rows and columns according to the driving method of the present embodiment, thereby forming an LED dot matrix module 302 according to the present invention, as shown in fig. 2, 5, and 6.
Step four, setting the distance between the LED dot matrix module 302 and the LCD screen: according to the size of the partition unit 3021 formed in the second step and the selected light emitting angle of the LED lens, the distance between the LED dot matrix module 302 and the LCD screen is set so that the illumination area projected onto the LCD screen by each LED3022 can cover the corresponding partition unit 401.
In this embodiment, the unit 3021 is a square with a side length of 12mm, and the length of the diagonal line can be calculated as: 16.97mm, for example a circular lens, which is the minimum diameter value of the light projected by the LED3022 on the LCD screen that can cover the zone unit 401.
The angles of the LED lens used in this embodiment are: 30 degrees, the distance between the focal point of the lens and the LCD screen is calculated as follows: at 31.67mm, the projected illumination diameter is: 16.97mm, i.e. at this distance, the projected illuminated area may cover a square with a side of 12 mm. In practical applications, the distance should be set slightly larger, and the installation distance is set to 32mm in this embodiment.
Through the four steps, the lattice light source of the invention achieves the effects that: each zone unit 401 on the display area 4 of the LCD screen corresponds to one LED3022, and during the printing of each layer, as long as the LED3022 corresponding to the zone unit 401 containing the curing content (including slice imaging) on the LCD screen is turned on, a sufficient and effective curing light source can be provided for the printing of the layer without turning on the whole LED dot matrix module. As shown in fig. 1 and 2, the section unit 401 including the slice imaging example 402 corresponds to the LED3022 in a lit state (without the "x" sign), and the section unit 401 not including the slice imaging example 402 corresponds to the LED3022 in an unlit state (with the "x" sign).
In fig. 2, the slice imaging example profile map 3023 is copied to the corresponding location of the LED dot matrix module 302 for a clearer illustration of the lighting effect. As can be clearly seen from the figure: in the case of the section unit 3021 including the slice imaging example outline map 3023, the LED3022 is lit, and is not included, but is extinguished.
The control method of the lattice light source adopts the following technical scheme, and comprises the following steps:
step one, setting control parameters: according to the method for setting the dot matrix light source, the number of rows 10 and the number of columns 16 of the partition unit formed in the second step are used as parameters, and the method for setting the dot matrix light source correspondingly sets the whole system and comprises the following steps: the slice analysis parameters of the upper computer software, the element number of the control array, the control parameters of the 3D printing firmware, the connection setting of the LED dot matrix control driving module 301 and the like all correspond to each other.
Step two, analyzing the 3D printing slice: and analyzing the slices printed on each layer by 3D through upper computer software, and formatting the 3D printed slices into a control array of the LED dot matrix module 302. The implementation mode is two types: the first is generated by resolving slice data imaging of each layer, and the second is generated by directly resolving slice data of each layer.
The first analysis method: and analyzing the slice data for imaging. The specific method comprises the following steps: traversing the pixel values of the slice data imaging, and performing a search cycle in each partition unit:
the display pixels of the 8.9-inch LCD screen are as follows: 2560 × 1600, i.e., the number of pixels imaged per slice data is: 2560 × 1600. After this division, 10 rows and 16 columns of division cells 401 are generated, and the number of pixels per division cell 401 is: 160 × 160. The upper left corner of the slice data image is set as origin 0, and to the right: in the x direction, downwards is: the y direction. The general formula of the pixel range of each partition unit to be searched is as follows: (C-1). times.160 + 1. ltoreq.x.ltoreq.Cx160, and (R-1). times.160 + 1. ltoreq.y.ltoreq.Rx160. Then, the zone cells in the first row and the first column are: the pixel range of R1C1 is: (1-1). times.160 + 1. ltoreq. x.ltoreq.1.ltoreq.160, (1-1). times.160 + 1. ltoreq. y.ltoreq.1.ltoreq.160, namely: x is more than or equal to 1 and less than or equal to 160, and y is more than or equal to 1 and less than or equal to 160. The pixel ranges of other zone units can be calculated as well. For example:
the pixel range of the zone cell R1C2 in the first row and the second column is: x is more than or equal to 161 and less than or equal to 320, and y is more than or equal to 1 and less than or equal to 160.
The pixel range of the partition unit R2C1 in the second row and the 1 st column is: x is more than or equal to 1 and less than or equal to 160, and y is more than or equal to 161 and less than or equal to 320.
The pixel range of the last compartment R10C16 is: 2401 is less than or equal to x and less than or equal to 2560, and 1441 is less than or equal to y and less than or equal to 1600.
If the RGB values are searched in a certain compartment cell: 255 pixels (the image of this value is displayed in white, i.e. contains the cured content), i.e. the control values for the cells are: and 0, jumping out of a loop, and finishing the search of the partition unit, if the RGB values are not searched in the partition unit: 255 pixels indicate that no solidified content is contained in the cell, that is, the control value of the cell is: "1", the search setting of the zone unit is completed. Then, this operation is repeated, and the search setting is performed on the next compartment until the setting of all the compartments is completed, that is, a dot matrix light source control array suitable for the slice data imaging is generated.
The second analysis method described above: the slice data is directly parsed. The specific method comprises the following steps: and (3) performing intersection calculation on the 9 horizontal lines and the 15 vertical lines formed by division in the second step in the setting method of the lattice light source and line segments in the slice data in sequence, if the horizontal lines and the 15 vertical lines are intersected, adding a new intersection coordinate value in the existing slice data, and finally generating the slice data after the intersection calculation. Then, this slice data is traversed and a search loop is made within each compartment:
the display size of the 8.9-inch LCD screen is as follows: 192X 120 mm. After dividing the cells, 10 rows and 16 columns of the unit cells 401 are generated, and the size of each unit cell 401 is: 12X 12 mm. Similarly, the upper left corner of the display area 4 of the LCD screen is set as the origin 0, and to the right: in the x direction, downwards is: the y direction. The general formula of the size range of each partition unit to be searched is as follows: (C-1). times.12 < x.ltoreq.Cx12, (R-1). times.12 < y.ltoreq.Rx12. Then, the zone cells in the first row and the first column are: the size range of R1C1 is: (1-1). times.12 < x.ltoreq.1.ltoreq.12, (1-1). times.12 < y.ltoreq.1.ltoreq.12, namely: x is more than 0 and less than or equal to 12, and y is more than 0 and less than or equal to 12. The size ranges of other zone units may also be calculated. For example:
the size range of the zone cell R1C2 in row 1 and column 2 is: x is more than 12 and less than or equal to 24, and y is more than 0 and less than or equal to 12.
The size range of the zone cell R2C1 in row 2 and column 1 is: x is more than 0 and less than or equal to 12, and y is more than 12 and less than or equal to 24.
The size range of the last compartment R10C16 is: x is more than 180 and less than or equal to 192, and y is more than 108 and less than or equal to 120.
As can be seen from the above general formula and examples, when searching for a coordinate value, no value 0 is included, and further determination needs to be added in the actual setting.
When the section unit contains the coordinate value of the slice data point, namely the section unit contains the solidification content, the control value is set as '0', and when the section unit does not contain the solidification content, the control value is set as '1'. After all the partition units are set, a dot matrix light source control array corresponding to the slice data is generated.
In the generated control array, the corresponding LED is lighted up by setting the zone unit with the value of 0; for a zone cell with a value of "1", the corresponding LED will be in the off state.
Step three, matching and lighting the LED dot matrix module 302: when the LCD screen is lighted to print, the generated dot matrix light source control array is sent to the 3D printing main control board 2 through the serial port of the upper computer 1 through the upper computer software, and the control signal is sent to the LED dot matrix control driving module 301 through the 12864 interface on the 3D printing main control board 2 through the recognition and reading of the 3D printing firmware.
The LED dot matrix control driving module 301 firstly performs row selection, as shown in fig. 3, 2 chips 74HC138 are cascaded into a 4-16 decoder to complete the row selection, and can control and drive 16 rows of LEDs, in this embodiment, 10 cascaded pins are selected to gate the rows (H4-H13) of the LED dot matrix module 302, and the triodes (Q4-Q13) are used to adjust the voltage and current. The selected LED3022, the anode is on.
Then, as shown in fig. 4, the output of the LED control driver module 301 is cascaded by two 74HC595, and serial data is converted into parallel data by the SPI signal. When the output signal of a certain column is at high level, i.e. the control value is "1", the cathode of the LED3022 in the column is at high level, and the LED3022 positioned at the intersection of the strobe line and the column is not lit. Conversely, when the output signal of a column is low, i.e., the control value is "0", the cathode of the LED3022 in the column is low, and the LED3022 positioned at the intersection of the selected row and the column is lit.
After gating a row, 74HC595 outputs the row of data. The total of 10 lines are sequentially circulated, and the LEDs 3022 on the LED dot matrix module 302 of this embodiment are lit according to the control array generated by analyzing the 3D printed slice, thereby implementing the dot matrix light source of the present invention, which performs matching light emission in accordance with the 3D printed slice imaging.
In this embodiment, an 8.9-inch LCD screen is taken as an example to specifically explain the present invention, and for 3D printers with LCD screens of different sizes, the number of chips of the LED control driving module 301 may be increased or decreased according to actual needs. The control chips used are not limited to those described in the embodiments, and the control chips in the rows and columns may all be implemented by using 74HC595, or may be implemented by using other similar functional chips.