Skip to main content

Posts

Showing posts from June, 2020

Wakey Wakey - Network Alarm Clock

I repurpose old Android mobile phones (from the KitKat/Lollipop era) to use as alarm clocks in my 3 young kids' rooms. After a while, it gets pretty tiresome syncing up the alarm clocks (eg. when the next day is a public holiday and you want to disable the alarm just for that day so that everyone can get a bit more sleep). I thought it would be pretty cool if I could update all the alarm clocks remotely from a webapp. I couldn't find any alarm clock app that can be remotely controlled on the app store, so I decided to implement my own. For the webapp, I repurposed another project of mine called Shopping Buddy . This turned out to be relatively easy, because it basically involved stripping away features like bookmarks and history, and trying not to break things along the way. It was done pretty quickly, and I called it Wakey Wakey .  The production site can be found at: https://wakey.randseq.org The Github repository can be found at: https://github.com/victor-chew/wakey-wakey Sc

Hacking a USB-C to slim tip adapter cable to charge the Thinkpad T450s

This hack is inspired by this post . A year ago, I bought an adapter cable for my wife's Thinkpad X1 Carbon (2nd Gen) that allows her to power her laptop with a 60W-capable portable battery (20V x 3A). A USB-C cable goes from the battery into the adapter, which converts it to the slim tip output required by the laptop. Everything works out of the box, so I didn't give much thought about it. Recently, I decided to buy a similar cable for my Thinkpad T450s. I know technically it should work because the T450s can go as low as 45W (20V x 2.25A) in terms of charging (though I have the 65W charger - 20V x 3.25A).  I went with another adapter cable because it was cheaper and also I prefer the single cable design. So imagine my surprise when the cable came and I plugged it into my laptop and it didn't work! The power manager just cycle in and out of charging mode before giving up with an error message saying there is not enough power. After much research and reading the Thinkwiki

Important calibration when loading new 3D printer filament

Note to self: The most important calibration to do when loading new 3D printer filament (even if it's the same brand and type, because the formulation may have changed) is to calibrate the extruder steps/mm (also called E-steps/mm). Details of this calibration is given here . The (simplified) steps I take are: Power up the 3D printer and hook it up to the laptop via a USB cable. Install and run a program that is able to talk to the 3D printer via the virtual serial port (eg. Prointerface ). Mark 10cm of filament, starting from the hole where the filament enters the extruder stepper mechanism and work backwards. An extra piece of filament that is measured to exactly 10cm helps here. Use the following G-Code to find out your current E-step value. M503 The current E-step value is the last value ( 96.5 ) on this line: Steps per unit:     M92 X80.00 Y80.00 Z400.00 E96.5 Issue the following G-Code: // Set nozzle temp to 190c. Set to temperature you'd be printing the filament at. M104