Soemarko Ridwan

iOS & Web Developer ⟡ Coffee Addict ⟡ Scuba Diver

Tiny Touch (the smallest DIY Z-probe) for Anet A8
Tiny Touch (the smallest DIY Z-probe) for Anet A8

I made a thing. Well, I remix it, all credits should go to the original creator.

Bill of Materials (BOM)

  1. Printables, one of everything, body, flag, cap, and mount. While technically the cap is optional, I measured the mount with the cap on. You can also use a slightly longer M3 screw.
  2. Optical endstop (Aliexpress) — It’s cheap, nothing wrong with getting spares as you’ll need to de-solder it.
  3. Tiny linear servo (Aliexpress) — R (right) version. I got a pair, local shop sells it as pairs. I think you can get away with L version if you just mirror the body, and possibly flip the servo angles.
  4. 4 M3x12 bolts.
  5. 2 M3 nuts.
  6. 1 M3x20 bolts.
  7. 3 tiny screws. Like the ones for glasses, I use spare iPhone repair screws.
  8. 1m of 4pin wire. LED strip wire like this one works really well. I’ve tried USB cable on my previous z-probe too, too thick and stiff for my X-axis chain.
  9. 1 female 3pin JST-XH connector (2.54mm pitch). Though getting a pair can be useful for testing while working on this.
  10. 1 pair (male and female) of 4pin JST-XH connector, or 4pin Molex, or anything 4pin with 2.54 pitch really. I use molex cause that’s what I have in my spare box.
  11. 1 pair (male and female) of Dupont connector.
  12. Optional: spare LCD cable, incase you fucked up cutting the 3rd wire. It consist of 10pin ribbon cable + 2 10pin IDC connector, if you want to get it as parts.

The Probe

Tiny Touch

Once everything is printed, it should be easy to put everything together;

  1. Plop the flag into the body front.
  2. Screw the M3x20 to the bottom of flag.
  3. Pop the cap onto M3x20.
  4. Screw in the optical endstop above the flag.
  5. Screw in the linear servo from the bag with the tiny screws.

The flag should move smoothly up and down. The servo is tiny and weak. Any snags will stall the motor. File down wherever it snags. I also add a little bit of electrical tape on top of the flag to make the flag more flaggy (?). I find that without the tape, the flag is not forward enough. The flaggy flag will cut off all of the light for the endstop.

The original recommends using neodymium magnets or spring, I just use gravity. I’d rather not weigh the servo beyond the weight of the flag and screw.

Next you need to de-solder the 3pin JST-XH on the endstop, and soldered in the 4pin connector (some bending of the 4th pin may be needed). And splice the power to the servo. As usual, black to G; red to V; and white to the empty pin.

The cables

LED cable

If you use the LED strip wire like I do, it’ll be nicely color coded. Black for ground (G). Green for endstop signal (S). Red for 5V (V). Blue for servo signal. Straight forward crimping for this end.

Anet A8 board S_Z pin-out

The other end, crimp blue with one of the Dupont connector ( I use female because the JST connector for the other 3 pins are also female). The JST connector is a bit trickier because it only goes in one way and the crazy way of Anet board aligning things. So for this connector, following the pin out diagram above, with the hooks at the bottom, you crimp in black - red - green.

LCD cable

Next is the LCD cable, this one is easy but also easy to fuck up. Count to the third wire from red, separate it from the ribbon, cut it, and crimp in the male Dupont connector. ez pz.

Test and Confirm the Build (optional)

If you have a spare Arduino lying around, you can use this tiny-touch-test.ino to test and confirm your build. You can just look at the code for the pins connection.

Like in this clip, pop open the Serial Monitor and type in s to stow, and d to deploy. The internal LED should correspond with the endstop, the LED on Arduino turns on when the flag is up.

The Configuration.h File

#define Z_MIN_ENDSTOP_INVERTING false  // set to true to invert the logic of the endstop.
#define Z_MIN_PROBE_ENDSTOP_INVERTING false  // set to true to invert the logic of the probe.

#define Z_PROBE_SERVO_NR 0   // Defaults to SERVO 0 connector.
#define Z_SERVO_ANGLES {160,30}  // Z Servo Deploy and Stow angles
// please test and find the angle that works best for you.

#define X_PROBE_OFFSET_FROM_EXTRUDER -24   // X offset: -left  +right  [of the nozzle]
#define Y_PROBE_OFFSET_FROM_EXTRUDER -47   // Y offset: -front +behind [the nozzle]
#define Z_PROBE_OFFSET_FROM_EXTRUDER 0   // Z offset: -below +above  [the nozzle]
// again, break out your ruler to confirm. do the Z in the final tweaks step

#define Z_MIN_PROBE_REPEATABILITY_TEST // if you want M48 enabled


// Sensor at the front-left

#define LCD_BED_LEVELING // nice to have


#define NOZZLE_PARK_FEATURE // if you enabled the advanced pause in Configuration_adv.h file

#define SLIM_LCD_MENUS // need this so the firmware would fit into the board

#define NUM_SERVOS 1


Final Tweaks

You need terminal access to the printer, either the terminal tab on OctoPrint, or connect the printer to your computer and use Printrun. You should the these following steps.

  1. M280 P0 S[angle] ; Test the servo angles. In my case, I use M280 P0 S160 to deploy and M280 P0 S30 to stow.
  2. M119 ; While doing step 1, confirm the Z endstop status by sending It should return open when deployed, and TRIGGERED when stowed.
  3. M851 Z0 ; Reset the existing Z-offset to zero. It should already at zero if you just flash your firmware, but just to be 100% sure.
  4. G28 ; Home all, or by clicking on the button.
  5. G1 X110 Y110 Z0 ; Move everything to center bottom
  6. M211 S0 ; Disable software endstop, so you can go below Z0
  7. Now slowly move the nozzle down until it barely touching the bed (do the paper dance).
  8. Look at the LCD, and take note of the Z value. For example its -1.2
  9. M851 Z-1.2 ; Set the Z offset
  10. M211 S1 ; Enable software endstop
  11. M500 ; Save settings to EEPROM
  12. M501 ; Load EEPROM
  13. M503 ; Confirm settings (unless you have this disabled)

Now, jump back to the Marlin’s Configuration.h file, set the new Z-probe offset value #define Z_PROBE_OFFSET_FROM_EXTRUDER -1.2 and save it. This way you don’t need to do this section again if you need to flash the firmware for other reason.

Finished! Also remember to add G29 ; Auto Bed Leveling right after G28 in the starting gcode of your slicer.

Bonus: after you made this, I highly recommend replacing the spring bed mount to a solid bed mount.

Anet A8 (3D Printer) Review: One Year In
Anet A8 (3D Printer) Review: One Year In

tl;dr Despite of all of the drawbacks, this is a tinkering man wet dream. Probably the best kit to learn things about 3D printing itself.

Last year I bought myself a 3D printer. I did my usual homework. Look for reviews, ask people who already own one, compiled a list and compare those to what’s available here in Jakarta. Because my original plan was just to dip my toes in and see if it’s something for me, back then, anything below $1000, will be a kit that I need to build my own. Pretty far from a 2D printers. So local is important, if I fuck something up, I can get parts fairly quick.

Back then, Anet was on the top of the list. It’s the cheapest one on the market, and very upgradeable. Turns out, the upgrades were necessary, not optional. Now if you punch “Anet house fire” into google, you’ll get plenty of results. The A8 has literally burn a house down, and many has fire started around the main board area. I guess I lucked out with mine.

At this point, many Anet A8 owners will not recommend this to other, neither will I. You can call this sunk cost fallacy, but man it’s so much fun “upgrading” the A8. At the beginning, I was a 3D printer virgin, I tried to watch some youtube vids, but many of the words just fly over my head. I don’t even get what they’re talking about. So I just pull it out of the box, and just follow the instruction to build it. It’s like building a pretty complex IKEA shelf.

Built it, test run, and immediately scratch the heated bed. Because the instruction for the bed leveling sensor were completely wrong. Pull the sensor out, switch back to button end stop. It was more practical, and made sense in my head. I can’t even begin to debug the sensor right? Not much to do but to go back to the button, at least I can get my head around that, Z axis goes down, hit the button, and stop. That’s the lowest point of the printer. After that, I start printing things. Mostly scuba accessories. Goodman handle, GoPro trays.

Anet Fire Hazard

Funny thing, after I got OctoPrint up and running, it’s when I learned that the Anet is a fire hazard. Learned that I need to upgrade to Marlin firmware, but when I tried all the suggestions I found on reddit, none were successful. So I just suppress the fire warning, and kept on printing on stock hardware and firmware.

Until at one point, the nozzle was clogged. I pull it out, dunk it in acetone (best part about printing ABS, acetone is the almost cure all solution), and put it back on, turns out, I put it back way too loose, plastics come out off from the side of the nozzle. It’s now stuck on, and I can’t print anymore. Can’t even take it out to clean again. Stop printing for awhile.

Until a few months ago, all of the sudden things just clicked in my head. I need to heated up the nozzle, and just use proper tool to undo the nozzle. Clean it up, put it back on real tight this time. Everything went great. I even print better than ever. Got the thing I needed to upgrade the firmware. And then I start looking into things to Anet A8 modifications / upgrades. There were a lot of things. I started printing all those printable upgrades, ordering mosfets, new hot-end, and the extruder upgrade kit. Everything is coming on a slow boat from Aliexpress.

Bottom line, I love mine, but ultimately it comes down to this, are you a responsible person who loves to tinker? Do you want to play with the printer or do you just just want print trinkets from thingiverse? Cost aside, the answer to these questions should show whether you should get the Anet A8 or not.

iOS Package Manager: Carthage or CocoaPods
iOS Package Manager: Carthage or CocoaPods

Preamble: I have wrote a lot because I've been tinkering (read: breaking and fixing it back) my 3D printer. And I've just returned from my scuba diving trip to Komodo, which was out of this world. That and I'm also furiously looking into Swift UI without installing any of the beta OS. I never installed any of the beta software unless I have to.

The short answer is neither.

Package manager has been an interesting project in recent years for shippable products. In the beginning it was a brilliant way to get a tool or software installed on your preferred linux distro. For the shippable projects, I believe it was popularized by npm (Node Package Manager) for NodeJS, then others follow suit; Composer for PHP, Gradle for Java etc.

My love and hate for package manager begins and ends with npm. When I was learning NodeJS, I thought how brilliant is this npm thing?! And not too long afterwards, I realized how stupid it was to publish and rely on someone else's code without even looking into it. Glad I didn't have to learn it the hard way. I understand that the codes were open source. But I never personally check on them. And what happens if the dev decides to abandon, or literally pulled it under you? Can you make it yourself to just restore your app back to the original state?

Now back to the question I propose in the title, just so you guys understood the difference; Cocoapods builds the dependencies when you build your project. Including cocoapods means you have to use a workspace with all of your dependencies added as separate projects in the workspace, and anytime you make a clean build (or archive) you have to rebuild them all. Carthage checks out the source code and builds the frameworks independently of your project. You then add them to your project and include a script to copy them in properly. It's a much more desynchronized process.

If I have to pick, I'd pick Carthage, but again, seriously, neither. SPM (Swift Package Manager) is interesting, but very unlikely to be available for the framework or library you'd want to use. I once was offered to inherit an app that won't compile anymore, it had more than 30 "pods" in the project. Nope!


@businessbillions is missing the big picture here.

  • Netflix did not kill BlockBuster. Streaming did. IIRC, BlockBuster along with Redbox were doing just fine when Netflix were a mere mailed-DVD subscription service.
  • Uber did not kill the taxi business. Taxi is on a decline ever since Uber, but that's because Uber is suffocating themselves by staying in the red even after IPO. So, Uber did not kill the taxi business, Uber is killing themselves.
  • Apple did not kill the music industry. In fact, music industry was doing better than ever. Spotify on the other hand is on their way to kill the music industry by paying the artists pennies on the dollar.
  • Amazon did not kill other retailers. In fact retail business as a whole is growing, many jumping on Amazon bandwagon. Amazon only killed Borders along with other bookstores.
  • AirBNB isn't killing hotel industry. Again, hotel industry is growing along with AirBNB due to the growth of travel industry in general. The conclusion at the end there, "Not being customer-centric is the biggest threat to any businesses." Come on, name any other businesses that are more customer-centric than hotel industry. In fact, hotels are waaay more customer focus than AirBNB.

Best of WWDC 2019 for iOS Dev
Best of WWDC 2019 for iOS Dev

… well, for me. the “IMHO” implied.

  1. Sign-in with Apple

This is huge, yuuuuge. I friggin hate accounts. Managing user account is a necessary evil for a long time. On the server side I need to handle a lot of things, this was even before GDPR. Sign-in with Twitter / Facebook kinda alleviate this a tiny bit, but normal implementation still requires the “sign-in with your email”. Sign-in with Apple felt more complete, and definitely more than enough if your app is iOS only app that requires a little bit of server integration.

  1. Project Catalyst

a.k.a Marzipan, honestly, I prefer Marzipan as the name. I’ve posted my thoughts about this. It’ll be an exciting time for Mac Apps ecosystem soon enough.

  1. SwiftUI + Combine framework

I never was a fan of Storyboard, or even _xib_s. But this, this felt like a native RxSwift. There were issues when I was playing around with RxSwift, mainly I was hitting a wall that wasn’t clear whether the problem were coming from RxSwift or Xcode. So back then (about a couple years ago), I decided to just use plain Swift. Which served me well on many jobs / projects that coming my way. I get to mix it up with Obj-C. And many libraries were updated for Swift only implementation.

Those are my top 3. Bonus: WWDC 2019 Art Wallpaper.

Slimming the Web
Slimming the Web

Jeff Atwood, of StackOverflow, thoughts on Pi-hole;

We simultaneously have a very real web obesity crisis, and a looming crackdown on ad blockers, seemingly the only viable weight loss program for websites. What's a poor web citizen to do? Well, there is one thing you can do to escape the need for browser-based adblockers, at least on your home network. Install and configure Pi-Hole.

Basically the same post as mine. I still believe that dietpi is the simplest way to go. And it is headless by design. You can just tuck the Pi somewhere behind your router.

The Five Stages of Developing a New App

Source. This is so true.

  1. Curiosity
  2. Excitement
  3. Productivity
  4. Despair
  5. Polish
  6. Ship

Despair is the worst. I've abandon many apps during that stage.

Sidebar: I listen to many podcasts. I have a few that I have to actively listen to, like ATP, and Hello Internet. I use a different app on iPad for mostly NPR podcasts, these are just for getting me to sleep. Under the Radar is one of those that I subscribe to, but I don't really listen unless I have nothing else to listen to. But I'm glad that I listened to this one.


I want one. Sweet and short post :D

But really, I have been a huge fan of Panic ever since Coda 1, which I pirated way back when I was in uni, on my first ever MacBook. Immediately purchased Coda 2 from the very first Mac AppStore. It is still my go to app for web / (s)ftp needs.

If nothing else, for me, Panic represents quality. Their products imbued with everything that reminds me of Steve Jobs era Apple. Firewatch was a beautiful game. And I have no doubt Playdate will have games of similar quality.

That said, I can't afford one. Not yet. I've been hunting jobs for a few months now with zero luck. At $150, it's not breaking any banks, just that I without income, I can't justify a gaming device. As of today, there are 70,000+ people on the wait list. I hope that I got a chance to get one.