Author Topic: DMM Tab - Android DMM Utility  (Read 23769 times)

0 Members and 2 Guests are viewing this topic.

Online HarvsTopic starter

  • Super Contributor
  • ***
  • Posts: 1204
  • Country: au
DMM Tab - Android DMM Utility
« on: November 21, 2013, 11:36:23 am »
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.
« Last Edit: November 21, 2013, 12:04:37 pm by Harvs »
 

Online HarvsTopic starter

  • Super Contributor
  • ***
  • Posts: 1204
  • Country: au
Re: DMM Tab - Android DMM Utility
« Reply #1 on: November 21, 2013, 10:54:49 pm »
Once you have Agilent support going I'll try it with the company 34410A.

Thanks, 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.)
 

Offline BravoV

  • Super Contributor
  • ***
  • Posts: 7549
  • Country: 00
  • +++ ATH1
Re: DMM Tab - Android DMM Utility
« Reply #2 on: November 22, 2013, 12:45:52 am »
Great potential   :clap:, 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.  :-+

Offline denneyaa

  • Supporter
  • ****
  • Posts: 13
  • Country: us
Re: DMM Tab - Android DMM Utility
« Reply #3 on: November 22, 2013, 01:00:03 am »
I find this to be an awesome project. I can't wait to see where this goes.
 

Offline Marco

  • Super Contributor
  • ***
  • Posts: 6962
  • Country: nl
Re: DMM Tab - Android DMM Utility
« Reply #4 on: November 22, 2013, 01:03:18 am »
UI pages to work on the data samples.
The UI pages are dynamic HTML?
 

Offline Six_Shooter

  • Regular Contributor
  • *
  • Posts: 117
  • Country: ca
Re: DMM Tab - Android DMM Utility
« Reply #5 on: November 22, 2013, 01:45:58 am »
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?
« Last Edit: November 22, 2013, 01:50:46 am by Six_Shooter »
 

Online HarvsTopic starter

  • Super Contributor
  • ***
  • Posts: 1204
  • Country: au
Re: DMM Tab - Android DMM Utility
« Reply #6 on: November 22, 2013, 02:30:53 am »
Fully aware this is a very early build, is there any plan to add the chart feature either offline or online (real time) ?

Yes, 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.

UI pages to work on the data samples.
The UI pages are dynamic HTML?
Nope, it's all native Android.  So XML layout descriptions with Java doing all the dynamic stuff.

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?

Ok, 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.
 

Offline BravoV

  • Super Contributor
  • ***
  • Posts: 7549
  • Country: 00
  • +++ ATH1
Re: DMM Tab - Android DMM Utility
« Reply #7 on: November 22, 2013, 02:44:26 am »
Fully aware this is a very early build, is there any plan to add the chart feature either offline or online (real time) ?

Yes, 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.

Just a thought, check out Agilent's similar Android app for their bluetooth enabled DMMs, may be you could "steal"  :P 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).

Online HarvsTopic starter

  • Super Contributor
  • ***
  • Posts: 1204
  • Country: au
Re: DMM Tab - Android DMM Utility
« Reply #8 on: November 22, 2013, 04:46:54 am »
Just a thought, check out Agilent's similar Android app for their bluetooth enabled DMMs, may be you could "steal"  :P some few ideas from their implementations.
I didn't realise they had one.  I'll have to check it out, thanks.

Quote
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).
No 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.
 

Online HarvsTopic starter

  • Super Contributor
  • ***
  • Posts: 1204
  • Country: au
Re: DMM Tab - Android DMM Utility
« Reply #9 on: November 22, 2013, 09:56:43 am »
Thanks, 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.)

It has LAN and USB. Is the USB connection not what you are using?

Having said that LAN would be fantastic. Wireless display for the DMM.

Nope, 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.
 

Offline Stonent

  • Super Contributor
  • ***
  • Posts: 3824
  • Country: us
Re: DMM Tab - Android DMM Utility
« Reply #10 on: November 22, 2013, 10:15:33 am »
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#Protocol

Code: [Select]
Protocol

It 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)  12345678901234
Ex.1)  DC-1.9999 V  CR
Ex.2)     1.9999MohmCR

EDIT: 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.htm

Code: [Select]
10  OPEN : "COM 1 : 600, N, 7, 2, RS, CS, DS, CD" AS #2

20  A$ = "D"

30  PRINT #2, A$

40  IN $ = INPUT $ (14, #2)

50  PRINT IN $

60  CLOSE #2

70  END

And... 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 protocols

http://sigrok.org/wiki/Multimeter_ICs#Metex_14-byte_ASCII

« Last Edit: November 22, 2013, 10:38:24 am by Stonent »
The larger the government, the smaller the citizen.
 

Online HarvsTopic starter

  • Super Contributor
  • ***
  • Posts: 1204
  • Country: au
Re: DMM Tab - Android DMM Utility
« Reply #11 on: November 22, 2013, 10:50:16 pm »
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 ?

Yep 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.
 

Offline quantumvolt

  • Frequent Contributor
  • **
  • Posts: 395
  • Country: th
Re: DMM Tab - Android DMM Utility
« Reply #12 on: November 23, 2013, 04:22:44 am »
@ Harvs  :-+ :-+ :-+

Subscribing.
 

Online HarvsTopic starter

  • Super Contributor
  • ***
  • Posts: 1204
  • Country: au
Re: DMM Tab - Android DMM Utility
« Reply #13 on: November 23, 2013, 04:45:40 am »
@ Harvs  :-+ :-+ :-+

Subscribing.

Thanks mate, sorry for stealing your project :)
 

Offline Stonent

  • Super Contributor
  • ***
  • Posts: 3824
  • Country: us
Re: DMM Tab - Android DMM Utility
« Reply #14 on: November 23, 2013, 05:07:29 am »
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?
The larger the government, the smaller the citizen.
 

Offline quantumvolt

  • Frequent Contributor
  • **
  • Posts: 395
  • Country: th
Re: DMM Tab - Android DMM Utility
« Reply #15 on: November 23, 2013, 05:33:21 am »
@ Harvs  :-+ :-+ :-+

Subscribing.

Thanks mate, sorry for stealing your project :)

Not 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  :D
 

Online HarvsTopic starter

  • Super Contributor
  • ***
  • Posts: 1204
  • Country: au
Re: DMM Tab - Android DMM Utility
« Reply #16 on: November 23, 2013, 07:35:50 am »
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?

Yep 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.
 

Offline quantumvolt

  • Frequent Contributor
  • **
  • Posts: 395
  • Country: th
Re: DMM Tab - Android DMM Utility
« Reply #17 on: November 23, 2013, 07:59:10 am »
... given a HC05 module is about $6 and $2 or $3 for a MAX232 and caps ... 

That'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.
 

Online HarvsTopic starter

  • Super Contributor
  • ***
  • Posts: 1204
  • Country: au
Re: DMM Tab - Android DMM Utility
« Reply #18 on: November 23, 2013, 08:03:47 am »
... 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.

That'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.

Yes 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.
 

Online HarvsTopic starter

  • Super Contributor
  • ***
  • Posts: 1204
  • Country: au
Re: DMM Tab - Android DMM Utility
« Reply #19 on: November 25, 2013, 07:23:28 am »
Update 2:


Attached a screenshot of the line fill option enabled as I forgot to include that in the vid.
 

Offline BravoV

  • Super Contributor
  • ***
  • Posts: 7549
  • Country: 00
  • +++ ATH1
Re: DMM Tab - Android DMM Utility
« Reply #20 on: November 25, 2013, 07:52:15 am »
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.  >:D

Just a wild thought.  :P

Online HarvsTopic starter

  • Super Contributor
  • ***
  • Posts: 1204
  • Country: au
Re: DMM Tab - Android DMM Utility
« Reply #21 on: November 25, 2013, 08:08:46 am »
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.
Yeah 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.


Quote
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.  >:D

Just a wild thought.  :P

Yes, it's an underlying property of both protocols.  And this is version 2 of the app already planned :)  It 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.)

 

Online HarvsTopic starter

  • Super Contributor
  • ***
  • Posts: 1204
  • Country: au
Re: DMM Tab - Android DMM Utility
« Reply #22 on: November 26, 2013, 04:33:42 am »
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...
 

Online HarvsTopic starter

  • Super Contributor
  • ***
  • Posts: 1204
  • Country: au
Re: DMM Tab - Android DMM Utility
« Reply #23 on: November 26, 2013, 04:44:53 am »
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.
 

Offline jmcdonald

  • Contributor
  • Posts: 38
  • Country: au
Re: DMM Tab - Android DMM Utility
« Reply #24 on: November 27, 2013, 03:07:42 am »
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. :-+
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf