Megajolt Android tuning app

Discussion on Future Megajolt hardware / software upgrades.

Moderators: JeffC, rdoherty, stieg, brentp

Post Reply
bmcdaniel
Posts: 44
Joined: Sun Jan 06, 2013 2:49 am

Post by bmcdaniel »

Subscribing.

jestes
Posts: 43
Joined: Fri Jan 18, 2013 2:54 am
Location: Spokane, WA
Contact:

Post by jestes »

This is far from complete or even usable, but I figured I would post something just to get it out there. What we have so far is a 2 part system that requires 2 Android devices with a Blue Tooth radio in each.

http://www.digitalreflectionsphotos.com ... ndroid.zip
http://www.digitalreflectionsphotos.com ... ulator.zip

The simulator will run on an one Android device and act like a real MegaJolt. This is for those of you that would like to play with the app and don't have a Serial to Blue Tooth converter connected to your MegaJolt. If you want one, you can find it herehttp://dx.com/p/jy-mcu-arduino-bluetoot ... ule-104299. Simply turn on your Blue Tooth radio and start the application. Once it is running, click the Start Simulator Server button and you're ready to go. As messages are received from and sent to the application, they will be displayed on the screen giving you an indication of what is happening.

The tuning application will run on a separate Android device. Again, start your Blue Tooth radio before running the application. Pair to the device that is running the simulator or your MegaJolt device and run the application. In the menu bar click Comm Settings and select the Blue Tooth Device you want to connect to from the list. Then Click Connect to MegaJolt Lite. The application will start sending Current State requests to the simulator or actual MegaJolt, whichever you have connected. It will show the raw RPM value at this point and nothing else.

If you click the Gauges button, you will see the gauge control the guys have written. Right now they are connected to the light sensor on the tablet/phone. In the next iteration, 2 weeks, they will be connected to the Current State response we are already getting from the device.

If you click the Ignition Map button, you will see the 10x10 editable grid that will become the ignition map. There are no colors and there is no way to read it in from the device or send it back to the device at this point. Again, that is coming in the next couple weeks.

My thinking right now is the main screen will simply be a splash screen and the Gauges will become the main screen. You will then swipe left and right to switch between the Gauges, Ignition Map and Data Logging screens.

Please keep in mind, these applications are in the very early stages and have very little error handling in them at this point. It will not be difficult to make them crash! The tuning application has never been connected to a real device, so if you try it and find an issue, please let me know. If you do anything else and the app crashes or does not behave correctly, I don't need to hear about it. I don't want to be flooded with bug reports when I know there are a ton! Also, I know the gauges do not display correctly on some devices. The guys are working on that as well.

brentp
Site Admin
Posts: 6274
Joined: Wed Jan 24, 2007 6:36 am

Post by brentp »

Awesome! Thanks Jestes for sharing this! :)

In conjunction with the RaceCapture/Pro dashboard app we will be also finishing up the Megajolt android application. We're making both open source so your team can, if necessary, take a look at how some of the API functions work and see other areas of the code.

That is the same bluetooth module we are targeting for RaceCapture/Pro and Megajolt. Unfortunately with Megajolt/E there is no power available at the RJ11 jack; a huge oversight in retrospect.

The compact adapter for RaceCapture/Pro (which can be adapted to Megajolt operation)
https://github.com/autosportlabs/BluetoothConnect

jestes
Posts: 43
Joined: Fri Jan 18, 2013 2:54 am
Location: Spokane, WA
Contact:

Post by jestes »

Here is another update to the app. The ignition map still needs a lot of work. The colors are now correct, but the editing needs a bunch of work still. The gauges are starting to take shape but they are still not connected to the current state of the controller. I have actually connected the app to a real MegaJolt/E device through Bluetooth. I'll be posting a How To on installing a Serial to Bluetooth converter in the MegaJolt/E so this app can be used. Once this is done, you can use a laptop with either Brent's app or my Windows app that I wrote as well if you want. I have tested all 3 now and they have no problems.

http://www.digitalreflectionsphotos.com ... ndroid.zip
http://www.digitalreflectionsphotos.com ... ulator.zip

jestes
Posts: 43
Joined: Fri Jan 18, 2013 2:54 am
Location: Spokane, WA
Contact:

Post by jestes »

In order to make your Android device communicate with the MegaJolt/E, you will need to install a serial to Bluetooth converter. You can get one here: http://dx.com/p/jy-mcu-arduino-bluetoot ... ule-104299

The first picture below shows most of the items you will need.
A torx tip screwdriver to get the MegaJolt/E apart.
A soldering iron and some fine or High Tech Silver Bearing Solder.
A pair of wire strippers/cutters.
A JY-MCU Serial to Bluetooth converter.
Some double sided foam tape (not shown).
Some shoe goo, or other high quality glue that can withstand heat and cold (not shown).

First thing to do is take one end off the MegaJolt/E. It does not matter which end. The board will slide out either side.

Once the board is out of the case, locate the ground and power pins on the MAP sensor. You will notice one of the pins has a notch in it, that is pin 1. Pin 2 is ground and pin 3 is +5 volts. Solder the power and ground wires for the JY-MCU to these 2 connectors. The back side of the JY-MCU usually has s silk screen that identifies what pins are what.

Next locate the RS323 driver. It is the black rectangle closest to the RJ-11 port. On the side of that chip closest to the edge of the board are the TTL transmit and receive pins. We need to solder the transmit and receive pins on the JY-MCU to these 2 pins. In the second picture below you see 2 wires soldered to the driver, the pin on the left is receive and the pin on the right is transmit. Solder the wire connected to Transmit on the JY-MCU to the Receive pin Receive to Transmit. If there are arrows printed on the back of your JY-MCU, ignore them and pay attention to the transmit and receive labels instead. Some of the arrows are printed from the perspective of the JY-MCU, others are printed from the perspective of the device you are connecting it to.

Now, power up your MegaJolt/E. There should be an LED on the JY-MCU that flashes to indicate it has power but no connection has been made. Pair your Android device and load up MegaJolt Android. Under settings, pick the Bluetooth device you just installed in your MegaJolt/E and return to the home screen. Click Connect to MegaJolt Lite. After a couple seconds the light should turn solid to indicate a connection was made. As well, the RPM High and Low labels on the screen should both say 255. If that is the case you are good to go. If not, you may need to switch your transmit and receive lines. As you can see in the picture, I used the solid connector on the board and cut off the loose ends. I would do that the other way around if I did this again. That would make it much easier to switch TX and RX if I got them backwards.

Now, use your foam tape and stick the JY-MCU to the MegaJolt/E. Make sure to stick the tape to the board only and not any of the components soldered to the board. Then use a little dab of glue to hold the wires in place. Again, only put glue on the board and your wires, not the components on the board. This is not strictly necessary, but it will help to prevent cracks in the solder.

Put the board back in the case and button it back up.
Attachments
IMG_3999.JPG
IMG_3999.JPG (117.17 KiB) Viewed 340963 times
IMG_4008.JPG
IMG_4008.JPG (81.68 KiB) Viewed 340964 times

tony b
Posts: 2
Joined: Tue Jul 23, 2013 10:29 pm

Post by tony b »

Awesome timing - had an mj sat waiting for me to restore my mini for years - gonna dust the project off soon and android tweaking was high on my 'I wonder if I can do that yet' list!

Will play with this on the wifes phone at the weekend.

Fingers crossed in the future I'll be sat changing settings with my tablet in a nice dash enclosure on the fly!

jestes
Posts: 43
Joined: Fri Jan 18, 2013 2:54 am
Location: Spokane, WA
Contact:

Post by jestes »

tony b wrote:Awesome timing - had an mj sat waiting for me to restore my mini for years - gonna dust the project off soon and android tweaking was high on my 'I wonder if I can do that yet' list!

Will play with this on the wifes phone at the weekend.

Fingers crossed in the future I'll be sat changing settings with my tablet in a nice dash enclosure on the fly!
I had the same issue with images when I first started using this forum. Make sure you are logged in or images and downloads will not show up.

tony b
Posts: 2
Joined: Tue Jul 23, 2013 10:29 pm

Post by tony b »

Yeah they popped up as soon as I said they weren't there! Typical. ..

davidimurray
Posts: 1
Joined: Sat Aug 13, 2011 10:51 pm

Post by davidimurray »

This is looking great. Will be following this very closely. I am assuming that it will be possible to ft the module to the kit built megajolts.

Will datalogging be part of the software. I've got my AFR connected into my jolt and will be using the logging to setup my fuelling. Using the phone rather than having to carry a laptop would be much better.

jestes
Posts: 43
Joined: Fri Jan 18, 2013 2:54 am
Location: Spokane, WA
Contact:

Post by jestes »

davidimurray wrote:This is looking great. Will be following this very closely. I am assuming that it will be possible to ft the module to the kit built megajolts.
Yes, my understanding is there should be no significant difference between an old "you build it kit" and one you buy pre built.
davidimurray wrote:Will datalogging be part of the software. I've got my AFR connected into my jolt and will be using the logging to setup my fuelling. Using the phone rather than having to carry a laptop would be much better.
Datalogging will not be part of the first release. We barley had time to get the gauges and ignition map done. I will be working with the instructor to see if we can pick up where these guys left off and add some additional functionality in the next 2 quarter sequence. If not, I have the source code, so anyone who is interested is more than welcome to take a crack at adding datalogging or any other functionality they want.

I may turn my Windows based app into a Metro or Windows Store app as well. I'm not sure how many people out there have Windows Phone 8 or Surface devices (Pro or RT).

jestes
Posts: 43
Joined: Fri Jan 18, 2013 2:54 am
Location: Spokane, WA
Contact:

Post by jestes »

The MegaJolt Android and PcJolt for Windows apps have been released to beta. There are still some issues to work out with both apps, but they are functional. The code has been put on CodePlex and you can download the APK and EXE from there. If you are interested in helping with either project, PM me and we'll get you set up.
https://mobilejolt.codeplex.com/

capri_turbo
Posts: 122
Joined: Tue Jan 10, 2006 8:17 pm
Location: North Yorkshire, UK

Post by capri_turbo »

Got my module wired up and paired, but the gauges stay at '0' and can't get the map or anything from the Megajolt. tried swapping Rx and Tx... same result. Samsung Galaxy s II Android 4.

Any ideas?

jestes
Posts: 43
Joined: Fri Jan 18, 2013 2:54 am
Location: Spokane, WA
Contact:

Post by jestes »

capri_turbo wrote:Got my module wired up and paired, but the gauges stay at '0' and can't get the map or anything from the Megajolt. tried swapping Rx and Tx... same result. Samsung Galaxy s II Android 4.

Any ideas?
Do you have a laptop with blue tooth? Try the Windows app, either mine or Brent's, to verify your serial to blue tooth module is working correctly.

I will install the latest release on my tablet tonight and give it a shot. I have been busy on other projects lately, so I have not touched this at all.

capri_turbo
Posts: 122
Joined: Tue Jan 10, 2006 8:17 pm
Location: North Yorkshire, UK

Post by capri_turbo »

Only got a bluetooth dongle but it won't work on windows 7 even in compatibility mode... having trouble with my usb to serial connection to it too. Works occasionally. Need to try another computef as I've recently upgrafed from vista where it all worked to 7 and nothing works... will try more later this week.

capri_turbo
Posts: 122
Joined: Tue Jan 10, 2006 8:17 pm
Location: North Yorkshire, UK

Post by capri_turbo »

Can't get it working :( . Unit looks exactly the same as the one in the link, but not the same as the one you have used on your board. Phone pairs with it ok, but no data at all. The device seems to be an HC-06 if that helps. The app doesn't seem to notice if I turn off the Bluetooth module until I try and disconnect from it when it leave the lost connection message on screen for about 5 minutes. I usually end up having to reboot the phone to get rid of it.

None of my Bluetooth usb adaptors seem to work as serial ports with windows 7 which is really annoying.

Completely stuck, but still trying :?

Col

Post Reply