Archive for April, 2009

Finished Test Plan and ran Remaining Test Cases

Today I touched up on the test plan I made a few weeks ago and entered the test cases that I completed this week.
A few bugs were found but nothing major.

Saturday, April 18th, 2009 General Information 1 Comment

Code Refactoring and All Commented

Today I done a bit of refactoring of code and commented everything I could. Almost drove me insane but got there in end. Final result ended up ~7500 lines of code, not bad! – Couldn’t have made it any more efficient or smaller. And surprizingly, the executable results in a file size of just 800KB including all the graphics and styles! I am very impressed with QT Embedded indeed!

Automon Complete

Well not quite, still testing and fixing of a few known bugs. However it really is complete to me. All widgets and functionality is implemented and actually works! Tested it today on my MG and everything worked a charm. I’ve yet to try it on a few more cars but I don’t see why they’d be different since the ELM327 supports all.

Below I’ve included photos of Automon on the TS7390 since it might look a bit more realistic than the screen shots. The camera is years old and my hands arn’t steady so apologies for the quality. It actually looks superb in real life, almost better than the screen shots below. Colors come out great, even though it’s only 15bits.

Automon on TS7390, ElmScan5 and ECU Simulator

Automon on TS7390, ElmScan5 and ECU Simulator

Monitoring View

Monitoring View

Dashboard View

Dashboard View

Diagnostics View

Diagnostics View

What's powering Automon

What's powering Automon

Automon Startup

Automon Startup

Monday, April 13th, 2009 General Information No Comments

Automon Startup on TS7390

Today I modified some run level scripts on the embedded Linux. I set up the environment variables and locations of libs in the /etc/rc.local script. This script runs at end of run level 2, in multi user mode and Automon automatically starts. Now all I have to do is connect the TS7390 to the car and turn it on. I also purchased an inverter for the car today that works so no need for DIY circuits at the moment to power the SBC.

Anyways Automon now starts up on start up of the TS7390 so no more need for telnetting into the board.

Monday, April 13th, 2009 General Information No Comments

Created Dashboard Widget

Dashboard Widget displaying RPM and Speed

Dashboard Widget displaying RPM and Speed

Today I made the Digital Dashboard widget. Ok it isn’t very digital since it’s analog dials, but communicated in a digital way at least! It didn’t take long to create this since I already had the dial widgets from before. The widget’s themselves could look a lot better but it will do for now.

Monitoring and Rules Complete

Automon Monitoring in Action with Rule

Automon Monitoring in Action with Rule

It has been a long day but I finally got the monitoring working the way I wanted it! First of all, you are given a choice of supported sensors on your car. You can add as many as you want (Only one of each however which makes sense!) and you can set the frequency of update. The frequency of update, is how often Automon will poll the ECU for the sensor value. Engine RPM changes rapidly, so need to update this every cycle. However, there is no point checking the coolant temperature that often. In the screen shot above, I set it to 10Hz, so every time Automon cycles through the list of sensors to check, it will check RPM, but every 10th time it will check the coolant temperature sensor.

Below that are available rules. Rules can be added to the monitor. However, you will only be able to start the monitor if all sensors that are listed in the rules are added. For example, If I had a rule added that included the Fuel Level input, I would first of all have to add this sensor to the list of monitoring sensors before being able to monitor.
The rule editor can also be launched from here. Any changes made to rules in the rule editor, will immediately be reflected in the monitoring widget. So for example, if I add a new rule in the rule editor, it will be listed in the available list. If I added a rule to the list of rules for monitoring and if I launched the rule editor, and deleted this rule, the rule will also be automatically deleted from the rule list in the monitoring widget. Big confusing but it works!

In the screenshot above you can see that the values are getting updated. This allows you to see values changing in real time.
When a rule is satisfied, it will highlight the rule in a green background on the cell. I also want it to emit a sound so the driver can hear it but this is a bit complicated on this device. It does have a speaker though which is a start!

Rule Editor Widget Added!

The Rules Editor Widget for Monitoring Purposes

The Rules Editor Widget for Monitoring Purposes

Today I started on the monitoring side of things. Embedding a rule editor inside the monitoring widget was simply not practical or even possible due to screen real estate issues! Instead I gave it, it’s own dedicated widget. Above is what it looks like. At the moment it only allows you to add two sensors to a rule. The sliders allow you to change the values since no keyboard and I’ve no intention of developing a on-screen virtual keyboard widget with the time frame I have!.
Each since has it’s min and max, for example coolant temp is from -40 to 255 (OBD II limitations). When you select this sensor, the sliders automatically adapt to these ranges making it a bit intelligent! Speaking of intelligent, there are other things for example. Only sensors that the car can support will be listed! The OBD II standard does not force manufacturers to implement all sensors, only the ones they want so Automon will automatically update the supported ones and only give users access to these.

Now for the monitoring widget….

Saturday, April 11th, 2009 General Information No Comments

Diagnostics Implemented

Today I done the GUI for the diagnostics. It displays any diagnostic trouble codes (DTCs) that it finds. It allows the user to continuously check for DTCs when they wish by clicking the Check ECU button. It also allows the user to clear the malfunction indicator lamp (MIL). This option provides a verification prompt to the user since this also deletes all DTCs and any freeze frame data.

One piece of funcionality I would have licked to include was display the freeze frame data but I just didn’t have the time. Implementing it would take another few days.

Automon has detected trouble codes in the ECU and engine malfunction indicator lamp (MIL) is on

Automon has detected trouble codes in the ECU and engine malfunction indicator lamp (MIL) is on

Automon prompts the user before clearing the MIL

Automon prompts the user before clearing the MIL

Automon has cleared the DTCs and turned off the MIL

Automon has cleared the DTCs and turned off the MIL

Acceleration Test Functionality Implemented

Acceleration Test View - Bit messy but will do

Acceleration Test View - Bit messy but will do

Over the past day or two I’ve being working on the GUI. I changed it from my original ideas below for the moment as I simply need to get this done soon as the deadline is approaching so no fancy animations for now. Each of the panes (tabs) is a custom widget, so basically I’m using a QStackedWidget with 5 custom QWidgets in it.

Today I mainly focused on the acceleration test functionality. The look of it may not be what I’m looking for now but as I said, deadlines are approaching and functionality is the most important. The acceleration test allows one to test how quick their car can reach a specificed speed. This speed is variable to make it more flexible. It can be changed in increments of 5, using the arrows. The maximum value is 255KPH since the OBD II standard can only read up to this.
Once the user selects this speed and clicks the start acceleration test button, Automon waits until it detects the car moving > ~1 KPH (Using threshold to avoid accidental starts) and starts a timer. As soon as the vehicle’s speed reaches the specified speed, the timer will stop and flash up the elapsed time.

If the car is moving originally when the test is started, it will let the driver know and once they slow down to 0KPH and back up to 1KPH, the timer will start automatically.

I would like to add sounds to it, since the TS7390 includes a speaker but there isn’t a sound driver with the system. However it does include a playwav.c file that I can use to play wav files so I might investigate even calling this as a process using QProcess but I’ll have to see how it affects performance.

Speaking of performance, the GUI is very responsive, everything responding instantly.

QT Animation Framework

I am attempting to create GUI effects, such as a menu that slides up and down when you need it over the widgets.
I have attempted it with QGraphicsView and animation, however it is a bit tedious and very slow with the transforms.

QT Animation Framework is something that is under development and scheduled to be released in QT 4.6 later this year.
However, they have given access to it and a few demos. It basically allows you to do animations and interpolation for smooth transitions for widgets from one point in the screen to another. It also provides easing curves, where you can define a linear transition animation based on a curve. So for example, I could make my menu slide up and let it drop when it hits peak like a gravitational affect. Just an idea. I successfully compiled the examples on the TS7390 and they run smoothly enough. I won’t spend too much time messing with GUI effects but I’ll see what is possible anyways.

Saturday, April 4th, 2009 QT Embdedded Programming No Comments