Reading statistics from machine - Page 1
Forum section: electronics / projects

author: David_AVD
author_rank: Super Contributor
timestamp: February 18, 2014, 12:37:19 am
content: I have an application where I need to read a few statistics from a custom PCB installed inside in a large battery powered device. As far as I know, the only time you'd want to read the stats is when you've opened it up.The battery is a large SLA (12V ~ 30Ah I think) that powers it for weeks at a time as the main function current draw is very intermittent. I don't want to impact the quiescent draw too much. The PCB is up for redesign now, so this is the perfect time to add the stats reading to it.Anyway, I'm looking at options for how to get the data out to the visiting tech in the simplest way possible. Being able to reset the stats would also be good. Importantly, only someone with the correct tool (hardware / software) should be able to reset the stats.My ideas so far:Bluetooth module (that only gets powered up when machine is open) to talk to an Android app. Not sure how easy writing the app will be. I would have to build in some basic authentication to stop just anyone pairing with it.Custom hardware tool (with an LCD and a couple of buttons) that can be plugged into the device when a read / reset is required. Could get its power from the host machine if need be.Serial port on the device, used in conjunction with a USB-serial converter and a notebook / laptop. I can write a PC very easily, but lugging a laptop around may be a hassle.Any other ideas or extensions to the above?

author: Aeon
author_rank: Contributor
timestamp: February 18, 2014, 01:23:00 pm
content: Android and Bluetooth is an easy way. an Android-Bluetooth-App is written relatively fast. For security its a good Idea to power the Bluetooth Module only when the machine is open, or you install an bluetooth on/off switch/pushbutton.for authentication: install a push Button that initializes pairing with a reading Device: so random android devices cant pair with your machine. and to securely pair: use an authentication code (a basic bluetooth function) that you have to put into your android-device. Put the Code on a sticker near your bt-module inside the machine.----I dont know if thats a good option: save the data on a SD-Card or similar changable storage device.I hope that helps

author: penfold
author_rank: Frequent Contributor
timestamp: February 18, 2014, 05:50:46 pm
content: Some android devices can communicate with rs232 converters...

author: SeanB
author_rank: Super Contributor
timestamp: February 18, 2014, 06:39:30 pm
content: If using Bluetooth simply use a random pairing pin, not the seeming default of 00000. A random number, or the serial number of the board will do. For clearing a simple3 pin jumper link and a push button, along with needing to have it pressed for over 20 seconds before erasure, will do.

author: David_AVD
author_rank: Super Contributor
timestamp: February 18, 2014, 09:53:12 pm
content: Sounds like Bluetooth + a simple Android app will be the way to go. I tried the simple "MIT App Inventor" briefly yesterday and that may be usable instead of going for the full SDK + Eclipse route.For storage, the micro's internal EE would be more than enough room for the current data. The data only is only a few bytes and just needs to be noted down in a log book.

author: babysitter
author_rank: Frequent Contributor
timestamp: February 18, 2014, 09:59:22 pm
content: Set a pairing pin which can be calculated from the BD_ADDR by XORing it with your super sekrit code ! O0

author: bronson
author_rank: Regular Contributor
timestamp: February 19, 2014, 02:01:54 am
content: Laptop computer and a USB cable? USB is fast and danged near free nowadays. Bluetooth still requires a fair amount of effort to get working and is eternally fiddly.Just a thought!

author: David_AVD
author_rank: Super Contributor
timestamp: March 26, 2014, 03:36:09 am
content: This project is slowly progressing. The client is now asking for iPhone instead of Android app. In some ways, browser based access would be the way to go to make it device independent.I was initially told that the stats reading would be done while the machine was open. Now seems that they want access without opening it up.Adding a wi-fi module to each machine would add way too much current draw I'd say. The only other thing I can think of is a low power 433MHz transceiver in each machine that talks back to a (mains powered) central interface which does have a wi-fi module or LAN connection.There are between 1 and 10 machines at each site. Having a central controller at sites with only 1 or 2 machines seems overkill, but they do eventually want to be able to access the data over the internet so maybe that's the only real viable option.Comments? Ideas?

author: bronson
author_rank: Regular Contributor
timestamp: April 11, 2014, 11:12:43 pm
content: You seem to have pigeonholed yourself to where nothing is a good fit.Your off-the-shelf candidates are still: RS232 | USB | XBee | Bluetooth | WifiWireless and low power aren't real compatible. If those truly are requirements, and not just conference room wankage, then there's only one COTS answer: BTLE.First make sure everyone has a newish phone and you're familiar with app store restrictions and delays. And be prepared for all the support requests where noobs have to learn how to unpair.True, if you're getting paid by the hour, creating a new 433 MHz base station might be even more lucrative... Can't say which is better without more info.

author: David_AVD
author_rank: Super Contributor
timestamp: April 11, 2014, 11:33:23 pm
content: I've now done the prototype design and incorporated a Microchip transceiver module with SPI interface. Receive current is 3mA so not too bad. Oddly enough Element14 had them cheaper in 1-off than Digikey.There will be a separate interface that bridges one or more machines to wi-fi or wired LAN for access (web or other - TBD). The initial rollout will be local access but remote monitoring is wanted in due course.I've also added a USB port via an FT232RL and arranged it so that section is powered via the PC (to prevent extra battery drain). This gives the option of config / interrogation via cable and laptop. I since found (too late for prototype) the cheaper FT230X, so may use that for the production version.