Introducing ElanLogger

Moderators: theelanman, nitroman, Specky, clemo, dapinky, Dave Eds, GeoffSmith, Nige, DaveT, Sy V, Elanlover, muley, Enright, algirdas

Introducing ElanLogger

Postby matts1972 » Tue 04.07.2017, 20:45

Hi all,

I have developed a data logger based on Arduino that logs directly to an SD card in ElanScan's .ecu-format.
It is small, very simple to build, runs on power supplied by the ALDL connector and can easily stay inside the car hidden below the dashboard in the passenger footwell.
You should be able to build it for reasonable 30 GBP/Euros.

I imagine that there is some demand for this - and I am glad to be able to contribute to our great community of Elan owners.

This is a first quick write up - I plan to put the information on Wikilec as well and include answers to questions that you will probably have.

So if you are not afraid of frying your Arduino board or your ECU, please read on.

What you will need (with prices I paid online for reference):

Data logger board:
1 Arduino Uno R3 or compatible - €8
1 Arduino data logger shield with RTC - €8
1 SD card 2GB or less - €5

Interface cable:
1 Opel OBD1 to OBD2 adapter, 10 pin - €8
2 resistors, 100 ohms - €.2
1 zener diode (1N4733A) - €.1
1 on-off switch - €1
4 Arduino jumper cables - €.5

Software:
1 ElanLogger Arduino sketch - free for M100 owners and attached below

Build the board:
1. Put the data logger shield on the Arduino board and insert the fat16 or fat32 formatted sd card. (easy, as I said)

Build the interface cable:
1. Cut the OBD1 adapter cable in half and toss the OBD2 part.
2. Identify the 3 required lines A,F and G on the cable.
3. Connect A,F and G to the 4 jumper cables that will connect to the Arduino PINs "tx","rx","gnd" and "V in" like this:

- A goes straight to "gnd" (this is ground)
- F goes to "V in" with an "on/off"-switch in between (this is the 12v power supply)
- G goes to both "tx" and "rx" via a 100 ohms resistor each (for half-duplex serial data)
- G also goes to "gnd" via a 1N4733A diode (direction "gnd" to G)

Put the ElanLogger software on the Arduino board:
1. install the Arduino IDE on your PC and connect to your Arduino board via USB
2. change the IDE's serial buffer size from 64 to 128 bytes in HardwareSerial.h (see http://www.hobbytronics.co.uk/arduino-s ... uffer-size)
3. install Arduino libraries SDFat and RTClib
4. open the ElanLogger sketch file (source code) and load it onto your Arduino board

You are done building. Now you are ready to

Use your data logger:
1. Connect your data logger to your Elan's ALDL interface
2. Turn on ignition or start your Elan
3. Turn on your data logger with its on/off-switch
4. Take your Elan for a spin
5. Turn off the ignition
6. Wait for 3 seconds
7. Turn off your data logger
8. Take out the sd card and put it in your PC to open the created .ecu file with ElanScan


Notes:

- It is important to end logging by turning off the ignition of the car first. Only then the data logger will be able to write the necessary header information and close the file.
If you fail to do so, i.e. you turn off the data logger before turning off the ignition, your log file will be incomplete. You will then find a file with extension .ec_ instead of .ecu.

- Do not forget to change the serial buffer size in the Arduino IDE - this is needed to be able to receive all mode 1 data in one go. Without doing so, your .ecu files will be truncated.

- Log file names are formatted YMddhhmm.ecu (Year,Month,day,hour,minute - only last digit for year and month).

- ElanLogger will currently log around 6-7 packets per second. I have not yet tried pushing logging frequency to the edge.

EDIT July 18th 2017:
Replaced ElanLogger.zip with an updated version 1.1
This new version will visually indicate success by flashing the builtin LED in one second intervals after the file has been closed (ignition has been turned off, i.e. the car stopped talking).
Any error (e.g. no sd card inserted) will be indicated by a rapidly flashing LED.
You do not have the required permissions to view the files attached to this post.
Last edited by matts1972 on Tue 18.07.2017, 20:31, edited 2 times in total.
User avatar
matts1972
Tinkerer
 
Posts: 72
Joined: Wed 10.03.2010, 19:44
Location: Heilbronn, Germany

Re: Introducing ElanLogger

Postby Giniw » Tue 04.07.2017, 20:53

Thanks for the great work!! Actually I had a similar project, I am glad I haven't started it yet :D
(PS: as for the elanscan format, did you find all the bytes usages? I miss a four bytes integer (?) viewtopic.php?f=34&t=25409)
User avatar
Giniw
God
 
Posts: 1109
Joined: Sat 21.04.2012, 20:46
Location: France

Re: Introducing ElanLogger

Postby matts1972 » Tue 04.07.2017, 21:09

Giniw wrote:(PS: as for the elanscan format, did you find all the bytes usages? I miss a four bytes integer (?) viewtopic.php?f=34&t=25409)

No, I also did not find out about the meaning of the second integer. I am pretty sure it is some kind of flag that is better left alone. I only set file size and packet count - everything else in the header does not seem to change, anyway.
User avatar
matts1972
Tinkerer
 
Posts: 72
Joined: Wed 10.03.2010, 19:44
Location: Heilbronn, Germany

Re: Introducing ElanLogger

Postby Giniw » Tue 04.07.2017, 21:35

Thanks :wink:
User avatar
Giniw
God
 
Posts: 1109
Joined: Sat 21.04.2012, 20:46
Location: France

Re: Introducing ElanLogger

Postby Elanlover » Tue 04.07.2017, 23:22

Just curious if, given its Arduino based, you could bluetooth the data over?
I do whatever my Rice Crispies tell me to do
User avatar
Elanlover
Moderator
 
Posts: 3450
Joined: Fri 05.08.2005, 19:11
Location: The Great White North

Re: Introducing ElanLogger

Postby matts1972 » Wed 05.07.2017, 07:29

Elanlover wrote:Just curious if, given its Arduino based, you could bluetooth the data over?


Unfortunatedly the answer is clearly a "yes, but". You can cheaply add an Arduino bluetooth module and talk to this instead of directly to the Elan. But you will additionally need a suitable bluetooth-to-serial interface for the Elan connection. There might also be some challenges with the odd baud rate that ALDL requires. All doable but a completely different project.
A nice project might be to build an Arduino based bluetooth interface for Elanscan that you can access directly from Elanscan on Windows over a standard bluetooth connection. Required parts would probably only be an Arduino Uno, an Arduino BT module and an ALDL connector. But the Arduiono sketch would still have to be developed. I believe, Geoff has already created a bluetooth interface, though.
User avatar
matts1972
Tinkerer
 
Posts: 72
Joined: Wed 10.03.2010, 19:44
Location: Heilbronn, Germany

Re: Introducing ElanLogger

Postby John_W » Wed 05.07.2017, 08:57

Well done, Matts.
:clap:
I might even try this.
(Or more likely wait and see if somebody competent volunteers to make a few :mrgreen: )

John
User avatar
John_W
TOSSPOT
 
Posts: 3432
Joined: Mon 21.04.2003, 12:31
Location: Aberdeen

Re: Introducing ElanLogger

Postby Rambo » Wed 05.07.2017, 09:16

John_W wrote:Well done, Matts.
:clap:
I might even try this.
(Or more likely wait and see if Geoff can make a few :mrgreen: )

John


:twisted:
User avatar
Rambo
Goldfish-brain
 
Posts: 6432
Joined: Wed 24.12.2003, 00:37
Location: Cardrona

Re: Introducing ElanLogger

Postby matts1972 » Wed 05.07.2017, 09:43

John,
Thanks for the feedback. I am very much looking forward to the first brave person reporting success.
Just try not to short the wrong ALDL lines and be lucky enough to buy fully functional Arduino parts.
Cheers,
Matthias
User avatar
matts1972
Tinkerer
 
Posts: 72
Joined: Wed 10.03.2010, 19:44
Location: Heilbronn, Germany

Re: Introducing ElanLogger

Postby dapinky » Wed 05.07.2017, 13:57

Rambo wrote:
John_W wrote:Well done, Matts.
:clap:
I might even try this.
(Or more likely wait and see if Geoff can make a few :mrgreen: )

John


:twisted:


Well, that's at least 3 of us waiting for Smiffy to get his soldering iron out....... :poke:
Dave

Just the one now, but this one's mine! - and it will be finished eventually.....

go on - click this link - you know you want to!
User avatar
dapinky
Moderator
 
Posts: 8019
Joined: Sun 15.10.2006, 12:54
Location: As far west as you can get in West Wales before you become Irish (Pembroke Dock).

Re: Introducing ElanLogger

Postby Dom » Wed 05.07.2017, 16:28

I wouldn't stand a chance of making this, but if Geoff, or some other suitably competent person, decides to make a few, I'd be very interested!
User avatar
Dom
Enthusiast
 
Posts: 168
Joined: Tue 18.04.2017, 16:29
Location: Bracknell

Re: Introducing ElanLogger

Postby Saltire » Wed 05.07.2017, 18:02

Matts, I'm quite interested in giving it a go. What would help, please, is a) a circuit diagram, just to minimise the risks of shorting the ECU, and b) a more detailed parts list, including suppliers. I don't want to waste money on the wrong R3 or an incompatible diode, for example. Any chance you might post something please?
Jonathan

S2 no 512, BRG, magnolia interior, last of four UK S2 to this spec
User avatar
Saltire
God
 
Posts: 938
Joined: Sun 05.04.2015, 22:27
Location: Mill Bay, BC

Re: Introducing ElanLogger

Postby matts1972 » Wed 05.07.2017, 20:42

Saltire wrote:Matts, I'm quite interested in giving it a go. What would help, please, is a) a circuit diagram, just to minimise the risks of shorting the ECU, and b) a more detailed parts list, including suppliers. I don't want to waste money on the wrong R3 or an incompatible diode, for example. Any chance you might post something please?


Circuit diagram attached, not much to it. Good that you mention the diode, though. I have updated my original post to mention that ideally a 1N4733A zener diode should be used (for 5 volts clamping protection).
interface_circuit.png

Here you go in regards to specific parts I used. I am neither an Amazon or Ebay affiliate, though - if this is against forum rules, please delete:

OBD1 adapter: https://www.amazon.de/gp/product/B007I1 ... UTF8&psc=1
Arduino Uno R3: https://www.amazon.de/gp/product/B018TV ... UTF8&psc=1
Data logger shield XD-204: http://www.ebay.de/itm/XD-204-Data-logg ... 2749.l2649

Cheers,
Matthias
You do not have the required permissions to view the files attached to this post.
User avatar
matts1972
Tinkerer
 
Posts: 72
Joined: Wed 10.03.2010, 19:44
Location: Heilbronn, Germany

Re: Introducing ElanLogger

Postby Saltire » Wed 05.07.2017, 21:46

Thanks - I wondered if it was a zener. I'll do a bit more research, but it's a tempting project

:bowdown: :bowdown: :bowdown:
Jonathan

S2 no 512, BRG, magnolia interior, last of four UK S2 to this spec
User avatar
Saltire
God
 
Posts: 938
Joined: Sun 05.04.2015, 22:27
Location: Mill Bay, BC

Re: Introducing ElanLogger

Postby KenS » Sun 09.07.2017, 20:27

Thanks Matts for sharing your project design. Brilliant.
To support it I have drawn up a 3D printable box suitable for housing the logger parts (but not yet completed the wiring). The sldprt and stl files are in the zip file allowing improvements/changes to be made since I am not sure if the stacked board height is always the same, so if anyone wants to try it, please check the dimensions fit your board types before committing to a 2 hour print! :
You do not have the required permissions to view the files attached to this post.
S2 NMY #285
User avatar
KenS
Newbie
 
Posts: 39
Joined: Mon 27.10.2014, 21:04
Location: North Kent Coast

Re: Introducing ElanLogger

Postby dapinky » Sun 09.07.2017, 20:55

Wow - :goodposting: I see much love in this topic, thanks everyone (who knows what they're doing) for taking the time to develop something which I think will find a good few homes!

A quick question though (and excuse my ignorance if it's obviously a stupid one) - is there any reason why we need the asdl plug on the end of the cable? I appreciate that it needs to connect to the asdl socket in the car, but can the 3 needed wires be spliced into the wiring above the current socket?

I ask as that is what I've done with a simple on/off switch to replicate the 'paperclip' to enter service mode, and that means I can be in service mode whilst the elanscan is plugged in for 'real time' setting of things like idle speed, TPS etc.

Is there any advantage to being able to run this at the same time as elanscan?

Just a few random thoughts to make it a couple of quid cheaper, but at the sacrifice of it being a 'permanent, hard-wired' item.
Dave

Just the one now, but this one's mine! - and it will be finished eventually.....

go on - click this link - you know you want to!
User avatar
dapinky
Moderator
 
Posts: 8019
Joined: Sun 15.10.2006, 12:54
Location: As far west as you can get in West Wales before you become Irish (Pembroke Dock).

Re: Introducing ElanLogger

Postby Brit-Car-Nut » Sun 09.07.2017, 22:45

Dave, to keep it semi removable, you could use a common 3 connection plug like a stereo headphone jack or an amphenol XLR microphone jack so the ALDL remains available for other things.
HD Replacement Shift Cables and Short Shift Kits still available
HD Replacement Shift Cable and Short-Shift Kit prices
Please contact me via eMail, not by PM
Download Manuals Here
Brit-Car-Nut
God
 
Posts: 3980
Joined: Tue 03.07.2007, 17:07
Location: Charlotte, NC USA

Re: Introducing ElanLogger

Postby matts1972 » Mon 10.07.2017, 17:27

KenS wrote:Thanks Matts for sharing your project design. Brilliant.
To support it I have drawn up a 3D printable box suitable for housing the logger parts (but not yet completed the wiring). The sldprt and stl files are in the zip file allowing improvements/changes to be made since I am not sure if the stacked board height is always the same, so if anyone wants to try it, please check the dimensions fit your board types before committing to a 2 hour print! :


Thank you Ken, that looks really great. As a matter of fact, I was hoping for someone to come up with a housing solution, as my prototype is a bit fragile and I could not find a standard casing for Arduino with a data logger shield attached.
I would not have expected something looking so professional so quickly, though!
Best regards
Matthias
User avatar
matts1972
Tinkerer
 
Posts: 72
Joined: Wed 10.03.2010, 19:44
Location: Heilbronn, Germany

Re: Introducing ElanLogger

Postby matts1972 » Mon 10.07.2017, 17:36

dapinky wrote:A quick question though (and excuse my ignorance if it's obviously a stupid one) - is there any reason why we need the asdl plug on the end of the cable? I appreciate that it needs to connect to the asdl socket in the car, but can the 3 needed wires be spliced into the wiring above the current socket?

I ask as that is what I've done with a simple on/off switch to replicate the 'paperclip' to enter service mode, and that means I can be in service mode whilst the elanscan is plugged in for 'real time' setting of things like idle speed, TPS etc.

Yes, the three wires do not ask for a special connector or socket. You could easily hardwire everything without the connector or use an alternative connector like Brit-Car-Nut suggested. I am not sure, however, if ElanScan/ElanLogger will work while in service mode. But a service mode switch in parallel will do no harm.
User avatar
matts1972
Tinkerer
 
Posts: 72
Joined: Wed 10.03.2010, 19:44
Location: Heilbronn, Germany

Re: Introducing ElanLogger

Postby dapinky » Mon 10.07.2017, 17:45

matts1972 wrote:Yes, the three wires do not ask for a special connector or socket. You could easily hardwire everything without the connector or use an alternative connector like Brit-Car-Nut suggested. I am not sure, however, if ElanScan/ElanLogger will work while in service mode. But a service mode switch in parallel will do no harm.


Thanks Matt,

Elanscan certainly works in Service Mode - it is only really usefull for initially setting the car up, as it is the only way to get an acurate RPM reading to do the idle speed adjustment (which needs to be set in Service Mode).... well, I suppose an external Rev Counter could be used, but it works this way.
Dave

Just the one now, but this one's mine! - and it will be finished eventually.....

go on - click this link - you know you want to!
User avatar
dapinky
Moderator
 
Posts: 8019
Joined: Sun 15.10.2006, 12:54
Location: As far west as you can get in West Wales before you become Irish (Pembroke Dock).

Next

Return to ElanScan

Who is online

Users browsing this forum: No registered users and 1 guest