Harold Kwok

Harold Kwok

Saturday, 16 September 2017 01:07

Closed Loop Linear Actuator with Arduino

This is a sub-project I worked on for short awhile as a part of a bigger project of building a closed loop 3D printer.  

Common 3D printer use stepping motor to control the linear motion.  The position is assumed by counting the number of steps rotated.  This approach often have alignment issue when the linear motion "skipped steps".  Closed loop refers to measuring the position directly as a feedback, completing the control system.  This design is very common in inkjet printers.  Multiple quadrature optical encoder can often be found in an inkjet printer.  It can be very accurate and cost efficient way to determining the position, and eliminate the needs of expensive stepping motors.  

In order to use the Arduino to directly work the quadrature encoder, the Arduino must be operating in an interrupted mode.  Normal operation of Arduino will be too slow to capture the counting (the Highs and Lows as the optical sensor moving along the encoder).  With the interrupt mode, the Arduino acts more like a RTOS.  Whenever there is a change in the optical sensor input, the interrupt will be triggered and the Arduino will prioritize running counting program first.

Here is product.  I dissabled an inkjet printer and spend a few days to get it working.  It can reach repeatitive accuracy of the quadrature encoder, which is about 0.1mm.




Friday, 18 December 2015 18:37

Vulnerability of Bitcoin by design

Bitcoin is an ingenious invention.  However, it is not without flaws.  Some of them can determine its fate in the long future.  This article will discuss some of those issues.

Tuesday, 24 November 2015 12:07

My Profile & Porfolio




Harold Wing Hei Kwok Phd


Qualification:   Phd Physics - University of Ottawa 2015
Specialization:    Biophyiscs, Nanofabrication, Micro/Nanofluidics, Next-Generation Sequencing (NGS), Nanopore Biosensing
    Material Physics, Computational Atomistic Simulation, Computational Fluid Dynamics, Machine Vision, Machine Learning
Awards & Recognitions:   Faculty of Graduate and Postdoctoral Studies Dean’s Scholarship Award
    Granting of two patents: (WO 2013167955 A1) & (WO 2013167952 A1)
Interests:   Automation with robotics, machine learning & artificial intelligence
    Develop next-generation microfluidics for massively automated bio-sampling
    Crowd-regulated, crowd-policed adacedemia publishing system


Thursday, 05 November 2015 23:59

My Projects and Problems

These are projects and problems I encountered over my life.  Some of them are ongoing (to be finished).  These are my pride and love.  The page was initially meant to serve as a documentary archieve for my-self and my friends.  But I decided to make it public, such that someone like you can by-chance come across this site.  I hope you enjoy these projects as much as I do.  Feel free to leave some comments.

Dreamfactory 2.0 was just released.  It is a powerful and user-friendly REST API backend implementation.  At the time of this article is written, Redhat OpenShift has not yet had a pre-built cartiridge for it.  The latest version it has is DreamFactory 1.9.4.  So, I spend some time and created an automation script on Github.com to install Dreamfactory 2.0 on OpenShift.

Monday, 26 October 2015 21:07

{ RESTful } API Web App for mobile

I am trying to create a web app as a backend service for my mobile app.  This is an experimental project with no budget.  So, my aim is to host the web app with minimal cost while using the most convenient and promising open source technology.

Saturday, 17 October 2015 21:58

Is there real randomness?

This article presents a comtemplation on the nature of reality from the point of view of a physicist, begins by addressing the question of "Is there real randomness?", 

Wednesday, 21 January 2015 04:36

Dugu Chessboard

Dugu chessboard is a puzzle chessboard I came across at grade 10.  It is a suprisingly interesting mathametical problem.  Here present two independent solutions formulated by me.  Examine closely the two solutions yield another hybrid solution that is extremely simple.  A detailed discussions on these solutions are presented.


Visons and insights are the elementary building blocks of human civilization.  Discussion and propagation of ideas makes a difference to the world.  This page dedicates to outline my thoughts and ideas.  Feel free to leave some comments, I will be more than happy to start a discussion with those who are interested in these topics.

List of articles

No result...