Share My Creation Marine Engine Monitor for a Tablet

Basic for Android Rocks!!! I have created a program for tablets (tested on Samsung Galaxy Tab 10.1) it receives data from a microntroller that I programmed (PIC32) to read J1939CANBus data from up to 4 marine engines at once, which then sends the data via bluetooth to the Tablet.... the tablet then displays engine parameter values on the gages, as well as engine diagnostic codes, and it also uses the GPS to display vessel speed.... The program is far enough along now to make it's first appearance on this site....
I again say Basic for Androids rocks..... this has been a very complex project, but I have been able to devlop this in less than a month after having purchased BasicForAndroid.......... After I get some more testing done on a few more boats I will find a supplier that can manufacture my PIC32 device, then put the App on the Market....... the buttons below the scroll list are for my testing right now, but will be nicer and will have functions related to the App... Curently it can monitor 530 different engine parameters at once, though conceivably could monitor much more, but I picked only engine related parameters from J1939
 

Attachments

  • ScreenShot.jpg
    ScreenShot.jpg
    95.8 KB · Views: 10,166
Last edited:

Scantech

Well-Known Member
Licensed User
Longtime User
Good job Micheal,

Keep up the good work. Android Market is lacking an OBD II app. Good opportunity to make some money.

Are you planning on supporting the remaining protocols (VPW, PWM, CAN BUS 11/29 BIT, ISO9141, KWP2000)?
 

Michael eldred

Member
Licensed User
Longtime User
Thanks.
Controlling the whole ship is the next version. It should only take a few more days of coding. I wrote this app specifically for the marine industry 1.because I am familiar with the bigger engines 7 liter to 150 liter size 2. I found absolutely 0 apps on App Market that does this (though I did find a commercial company specializing in yachts that offers something that can do this, but their solution costs big bucks) I plan on marketing mine for much less 3. There are very few apps written specifically for tablets.

I originally didn't consider the ODB II stuff because there are quite a few of those apps already on the market including scantech's above. Though I haven't seen any for tablets.

Concerning protocols..... J1939 is based on CAN 2b (which uses the 29 bit identifier). My current plans for further protocols are based on time, and the completion of this project. If this app does well inthe market (or even a little bit well) I will create more apps that interface with other machines/ECU/SCADA I think that tablets are ideally suited for communication and control of other devices
 

Michael eldred

Member
Licensed User
Longtime User
Small Update....

Have dramatically improved the communication speed between the microcontroller and the Tablet. Currently able to transmit about 1000 CAN frames per second, which roughly equates to about 8000 engine parameter updates per second. (though if split between 4 engines it becomes 2000 engine parameters/engine/sec) If I make the bluetooth transfer in master mode, I should be able to double the speed of data transfer. The tablet can't even update the screen that fast so this is great data resolution.... could use it to log data for future analysis functions
 

dagnabitboy

Active Member
Licensed User
Longtime User
Great job Michael! The thumbnail looks great. I'm impressed you put this together in one month! You're a coding maniac! I am also working on a bluetooth app using a tablet as a data display, and I also have used a PIC in my project (don't worry, nothing to do with engines!). If you can post the apk file I'd be glad to tell you how it looks on my tablet (Vizio VTAB).
 

Michael eldred

Member
Licensed User
Longtime User
Hello Dagnabitboy,

thanks for the compliment.... I'll upload the APK. .... You bring up an interesting challenge at this point.. Currently the graphics are hard coded for a 1280x800 screen On your tablet you may only see part of the screen. Still it is not a bad idea for me to do a little research on making the project device screen independent. But with as much data as I wanted to show it is definitely geared towards the larger screens.
 
Last edited:

Michael eldred

Member
Licensed User
Longtime User
APK has been uploaded......... Without the proper MCU and bluetooth connection you will not be able to utilize for real data aquisition... however if you press the mode button, it will enter demo mode, and will generate a dummy signal for the gages to operate off of. It will use a GPS if you have one on your tablet, and will display speed in Knots, and your Course Over Ground. If you press either the Port or STBD buttons, basically what happens is you are switching to a different engine to monitor... in demo mode no signals are generated for the extra engines. If you want to monitor different engine functions, then touch any of the small gages, a list of parameters will pop up for you to choose a new parameter.... Though the list works and will cause the gage to switch parameters, the demo mode only sends signals for the original parameters being monitored. Also I know that most of the other parameter labels are too long to fit in the gages properly at this point.. (on the list to fix) things I am currently working on... using the central ListView to change enginer parameters, as the current way is blocking.... As mentioned in previous Post This has been hard Coded for a 1280x800 screen
 

dagnabitboy

Active Member
Licensed User
Longtime User
Hi Michael; ran your app on the VTAB, resolution 1024 x 692 in landscape mode. It was hard to figure out what was what! I also ran the app on my BlueStacks emulator I have running on my PC which give a resolution of 1920 x 982 and I was able to capture a screen shot for you. I like the look of your gauges. Much of the work in creating nice looking apps is all the graphics.. something I have yet to get a handle on. Heck, it's taking me awhile to come up to speed on B4a! Object programming and the Android OS is completely new to me, and I'm an old guy to boot. Here's your screen shot:

screenshot1.jpg
 

Michael eldred

Member
Licensed User
Longtime User
Thanks for the screen shot. I can see that the background has stretched to full screen. This is probably the only graphic that doesn't depend on physical coordinates as I know I set this one as the activity background. Yes the graphic creation is very important and is no simple task. I used a host of programs for their creation. Rhino3d, Inkscape, Hypershot, Photoshop, Filter Forge. Though it is possible to have done it all in inkscape given enough time. It seems that knowing how to program is only half the battle in writing a good program. What languages had you programmed in befoe B4A?
 

dagnabitboy

Active Member
Licensed User
Longtime User
Hi Michael; In the Navy (1970's) I learned machine language of a Bunko-Ramo computer, by flipping switches and saving programs on paper tape! After the Navy I worked as a hardware guy, but fate caused me to get into early x86 programming, back in the DOS days (1989). A lot of x86 asm, then qbasic, then power basic, then Liberty Basic (for windows)! Most recently tons of work in PIC18F asm, and now B4a!! I had looked at java, but couldn't absorb it, so when I found B4a I figured it was a natural for me! my website: Brooks Technology
 

maleche

Active Member
Licensed User
Longtime User
Great job!:sign0098:

I'm attempting to do the same with graphics.
What are you using to generate the gages?
Are the pointers just lines programmed for arc position?
How do scale the pointers to match the graphics?

whew!
thanks in advance.
Doyle
 
Top