User Tools

Site Tools


electronics:thermoprinter

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
electronics:thermoprinter [2017/10/05 10:56] – [5.10.2017] dmmediaelectronics:thermoprinter [2020/04/02 20:33] (current) – [02.04.2020] dmmedia
Line 26: Line 26:
 ===== Plans ===== ===== Plans =====
  
-  * Attach stepper motor driver to motor and eval board 
-  * Write firmware to print predefined lines 
-  * Test assembled circuits with oscilloscope and compare with simulation 
   * Attach assembled circuits to print head and to eval board   * Attach assembled circuits to print head and to eval board
   * Test printing   * Test printing
Line 37: Line 34:
   * Find suitable voltage regulators   * Find suitable voltage regulators
   * Test eval circuit with battery   * Test eval circuit with battery
 +  * Design enclosure
   * Redesign hardware in Diptrace if possible   * Redesign hardware in Diptrace if possible
   * Final hardware design   * Final hardware design
 +  * Order PCB manufacturing
 +  * Solder device PCB
   * Implement subset of PJL protocol   * Implement subset of PJL protocol
   * Write report   * Write report
Line 48: Line 48:
     * Should be interrupt based (to allow time for calculations, data sending to the printer head and printing)     * Should be interrupt based (to allow time for calculations, data sending to the printer head and printing)
     * Should follow datasheet guide on printing start sequence (pull paper, then push to allow more or less constant speed printing)     * Should follow datasheet guide on printing start sequence (pull paper, then push to allow more or less constant speed printing)
-  * Assemble stepper motor driver breakout board +  * Write firmware to print predefined lines 
-  * Assemble pulse length protection circuit +  * Attach stepper motor driver to motor and eval board 
-    * https://www.oomipood.ee/kataloog/tme/toode?sku=HEF4538BT.652&t=hef4538 +  * Test assembled circuits with oscilloscope and compare with simulation
-    * https://www.tme.eu/gb/Document/fd06f66fc618772a331feaa9f315adf8/HEF4538BT.652.pdf +
-    * https://www.oomipood.ee/kataloog/tme/toode?sku=74AHC1G00GV.125&t=74ahc1g00 +
-    * https://www.tme.eu/gb/Document/9510631cc4884596c0243e91d551be16/74AHC1G00GV.125.pdf +
-  * Assemble temperature protection circuit +
-    * https://www.oomipood.ee/product/lm393ad_lm393ad_comparator_dual_smd_soic8_393?q=lm393 +
-    * http://www.jameco.com/Jameco/Products/ProdDS/902910.pdf +
-    * https://www.oomipood.ee/product/bc857b_mbr_bc857b_si_p_50v_0_1a_0_25w_3f_smd?q=bc857b +
-    * https://assets.nexperia.com/documents/data-sheet/BC856_BC857_BC858.pdf +
-  * Assemble other print head driving circuit +
-    * https://assets.nexperia.com/documents/data-sheet/74HC_HCT595.pdf +
-    * https://www.oomipood.ee/kataloog/farnell/toode?sku=8649820 +
-    * http://www.farnell.com/datasheets/274342.pdf +
-    * https://www.oomipood.ee/product/bc847b_mbr_bc847b_si_n_50v_0_1a_0_25w_1f_smd?q=bc847b +
-    * https://assets.nexperia.com/documents/data-sheet/BC847_SER.pdf+
  
 ===== Done ===== ===== Done =====
Line 87: Line 73:
     * http://www.ti.com/lit/ds/slvsb19d/slvsb19d.pdf     * http://www.ti.com/lit/ds/slvsb19d/slvsb19d.pdf
     * https://www.oomipood.ee/kataloog/farnell/toode?sku=2115234     * https://www.oomipood.ee/kataloog/farnell/toode?sku=2115234
 +  * Assemble stepper motor driver breakout board
 +  * Assemble pulse length protection circuit
 +    * https://www.oomipood.ee/kataloog/tme/toode?sku=HEF4538BT.652&t=hef4538
 +    * https://www.tme.eu/gb/Document/fd06f66fc618772a331feaa9f315adf8/HEF4538BT.652.pdf
 +    * https://www.oomipood.ee/kataloog/tme/toode?sku=74AHC1G00GV.125&t=74ahc1g00
 +    * https://www.tme.eu/gb/Document/9510631cc4884596c0243e91d551be16/74AHC1G00GV.125.pdf
 +  * Assemble other print head driving circuit
 +    * https://assets.nexperia.com/documents/data-sheet/74HC_HCT595.pdf
 +    * https://www.oomipood.ee/kataloog/farnell/toode?sku=8649820
 +    * http://www.farnell.com/datasheets/274342.pdf
 +    * https://www.oomipood.ee/product/bc847b_mbr_bc847b_si_n_50v_0_1a_0_25w_1f_smd?q=bc847b
 +    * https://assets.nexperia.com/documents/data-sheet/BC847_SER.pdf
 +  * Assemble temperature and voltage protection circuit
 +    * https://www.oomipood.ee/product/lm393ad_lm393ad_comparator_dual_smd_soic8_393?q=lm393
 +    * http://www.jameco.com/Jameco/Products/ProdDS/902910.pdf
 +    * https://www.oomipood.ee/product/bc857b_mbr_bc857b_si_p_50v_0_1a_0_25w_3f_smd?q=bc857b
 +    * https://assets.nexperia.com/documents/data-sheet/BC856_BC857_BC858.pdf
  
 ==== As SPICE simulations course work ==== ==== As SPICE simulations course work ====
Line 140: Line 143:
  
   * Received stepper motor driver ICs, multivibrators, MOSFETs, transistors and logic gates, that were missing.   * Received stepper motor driver ICs, multivibrators, MOSFETs, transistors and logic gates, that were missing.
 +{{ :electronics:img_1244.jpg?nolink&600 |}}
   * Should finish stepper motor driving code   * Should finish stepper motor driving code
   * Should now be able to assembly stepper motor driver breakout board (smth. like Polulu)   * Should now be able to assembly stepper motor driver breakout board (smth. like Polulu)
Line 146: Line 150:
 ==== 4.10.2017 ==== ==== 4.10.2017 ====
  
-  * Finished soldering available breakout boards, 5.09.2017 remaining ordered components should arrive+  * Finished soldering available breakout boards (shift register for managing heat elements blocks, battery voltage switch to supply stepper motor and heat elements, and pulse length protection), 5.09.2017 remaining ordered components should arrive 
 +{{ :electronics:img_1253.jpg?nolink&600 |}} 
 +{{ :electronics:img_1252.jpg?nolink&600 |}} 
 +{{ :electronics:img_1251.jpg?nolink&600 |}}
  
 ==== 5.10.2017 ==== ==== 5.10.2017 ====
Line 230: Line 237:
     * https://www.google.ee/search?q=CZ-HC-05&ie=utf-8&oe=utf-8&client=firefox-b&gfe_rd=cr&dcr=0&ei=RwXWWe7aI8aDyAWUl5jgBQ     * https://www.google.ee/search?q=CZ-HC-05&ie=utf-8&oe=utf-8&client=firefox-b&gfe_rd=cr&dcr=0&ei=RwXWWe7aI8aDyAWUl5jgBQ
   * To summarize, there is a family of chinese HC-0X BT modules, some of them are master/slave-only firmware locked. HC-08 is BLE, HC-09 is latest BT. HC-07 and HC-09 might have difficult to use, so HC-05 might be considered for purchase. As much as delivery period from China is totally random, I will continue to use current BLE module, and in case BT module will arrive timely, I will replace the BLE module.   * To summarize, there is a family of chinese HC-0X BT modules, some of them are master/slave-only firmware locked. HC-08 is BLE, HC-09 is latest BT. HC-07 and HC-09 might have difficult to use, so HC-05 might be considered for purchase. As much as delivery period from China is totally random, I will continue to use current BLE module, and in case BT module will arrive timely, I will replace the BLE module.
 +  * Received remaining ordered parts
 +
 +==== 6.10.2017 ====
 +
 +  * Finished soldering stepper motor driver breakout board and printer head sensors breakout board. Temperature and voltage protection circuit remain unsoldered.
 +{{ :electronics:img_1249.jpg?nolink&600 |}}
 +{{ :electronics:img_1250.jpg?nolink&600 |}}
 +
 +==== 7.10.2017 ====
 +  * Finished soldering temperature and voltage protection circuit
 +{{ :electronics:img_1248.jpg?nolink&600 |}}
 +
 +==== 24.10.2017 ====
 +  * Reinstalled Altium CircuitMaker to make it work again. Eventually old installation stopped working by consuming CPU resources and not showing any UI at startup. Trying to correct the problem, I have performed extensive research and as a last resort tried to reinstall. However installer refused to install the software into the non-empty folder, so I had to remove old version and install new from scratch.
 +  * Found potential issue with shift register circuit. As it should drive the printer head directly, the output of shift registers should be clearly defined High or Low level. However with using Output Enable input I can only get Z-state on outputs between values change and that can influence unpredictably on the printout. As a result, I have added pull-up resistors to tie the outputs to the High level, when not printing.
 +
 +==== 25.10.2017 ====
 +  * Selected and ordered non-BLE bluetooth module HC-05 and BK3231. BK3231 is cheaper and has better organized AT command communication, but it has slave only firmware. On the other hand HC-05 is a master/slave programmaticaly selectable unit, but AT communication is a bit tricky. There is also a possibility to change the firmware on a HC-05 modules to a commercial grade RN42 module firmware.
 +  * Some more information on the BT modules:
 +    * http://lobotryasy.net/bluetooth_spp_c.php
 +    * http://radiokot.ru/circuit/digital/pcmod/39/
 +    * http://www.instructables.com/id/3-Bluetooth-HID-Module-HC05-With-RN42-Firmware/
 +    * http://www.instructables.com/id/Upgrade-Your-3-Bluetooth-Module-to-Have-HID-Firmwa/
 +  * Tested battery voltage switch circuit. Outcome shows, that it works as expected:
 +{{:electronics:vhefb6v0.png?nolink|VH enable with feedback 6.0V}} {{:electronics:vhefb8v4.png?nolink|VH enable with feedback 8.4V}}
 +
 +==== 5.11.2017 ====
 +  * Tested battery voltage monitor circuit and overheat monitor circuit. As designed, battery voltage monitor trips when battery voltage declines below 6.0 V. Temperature monitor circuit trips at voltage level below 1.25 V, which corresponds to 65 C for NTC thermistor integrated into thermoprinter head.
 +{{:electronics:bcwi.png?nolink|Battery voltage monitor trips at 6.0 V}} {{:electronics:traps.png?nolink|Overheat protection trips at 1.25 V corresponding to 65 C}}
 +
 +==== 12.11.2017 ====
 +  * Received HC-05 Bluetooth transceivers:
 +{{:electronics:img_1329.jpg?nolink|}}
 +  * Published firmware on GitHub: https://github.com/dmmedia/Thermoprinter
 +  * Firmware framework borrowed from [[https://github.com/MarlinFirmware/Marlin|Marlin 3D printers firmware]].
 +  * Conversion from AVR to STM32 and adapting for thermoprinter is in progress (removing more than 1 stepper motor support, replacing analogue sensors and replacing endstops with bistate sensors)
 +
 +==== 21.11.2017 ====
 +  * Received SPP-C Bluetooth transceivers
 +  * Tested both HC-05 and SPP-C modules. HC-05 modules need to be powered on in special sequence to boot into AT command mode, while SPP-C modules are always in AT mode, while not connected to other Bluetooth device. Both modules do not require hardware flow control. Many android software applications support traditional Bluetooth serial communication.
 +  * Firmware code is mostly ported from AVR to STM32 platform and unneeded functionality removed. At the moment ADC code left partially ported.
 +
 +==== 08.03.2018 ====
 +  * Counting printable bits to optimize the number of simultaneously driven 64-bit blocks turned out to be a combinatorial task or [[https://en.wikipedia.org/wiki/Partition_problem|Partition problem]]. More specifically a [[https://en.wikipedia.org/wiki/Bin_packing_problem|Bin packing problem]]. Generally speaking, the resulting count of sums of simultaneously driven blocks will be not more than optimal count plus 2 if I would use First fit decreasing or Best fit decreasing algorithms.
 +  * Counting bits themselves turned to be another well-known problem named [[https://en.wikipedia.org/wiki/Hamming_weight|Hamming weight]]. Need to check whether STM32 has any special support for bit counting.
 +
 +==== 02.04.2020 ====
 +  * Thought that porting Marlin 3D printer firmware was bad idea, since the functionality is totally different and Marlin implementation is not brilliant. Will start from scratch and implement stepper motor advance on user button press and hold. Motor will advance with the lowest speed described in the thermal head manual. Next step will add accelleration and deceleration.
electronics/thermoprinter.1507200999.txt.gz · Last modified: 2017/10/05 10:56 by dmmedia