Mysterious crash

Project history

  1. Previous project: LPG/CNG Price Reporter
  2. last step: Android App for Blackmagic Pocket Cinema Camera 4K
  3. current posting
  4. next step
  5. Next project: designing a chain link tool library

The BMPC4K app I wrote has exactly 1 crash on 2 devices in Play Store.
However I'm completely puzzled by the stacktrace.
It's not made easier by the fact that I can't reproduct the crash since it happens on 2 user's phones that I have no access to.

All my own code is in the biz.wolschon... -packages.
This crash is entirely in the Wear OS library by Google.
I'm using
implementation 'com.google.android.gms:play-services-wearable:16.0.1'

16.0.1 is indeed the latest and greatest version available at this time.
Since Google has obfuscated it's libraries, a search for other people with this issue in that line of code turns up nothing.

It seems to happen at Fragment -creation time. However I'm not using any fragments from GMS. At least I'm not aware of any.
All I can try is to move from the support library 27.1.1 to 28.0.0 with a 28 target SDK. This mandates some unrelated changes. None of them look like they should affect me.

Update: I just came back, tested that the new, public beta version works and uploaded it to Play Store. Let's see if the crash still happens and if so, something shows up in the Stacktrace that hints to a cause this time.



LPG Preismelder Android app updated again

Project history

  1. Previous project: none
  2. last step: LPG Preismelder Android app updated
  3. current posting
  4. next step: none
  5. Next project: Android App for Blackmagic Pocket Cinema Camera 4K

Android 9 will no longer allow unencrypted HTTP communication.
So I had to pull out my old "LPG Preismelder" fuel station app for GPL and CNG fuel stations in Europe.
It is a simple app. It still works fine.
However nowadays Google Play Store no longer allows the old target SDK
and Android Studio does't like the old Build Tools.
So I had to update them and consequently add support for permissions that are no longer granted at download-time.
Also the Google Maps API has changed a lot and it is no longer possible to just ask the Map-Fragment for the map and perform updates (e.g. set the location). All this now has to be done asynchronously.

This did introduce a small number of crashes for rare cases, thus ruining my "max 1 crash per year at 1000 users" record.


  • App on Google Play


Rotacy CNC: That damn earthing again

Project history

  1. Previous project: TravelCNC
  2. previous step: Problem with optical input switches
  3. current posting
  4. next step
  5. Next project: designing a chain link tool library

When I assembled my newest DIY CNC mill on a piece of wooden OSB board... what could you possibly forget?
Wood is not conductive.

Everyhing is build super clean.
Crimped using the proper tools.
Signal power and signal ground distributed using proper DIN rail blocks.
Stepper drivers stronger then the actual power supply, steppers and forces needed.
Strangely enough I machined an entire part in perfect finish for a week before any issues showed up.
Then the A axis stepper starting moving on it's own and jittering. But only it it had already moved before. Not related to the spindle running or not.

Problem 1: wrong power supply

I had way too much power provided to my stepper drivers.
48V supply because the drivers where advertises as 8-50V input voltage.
Actually however where 8-42V with 50V being the absolute maximum rating.
The dealer overstated the capabilities of the driver.

Problem 2: Earthing

This did not solve my problem.
It needed a borrowed oscilloscope to figure out that I simply forgot to connect my giant A-axis gear box, sitting on the OSB base-plate to PE.
The power supplies (not the spindle) for the strong steppers seem to radiate a ton of EMI into the huge metal block that is the A axis. Static buildup from the gears inside and from machining plastic for days on end surely did not help either.
Since the power flowing from the motor to the motor driver caused the "work" LED on the driver to blink, I searched for hours where the supposed stray inputs to the driver came from. Not realizing that this came from the output of the drivers and not the inputs.

I had the same issues already with my Chinese 6040 CNC (all Aluminium but designed with no regard to earthing large metal parts and thus the steppers they connect to).
Seems I had to learn that lesson again.

Parts used


Rant about the 8Sinn cage for the BMPCC4K

I just wrote the following feedback to the very expensive 8Sinn cage for the Blackmagic Pocket Cinema Camera 4K:

I have your Blackmagic Pocket Cinema Camera 4K -cage.
There are 3 features you should definately improve:

1: Access to the locking power socket is nearly inpossible.
Getting your fingers in there is a nightmare even without fighting the cover doors.

2: The cable strain-relieve for the USB-port does not open wide enough to allow
the cable that comes with the Samsung T5 to fit and the expensive Samsung T5
holder did not come with a cable that does.

3: The allen key(s) has no place to store it in the cage itselt.
So it's always missing.
I can't mount my T5 SSD becaue I only have the caged camera with me.
The cable stress relieve on the T5-holder can not be opened without
and it's comes tighened from the factory.
This step should be possible, if not trivial, without easy-to-loose tools.
What's the point of having nice, machined handles if you need an allen
key anyway?
At the very least a laser-marking what size of tool one needs to send
someone to buy for the next day of shooting would have helped.

The cage uses 2 sizes of allen key.
However the SSD holder uses a THIRD size for no obvious reason.
The smaller size, already used in the cage looks like it would have worked just fine
without adding an additional, easy to loose, tool to the mix.

A second hot shoe (maybe as part of the SSD-holder) would be nice,
so I can mount my microphone while having the SSD semi-permanently attached.
(Of cause I can screw in an additional hot shoe. But it would have been nice if this
was something that just works out of the box.)


Android App for Blackmagic Pocket Cinema Camera 4K

Project history 

  1. Previous project: LPG/CNG Price Reporter
  2. last step: none
  3. current posting
  4. next step: Mysterious crash
  5. Next project: none


Minimal start screen while recording...
...while idle...

...and before a connected to a camera.
Very early version of the focus slider.

Android Wear smartwatch.
Selection of some settings values.


I've just written an Android app that is capable of starting and stopping a recording on the Blackmagic Pocket Cinema Camera 4K  (BMPCC4K) and the
URSA Mini Pro (no wireless focus supports on the EF mount version) as well as the
URSA Mini Broadcast.

It can
  • Start/Stop a recording remotely
  • Start and Stop using an Android Wear smartwatch (for Vloggers)
  • display a live timecode, remaining time on storage medium and the most important parameters
  • pull wireless live focus and zoom via touchscreen
  • store and recall 3 combinations of focus and zoom with a smooth transition
  • change parameters - codec, resolution and frame rate (some values not offered yet)
  • edit metadata

I am still adding features.
I plan to
  1. allow syncing the GPS-time of the phone to the camera(s)
  2. allow to start/stop recording on multiple cameras e.g. for multicam interviews. (No idea for a good user interface yet. Proposals?)
  3. Support the Panasonic GH5 / GH4R / GH4 camera via Wifi in addition to Blackmagic cameras via Bluetooth Low Energy
Limitations beyond my control:
  • My idea to also display audio meters will not work because the camera does not seem to send these via Bluetooth.
  • DCI 4K and 4.6K resolutions can not be selected because Blackmagic forgot to define the values in the protocol 
    • Support ticket DEV-144. These will be fixed in a future firmware.
  • Also the camera does not seem to report the selected storage medium correctly.
    • I'm getting a small CFast card to experiment with this.

Stable Releases:

Open Beta Test: (early access to improvements)


Yes, I did put a reasonable price tag of 10€ on it.
That's 20% the price of a power-cable set or 14% of an original Canon-battery or a meal at McDonalds.
Sales tax gets 19% of the shown price (depending on the country) and Google a cut of 30%. So it's just about 6,30€ that actually end up in my pocket to pay for small expenses.

Privacy Policy

(This is required by Google Play Store.)

This app does not collect, use or distribute any kind of personal data.
End of story.


version "1.2.19" (28.12.2018)

  • Minor fix with the record start/stop command to be compatible with more strict Blackmagic camera firmwares.
  • Fixed white on white text for dialog buttons in Android 8
  • Aperture and shutter angle can be controlled
  • Only slots with a card in it can be selected
  • Better fit for slim displays
  • Settings become 2 screens to be less cluttered


  • I finally figured out what I did wrong in decoding f-stop values. Aperture control is coming after the holidays.

Version "1.2.13" (17.12.2018)

  •  Can display and change active storage card


  • On this day I'll hopefully see the very first money from the November sales in Google Play Store. It should actually pay for 35% of my Samsung T5 SSD (without the cage mount) practically required to do anything useful with this camera. The 30% cut for Google after the 19% cut for sales tax is quite heavy. Given my actual hourly wage this side project will never turn any profit in a hundred years but that's okay. It's fun.

Version "1.2.11" (10.12.2018)

  • For Some reason Play Store shows this version as "1.2.1" instead of "1.2.11".
  • I manually fixed the old name still shown in Play Store.
  • Fixed crash on k6000 Plus (Android 8.0) for Bluetooth device with no name
  • Unknown camera models can be reported for addition via email

Version "1.2.10" (6.12.2018)

  • Fixed crash on Pixel 2 (Android 9) when aborting a scan for bluetooth devices in range
  • Nicer display of remaining time on storage medium
  • >M-rate framerates selectable (29.97,...)

Version "1.2.7" (24.11.2018)

  • Yes, on the same day as the earlier 1.2.6.
  • Reverse engineered the storage-related broadcasts. It now displays the remaining time on card slot II.
  • I'm trying to get my hands on a CFast card to try card slot I.

Version "1.2.6" (24.11.2018)

  • I got a new icon drawn by a facebook user. Thanks a lot!!!
  • I also changed the name from "BMPCC4K Record Button" to "BMPCC4K Control" because the app does so much more nowadays"
  • I was able to add entering metadata.

Version "1.2.4" (20.11.2018)

  • Power zoom rocker and a zoom slider added.
  • Also you can store and recall 3 focus+zoom positions now.

Version "1.2.1" (15.11.2018)

  • Yes, on the same day as the earlier 1.2.0.
  • Wireless follow focus slider added.

Version "1.1.1" (13.11.2018)

  • Huge improvements to my Bluetooth Low Energy stage-engine. Searching for the camera(s) is MUCH faster now

Version "1.0.4" (12.11.2018)

  • I figured out how to detect someone on the camera starting a recording instead of starting it via the app (and by extension the case of a recording already running when the app is started).



Rotacy CNC: Problem with optical input switches

Project history 

  1. Previous project: TravelCNC
  2. previous step: Building a rotacy CNC milling machine
  3. current posting
  4. next step: That damn earthing again
  5. Next project: designing a chain link tool library

The situation:

I'm trying to replace my microswitches as end-stops + homing sensors with an optical sensor for homing. (and keep the mechanical switches as end stops.)

I'm using a TCST2103 photointerruptor.
On the Emiter-side I use a 220 Ohm resistor to my common +5V to limit the current.
On the Detector-output side I use a 10 KOhm pulldown.
Emiter and Detector -inputs are on +5V.
Between the Detector-output and the 10KOhm I get my signal.

I meassured my VCC to be between +4.78V and +4.80V with allother loads connected to it.

The signal goes into an AKZ250 USB motion card that works with MACH3 to run my CNC milling machine.

(The sketch also shows the internal logic from the schematics of the USB board. It uses a TLP521-1 photocoupler, a 330Ohm resistor, the mentioned LED and a 4.7Kohm resistor on each input pin.)

 The problem:

When I hit "reset" in MACH3 with the photointertutor not interrupted, everything is fine. The input-LED on the USB board is off and the diagnostics page in MACH3 says the input is not active (high).

When I interrups the photointerruptor, the input-LED goes off and MACH3 says the input is active (low).

HOWEVER: When  I chease to interrupt the photointerruptor, the LED goes on again BUT MACH3 says the input stays active.
Until I tell MACH3 to reset.


I found my 220 Ohm resistor on the (E)mitter side too low.
180Ohm should have been used to reach the nominal 20mA on the emitter LED. 
This way we only get 15mA.

The graph "Fig. 8 - Collector Current vs. Collector Emitter Voltage" in the TCST2103 data sheet shows that this means only about Ic=2mA instead of about 4mA on the (D)etector output side.
(Apparently enough to still light up the red status LED just as bright as the others. These red ones nominally want 16mA but do work with less.)

The TLP521-1 inputs recommends 16mA (max 25mA) but gets 4mA.
This means only 4 instead of more then 10mA on the TLP521-1 output. (The recommend 16mA input would result in 40mA)
So I *guess* from studying just the data sheets, that way too little current get to the digital input that is behind the optocoupler on the AKZ250 USB motion control board.

Update 2:
I found THIS mention and it seems that may pull down resistors may be too large.

Update 3:
Or my 10K pulldown may be too large (correct for 3.3V) for 5V.


Building a rotacy CNC milling machine

Project history

  1. Previous project: TravelCNC
  2. current posting
  3. next step: Problem with optical input switches
  4. Next project: designing a chain link tool library


At the moment I have a heavily modified Carving-CNC/OmioCNC 6040Z+S80 machine from 2012 with an automatic tool changer and an 80mm 4th axis.

However the 80mm chuck and the 150mm clearance below the gantry of the 600x400x150mm machine has proven to be quite a limitation.
Even if you could make your part just barely fit...the next largest standard size of stock material would not.
If the stock could fit, you would not be able to raise your cutter high enough to reach the outher diameter. At least not the electronic 3D touch probe (that is much longer then most cutters).


So the idea was to build a special purpose CNC mill just for parts on the rotary axis.
It does not need a Y axis at all but a chuck with a large diameter on the 4th axis.
I was inspired by the Rotary CNC (movable tailstock) and the Farm OX (horizontal spindle)

  • Use a chinese 130mm chuck with 1:20 gears as a 4th axis.
  • No automatic tool change needed because it doesn't do general purpose work.
  • Use Openbuilds C-Beam with trapezoidal spindles (you can't buy these with ball screws off te shelf).
  • paired with high powered stepper motors for acceleration.
  • Add some end-stops and an electric touch plate for tool-length.
  • Use the existing stepper drivers, Mach4 USB breakout board and power supply of my old, mobile 400x300mm CNC machine.
  • Use either the 2.2KW water cooled chinese spindle with RS485 controlled VFD (left over from the ATC upgrade) or a 200W DC spindle (lightweight and easy to accelerate).

Since the C-beam is trivial to assemble and all the other parts are already here,
this SHOULD be a fairly quick and straightforward build.


...more soon


  1. The long X-axis uses a 1m C-beam ACME assembly with the XL gantry plate and a huge 4.2A stepper motor for maximum acceleration and thus direction-changes.
  2. There is no Y axis.
  3. The short Z-axis on top uses a 250mm C-beam ACME assembly with the extra-long gantry plate.
  4. A secondary X guide-rail in the front with a custom, 3D printed, extra-wide but not extra-long gantry plate stabilizes the Z axis and keeps it square to X.
  5. A 300W DC spindle with ER11 collets is enough for the soft materials this machine will encounter. It is also sufficiently silent. (a major consideration)
  6. Custom, 3d printed mounts for spindle, A-axis and tailstock complete the setup.

Lessons learned

  • Keep the oil-release screw accessible when designing a mount for a gearbox.
  • Openbuilds gantry plates can rotate slightly when presented with some force on a long, sideways lever. So a second, guiding rail and custom wide plates are needed to make the machine stiffer.
  • The Openbuilds ACME screws are performing surprisingly well compared to ballscrews.
  • The worm gear I used was of very bad casting quality and gets very loud in constant rotation. So instead of machining parallel to the A axis, I need to do it parallel to the X axis. This way X moves all the time but A only every few seconds for a short step.
  • Helical toolpathes in my version of Deskproto 7 seem to not render. The issue is being investigated and should be fixed soon.
  • I need to finish the custom mount for the tailstock quicker then I anticipated.
  • During an accidental plunge the modular Z axis proved surprisingly durable and very easy to dismantle, readjust and assemble again.
  • Always check for loose wires to your stepper drivers when things start to vibrate for the first time. ;)
  • My Z axis is too long but I could not get C-beam assemblies shorter then 250mm.

Next steps

I'm currently finishing the soundproof enclosure.

I'm currently adjusting my existing 4th axis, inductive homing sensor to the new 4th axis. At this time I only have home+limits on both linear axis.

I already ordered brushes to separate the axis from the machined parts and keep shavings out of the horizontal Z-axis.

I already ordered a proper guide-rail to replace that silver Openbuilds -contraption. This is fine for some first test-cuts but I don't want to re-tighten the wheels every few weeks.