DMM Tab - Android DMM Utility - Page 1
Forum section: electronics / testgear

author: Harvs
author_rank: Super Contributor
timestamp: November 21, 2013, 11:36:23 am
content: This is a project I'm working on at the moment, provide support for DMM's through an Android device, over Bluetooth, and eventually TCP/IP.It was discussed briefly in another thread, however that thread had at least 3 different projects in it, so I thought I'd break it out.Here's a brief overview of where I'm at now.A significant amount of background code has been written, so I'm now starting to focus on producing UI pages to work on the data samples.Please feel free to give me any thoughts. Probably within the next week or two I'll release an alpha version on Google Play.I'll include support for a "generic" device that just receives ASCII serial stream, so it can be used on simple projects (e.g. Arduino) that don't have a specific handler coded into the program. That said, I'm keen to support as many DMMs that I can, but it's limited by the physical availability of the devices. Next up will be the Agilent U1241 since that's sitting in front of me.

author: Harvs
author_rank: Super Contributor
timestamp: November 21, 2013, 10:54:49 pm
content: Quote from: mojo-chan on November 21, 2013, 02:17:52 pmThanks, appreciated. However, being that the 34410A is a LAN LXI based instrument, it'll be further down the list. I'll deal with the low handing fruit first, like from what I can see, the 34401A it'll pretty much work with as is at the moment (with it in print only mode.)

author: BravoV
author_rank: Super Contributor
timestamp: November 22, 2013, 12:45:52 am
content: Great potential, subscribed.Fully aware this is a very early build, is there any plan to add the chart feature either offline or online (real time) ?Thank you for sharing this.

author: denneyaa
author_rank: Unknown
timestamp: November 22, 2013, 01:00:03 am
content: I find this to be an awesome project. I can't wait to see where this goes.

author: Marco
author_rank: Super Contributor
timestamp: November 22, 2013, 01:03:18 am
content: Quote from: Harvs on November 21, 2013, 11:36:23 amThe UI pages are dynamic HTML?

author: Six_Shooter
author_rank: Regular Contributor
timestamp: November 22, 2013, 01:45:58 am
content: So what's the point?Why wouldn't you just connect the meter to the PC, instead of giving yourself extra steps between?What advantage does this have?

author: Harvs
author_rank: Super Contributor
timestamp: November 22, 2013, 02:30:53 am
content: Quote from: BravoV on November 22, 2013, 12:45:52 amYes, already did that in another quick version I built, but now I'm doing it properly. It can take a surprising amount of time to fine tune an app to behave the way you think it "should" (i.e. how google encourages/dictates all apps should behave.) All charting will be real-time, otherwise you may as well take the samples to a PC and chart them.Quote from: Marco on November 22, 2013, 01:03:18 amNope, it's all native Android. So XML layout descriptions with Java doing all the dynamic stuff.Quote from: Six_Shooter on November 22, 2013, 01:45:58 amOk, so the point is not to have a app to record data from your meter, that's just a single feature. The idea is to add lots of tools to your meter. The first page I've shown in the vid is the most simple, but as a starting point I'm implementing all the features that's on the 34461A (trend view, histograms etc.) Hopefully it will become a bit more clear as I get further down this road.

author: BravoV
author_rank: Super Contributor
timestamp: November 22, 2013, 02:44:26 am
content: Quote from: Harvs on November 22, 2013, 02:30:53 amJust a thought, check out Agilent's similar Android app for their bluetooth enabled DMMs, may be you could "steal"some few ideas from their implementations. Also my personal request, no biggy though, just a minor one that could be implemented once this is fully cooked, please consider a night mode (dark background).

author: Harvs
author_rank: Super Contributor
timestamp: November 22, 2013, 04:46:54 am
content: Quote from: BravoV on November 22, 2013, 02:44:26 amI didn't realise they had one. I'll have to check it out, thanks.QuoteNo problem. That's very easy to do in Android. It's funny, compared to say writing a windows application, somethings are painful, but other things like this are a piece of cake.

author: Harvs
author_rank: Super Contributor
timestamp: November 22, 2013, 09:56:43 am
content: Quote from: mojo-chan on November 22, 2013, 09:35:42 amNope, at the moment I'm using bluetooth with a serial to bluetooth adapter on the DMM. It'll all be wireless, I see no reason to pursue dealing with USB on Android, it's just not worth the effort in this case.However, it was always my intent to do it via TCP/IP as well. I've had experience programming SCPI over TCP/IP with Android, it's not too bad but it will require a bit of time. I want to get at least one version with a good portion of UI complete before I take on LXI/VXI as well.

author: Stonent
author_rank: Super Contributor
timestamp: November 22, 2013, 10:15:33 am
content: Should be fairly easy to add support for Radio Shack / Micronta / Metex / Craftsman serial port multimeters. They use a very simple 7 bit text protocol. The end user may need to level shift it up though. I wonder if the BT to serial adapters can do 1200 7,N,2 ?http://www.linuxtoys.org/dvm/dvm.html#ProtocolCode:ProtocolIt looks like the DMM uses RTS and DTR to power the serial port. DTR needs to be set to +12 volts and RTS must be set to -12 volts. The port should be configured for 7 data bits, no parity, and two stop bits (7,N,2) at 1200 baud. Take a reading by sending a "D" character to the DMM and then read characters from the serial port until a carriage return is found. The format of the returned data is a 13 character line terminated by a carriage return.Byte) 12345678901234Ex.1) DC-1.9999 V CREx.2) 1.9999MohmCREDIT: Just found out some of their RS232 multimeters are 1200Baud and some are 600. Here's example BASIC source code from Radio Shack to pull a reading:http://support.radioshack.com/support_meters/doc57/57104.htmCode:10 OPEN : "COM 1 : 600, N, 7, 2, RS, CS, DS, CD" AS #220 A$ = "D"30 PRINT #2, A$40 IN $ = INPUT $ (14, #2)50 PRINT IN $60 CLOSE #270 ENDAnd... Found Sears sold a Craftsman brand mutimeter that also used the same software as the Radio Shack ones.And... More info on the protocol as well as some other serial meters protocolshttp://sigrok.org/wiki/Multimeter_ICs#Metex_14-byte_ASCII

author: Harvs
author_rank: Super Contributor
timestamp: November 22, 2013, 10:50:16 pm
content: Quote from: Stonent on November 22, 2013, 10:15:33 amYep looks very easy from a protocol standpoint. I've been using RN42 BT modules, and they go down to 1200 bps min. The HC05 modules, which is what I expect most people will end up using (i.e. the cheap ones), look like they only go down to 4800baud. Neither support 7N2 specifically, but that's just the same as 8N1 with the last data bit always set isn't it? Either way, this could well be case for adding a small uC between the meter and the bluetooth adapter, either that or some more research would need to be done on what modules could support as low as 600baud.All of the UART stuff is completely set in the module (and is configured using AT commands), so doesn't make any difference to the tablet app, the actual protocol would be very easy to parse.

author: quantumvolt
author_rank: Frequent Contributor
timestamp: November 23, 2013, 04:22:44 am
content: @ HarvsSubscribing.

author: Harvs
author_rank: Super Contributor
timestamp: November 23, 2013, 04:45:40 am
content: Quote from: quantumvolt on November 23, 2013, 04:22:44 amThanks mate, sorry for stealing your project

author: Stonent
author_rank: Super Contributor
timestamp: November 23, 2013, 05:07:29 am
content: With these modules that you're using, are you just using a MAX232 or similar chip with them, or is there any other hardware involved?

author: quantumvolt
author_rank: Frequent Contributor
timestamp: November 23, 2013, 05:33:21 am
content: Quote from: Harvs on November 23, 2013, 04:45:40 amNot at all. I am grateful that you do and share the work (ideas are cheap - actual implementations are rear). I have too many projects as it is. Also my knowledge of this stuff is very basic (which I have admitted publicly several times).Excellent work. Keep it coming

author: Harvs
author_rank: Super Contributor
timestamp: November 23, 2013, 07:35:50 am
content: Quote from: Stonent on November 23, 2013, 05:07:29 amYep exactly, a max232 then into the module. You can buy a complete adapter from RS232 to bluetooth from ebay for $60 that's all neat and enclosed. But I thought that was a bit steep, given a HC05 module is about $6 and $2 or $3 for a MAX232 and caps. That being said, for those that just want an off the shelf solution, it will work fine.

author: quantumvolt
author_rank: Frequent Contributor
timestamp: November 23, 2013, 07:59:10 am
content: Quote from: Harvs on November 23, 2013, 07:35:50 amThat's what I bought from fleabay. I was wondering why you suggested the expensive 'enclosed module with antenna'. Nice to know that the cheapo stuff gives the same result.

author: Harvs
author_rank: Super Contributor
timestamp: November 23, 2013, 08:03:47 am
content: Quote from: quantumvolt on November 23, 2013, 07:59:10 amYes the result is exactly the same. I just suggested both options. I know many people would prefer to simply buy one of these converters off the shelf complete rather than build their own.

author: Harvs
author_rank: Super Contributor
timestamp: November 25, 2013, 07:23:28 am
content: Update 2:Attached a screenshot of the line fill option enabled as I forgot to include that in the vid.

author: BravoV
author_rank: Super Contributor
timestamp: November 25, 2013, 07:52:15 am
content: Nice update, another suggestion on the "Buffer", provide user with two selectable options which are circular or flat, where in circular mode, data acquisition will never stop and keep running in circular, while at flat mode, acquisition will stop once its full.Btw, is it possible either in BT or Wifi mode to connect to more than one device ? This will be useful like using two DMMs to log volt and current concurrently, and with some minor tweak at the chart, and voila, wattage graphic chart.Just a wild thought.

author: Harvs
author_rank: Super Contributor
timestamp: November 25, 2013, 08:08:46 am
content: Quote from: BravoV on November 25, 2013, 07:52:15 amYeah this is one I haven't worked out exactly what to do with yet. The problem is, obviously RAM itself (but there's quite a bit on a modern Android device), but also some of the calculations to generate statistics and the charts have to work on the complete dataset every update (well at the moment they do, but there's clearly some room for improvement in the algorithms.) So it makes sense to limit the data held in RAM. So what to do when it fills... I guess I'm leaning at the moment towards spilling over into another small buffer (say 50-100 points) then appending that to a non-volatile file as it fills. That way, in theory, you're unlimited in the amount of data you collect. But I haven't yet nutted out what would be the best HMI for this to all work.QuoteYes, it's an underlying property of both protocols. And this is version 2 of the app already plannedIt was always my initial plan, there's still remnants of it within this app, e.g. I haven't remove the title "Selected Devices". But I thought it was worth getting one version of it out there door to get some feedback on usability. All the background code is built to hold multiple connections, so it won't be a huge change to support multiple devices and perform x-y plotting and calculations involving devices (e.g. efficiency.)

author: Harvs
author_rank: Super Contributor
timestamp: November 26, 2013, 04:33:42 am
content: I've been bashing my head against this bluetooth connection issue. It's been taking sometimes up to 4 or 5 tries to get the bluetooth stack to connect. But my previous quick test app I made never had an issue, so I always assumed it had something to do with how I was holding onto the bluetooth adapter across multiple activities (in Android, each page is its own activity.) Anyhow I was browsing for solutions on the net, turns out the Nexus 7 has lots of complaints about bluetooth connection speed.So I went back to trying the app on my old Acer Iconia A500, which is what I developed the previous app on, and not a single problem. So turns out all the issues are with the tablet, not my app... Well that was a time waster...

author: Harvs
author_rank: Super Contributor
timestamp: November 26, 2013, 04:44:53 am
content: So anyone on here interested in being involved in Alpha testing? It's still all a bit rough looking at the moment, idea will be to start getting feedback on what features are needed and/or not needed.The way alpha testing works with googleplay is I'll setup a google group, which people join, then I import that into googleplay, then send out a URL which each individual needs to "opt-in", and from there the alpha version will be available within those peoples GooglePlay store. It's all a bit long winded to setup, but it allows pretty neat roll out features. E.g. if someone suggested a feature that would be good, I could add it to the app, upload the new APK to the developer console and everyone's alpha version would automatically get upgraded (or they'd get propted to upgrade anyway.)But for this to work, I'd need to know what DMMs you'd have to connect it to, so I can get some decoders sorted. No point trying to test an app that does nothing because it doesn't support your hardware.

author: jmcdonald
author_rank: Contributor
timestamp: November 27, 2013, 03:07:42 am
content: I would like to do Alpha testing I have an Android tablet a Digitech QM1575 and an Agilent U1233A DMM with the IR to Bluetooth Adapter. What extra gear would I need for the Digitech QM1575 and will the Agilent U1177A Adapter work with your software?Looks like a great App.

author: Harvs
author_rank: Super Contributor
timestamp: November 27, 2013, 04:09:24 am
content: Quote from: jmcdonald on November 27, 2013, 03:07:42 amThanks appreciated.QuoteThe QM1575 is setup from a decoding point of view, but the meter doesn't use bluetooth as its radio. Two options you've got, firstly I'm currently working on connecting over IP, so you can plug the adapter that comes with the meter into a PC and use something like realTerm to re-transmit the data over wifi to socket (or maybe a dozen lines of Python). At this stage, that's probably the best option because you don't have to buy anything. If you want to, you can then add bluetooth into the adapter like I have:http://www.electronicsinoz.info/extech-ex540-digitech-qm1575-adding-bluetooth/QuotePersonally I've got a U1242, and have ordered the U1177A from Farnell yesterday. If it turns up by the weekend I'll hopefully have that protocol included in the first release of the app. Now the protocol seems pretty simple from some web searching, and the U123x and U124x seem to be the same protocol. So we'll see how that goes... But you wont need any additional hardware for this to work, it's simply a softwarae protocol issue.

author: Harvs
author_rank: Super Contributor
timestamp: December 02, 2013, 04:07:06 am
content: Support for Agilent U12xx added.I've only tested it on the U1241B, however I'm only using the SCPI commands to pull readings from the meter, so hopefully all the other U12xx meters will be the same.This isn't in any of the available Agilent documentation, so we'll see.

author: Harvs
author_rank: Super Contributor
timestamp: December 02, 2013, 08:19:51 am
content: As I only got one response for formal Alpha testing, I'll skip all the formalities and just drop the package in here for anyone who would like to give me some feedbackTo install an .apk NOT from Google play, you need to go into Settings>Security then check "Unknown Sources".Then get the file onto the device however you want, and open it. You might find it easiest to unzip it on a normal PC and email it to yourself, then just open it from the email.If you don't currently have a file manager, I'd recommend ASTRO file manager, it's pretty good.You need to pair with your BT device prior to opening the app through the BT settings, otherwise you won't see it.When you uninstall the app, it will remove any preferences with the app, however it won't touch any data you've saved.Note: This is a first Alpha version. It will look best on a 7" tablet, and OK on a 10", however I know it looks fairly crap on a phone...At this stage I'm really interested in what features you'd like to see. I know it'll have some minor bugs (but nothing should be too bad.)Devices supported in this release:-Agilent U12xx with BT adapter (I'd like to know if you've got something other than a U1241, and whether it works or not)-Escort 3146A-Generic serial meter, this can be anything that puts out readings as a serial stream with the following format:Code:ASCII reading + <LF> (Insensitive to what combination of LF and CR, as long as a LF is present, i.e. 0x0A)e.g.-1.245E-03 + <LF><CR>

author: Harvs
author_rank: Super Contributor
timestamp: December 03, 2013, 01:10:31 am
content: Updated attachment.- Added dark theme (as requested by BravoV), selected from the global pref menu (actually this looks pretty good, maybe it should be the default.)- Added some workarounds for the piss poor implementation of the bluetooth stack on Samsung S2 & S3 (and maybe other Samsung devices.)- Fixed a file writing issue relating to the different implementation of date/time strings on different devices.- Changed the alert tone for the limits function from a phone defined tone to a application tone (stops it being different on every device.)- Made some basic changes to the views for use on phones. Looks half OK on the S3. Still needs dedicated layouts for phones, but will do for Alpha testing.

author: quantumvolt
author_rank: Frequent Contributor
timestamp: December 19, 2013, 03:52:35 am
content: Hi Harvs.I found an Escort 3146A DMM for USD 100, and since it showed 5.0001 V for my voltagestandard.com 5V Ceramic DMM-tester which is now 5.00053 on the 34401A - I bought it. (I had the wits to bring the ref with me in my pocket to Bangkok - traveling ref.The meter looks almost new - and now I see that it has Dual display and also is used for an Agilent low end DMM and has a lot of odd documentation and threads. So I am happy with my impulse purchase.I had never heard about the brand, but see that you and some other members have it. I don't have time to test the RS232 output or Bluetooth now (work is the only thing that feeds my children, so must come before hobby). Does it give more digits and or dual display? Anything else I should know about the meter?Thanks.

author: Bored@Work
author_rank: Super Contributor
timestamp: December 19, 2013, 06:30:40 am
content: Quote from: quantumvolt on December 19, 2013, 03:52:35 amAgilent bought Escort and used them to build their low-end meters.

author: Harvs
author_rank: Super Contributor
timestamp: December 19, 2013, 07:18:43 am
content: So the Agilent 3402A is what it's called now. However they are a fairly low end bench meter. I've found it useful over the last couple of years. I think what you paid is probably pretty good for the condition, but I wouldn't expect them to go for much more.The only real thing to be aware of is it's 10M input on all voltage ranges (at least I think it is, it certainly doesn't have a high impedance up to 10V).On this thread from ages ago I discuss the cal from the front panelhttps://www.eevblog.com/forum/chat/escort-3146a-manual/No more digits, but yes you can get the reading off the second display. However, the command set is very limited, there's no way of knowing if a new reading is complete unless you're in print only mode. Therefore that's what I've used in the Android utility.BTW I'm currently off drinking bier in Germany, so I'll be carrying on with development of the utility in Jan when I'm back.

author: quantumvolt
author_rank: Frequent Contributor
timestamp: December 19, 2013, 09:25:22 am
content: Thanks. Happy cold (ice?) biergarten probing. And Happy Holidays to all ...

author: Flipp
author_rank: Contributor
timestamp: December 28, 2013, 12:06:46 am
content: Why the QM1575 alias DT-9939 or EX540 is gone in the latest release? Is its protocol now covered by the generic meter choice?Flip

author: Harvs
author_rank: Super Contributor
timestamp: December 29, 2013, 05:43:40 pm
content: Quote from: Flipp on December 28, 2013, 12:06:46 amNo I need to add it back in. I found a bug in it that I need to sort out, but didn't get the chance before leaving to drink beer. Anyhow, I haven't had any feedback whatsoever about any of the alpha releases I put up here, so I will probably just carry on with it and put it on GooglePlay when it's finished and forget about the whole alpha/beta release.

author: Flipp
author_rank: Contributor
timestamp: December 30, 2013, 09:24:54 pm
content: So far i gave a brief look into it. It runs fine on my Nexus 7 2013 (KitKat) and on Galaxy S4 (JB.4.2.2) But no decent way to get Data into it since I have no decent Bluetooth meter but a DT-9939 wich i will modify with Bluetooth.

author: Harvs
author_rank: Super Contributor
timestamp: January 01, 2014, 09:42:39 am
content: Quote from: Flipp on December 30, 2013, 09:24:54 pmOK, I'll add it back in once I get back. To be honest I didn't really think anyone other than myself would be interested in that meter, so I just concentrated on the agilents and building the IP functionality which is almost finished.

author: Flipp
author_rank: Contributor
timestamp: March 02, 2014, 06:52:42 pm
content: For anyone interested in those kind of app: I recently found an app called Digitech DMM by Techbrand apps in the google play store. it is supposed to work with DM-1576 however i will test it with my DT-9939 aka DM1575 tomorrow.Flipedit: there is another app called Meterbox iMM by Cem which seem to be the OEM. Meterbox should work with DT-9969. I hope all those Meters share the same Protocol since there is an Atmel AVR in there which could have different software in each model.

author: Flipp
author_rank: Contributor
timestamp: March 04, 2014, 08:26:29 pm
content: More on my findings with alternative appshere

author: Ichabod
author_rank: Newbie
timestamp: October 31, 2015, 01:59:49 pm
content: Knows anybody where i can buy the DT-9969 in Germany or Europe ?Thank and Happy Helloween!