Near-Zero Warning function in TouchDRO

ycroosh

Active User
H-M Supporter - Commercial Member
Joined
Apr 4, 2013
Messages
884
Good part of the day,
I'm realizing that Near-Zero Warning function is more broken that I though it was, so let me try to clarify how it *should* work, and what can go wrong.

So the idea is that you can turn it on (on one or more axis output) and as the readout approaches "0". This is very useful when threading on the lathe (internal threading lost the "horror" factor with it for me.
The intended functionality is as follows:
TouchDRO is designed with "working towards zero" philosophy. I.e you would pre-set a dimension and start machining towards zero. As you get closer, the DRO starts beeping with increasing speed. It has five thresholds: 0.25", 0.1", 0.01", 0.005" and 0.001". When the position crosses 0.25", the beep starts slowly and increases to solid tone at 0.001". At least that's the theory.
In practice it doesn't seem to work this way. Unfortunately this has been very hard to track down, since it works reliably on the tablets/phones/chromebook I use for testing (about 15 different makes and models). From what I've gathered, there are two issues:
1. (Simple and common) - Android system uses multiple sound streams: Media, Notification, Alarm, etc. Near-Zero warning use the Notification stream, and if the volume is turned down, you will hear no sound. To fix this, go to the "Sound" settings on your device and increase the volume for "Notifications". This should be all that's needed
2. (Not fixable but uncommon) - TouchDRO uses standard tone generator library that (in theory) is a part of standard Android OS. it's used for things like dial tones, CDMA network tones, etc. According to Google's docs every device should come with. Since it's much more efficient than playing MP3 files, it's the preferred method of making sounds. For some reason, the library is either broken or missing on some tablets. So far only a handful of people ran into this, and the tablets have been non-name Chinese tablets and one model of Asus tablet.
Now, with all this said, I'm rewriting this for V3 (actually spent good chunk of last weekend on it). The functionality will be a bit more refined:
1. Instead of fixed thresholds, there will be a configurable setting for the "start" reading that will default to 0.25" but will be settable from min of 0.1" to as far as you want.
2. The beeps will speed up proportionally the closer you get to 0, will go to solid tone at 0.001", and will chime and stop at 0".
3. If the axis stops moving, the beeps will stop after 1 second and will resume if the motion starts towards 0".
The new implementation is open to feedback, constructive criticism (i'm not fully done with it yet), so please let me know if something feels wrong.

Thank you
Yuriy
 
Hi Yuriy, thank you for the clarifications. My problem seems to be getting the feature set up.

I tried again. What I am seeing is (all on Z axis in Lathe mode)
- I preset a dimension (short press on the axis value), and press the Alarm icon. I hear a longish beep (so I also know that the sound is turned up). The icon is active.
- I exit/close the dialog and move away from that location, and return towards it.
- I am in Incremental mode, not Absolute

No beeping as I approach the preset dimension. If I go and look at the dialog again the Notification button is off.
I am doing this on a Kindle Fire 7", stock out of the box. All of the sound options have medium to high volume set.

I have some internal threading coming up so anxious to get this working :)
Re: new implementation, that method sounds excellent. It allows setting thresholds to suit our style/machine.
 
Thanks for the details. I will try to reproduce this tonight after work.
 
Hi Yuriy, thank you for the clarifications. My problem seems to be getting the feature set up.

I tried again. What I am seeing is (all on Z axis in Lathe mode)
- I preset a dimension (short press on the axis value), and press the Alarm icon. I hear a longish beep (so I also know that the sound is turned up). The icon is active.
- I exit/close the dialog and move away from that location, and return towards it.
- I am in Incremental mode, not Absolute

No beeping as I approach the preset dimension. If I go and look at the dialog again the Notification button is off.
I am doing this on a Kindle Fire 7", stock out of the box. All of the sound options have medium to high volume set.

I have some internal threading coming up so anxious to get this working :)
Re: new implementation, that method sounds excellent. It allows setting thresholds to suit our style/machine.

I can reproduce this on my Kindle, although not the part where it turns itself off. Don't fully understand why, but the tone generator crashes on Kindle, so I'm still digging into it. I will let you know what I find out.
 
Half the challenge with software is reproducing the problem.
 
Half the challenge with software is reproducing the problem.

Sorry for going into radio silence. I think I know pretty well where the problem is, but I don't know what the best fix is. Basically it appears that some devices ship with ToneGeneartor library that doesn't actually do anything. From my app, I can't detect that there is no sound since the library reports that it's there and working. I suspect the reason is that ToneGenerator is really only needed on devices that connect to a cellular network. Since Amazon Fire doesn't, Amazon stripped down the code to save some space. In the next version I will need to add something that lets the user test the sound along the lines of "Did you just hear a beep", and if they say "no", switch to playing MP3 sounds. This is not idea, since MP3 has some delay that I can't control, so I'm not 100% in love with the idea but don't have a better one yet. I will keep you posted if I find a way to work around this in the current version.

Thank you
Yuriy
 
Hi Yuriy I am fully aware of the challenges of software development. I worked with and on computers in various ways since 1965. And wrote GrblPanel, which had some surprising challenges based on unexpected uses. I ended up archiving/shelving that due to increasing effort.

I am happy to wait, it doesn't really detract that much from the usefulness of the app. I might just rig up a micro switch and buzzer in the meantime :)
 
Seems like some Samsung tablets also ship without a working ToneGenerator so it's great to read that you've already found a workaround for the next version
 
Back
Top