DIY data logging - ordered some parts to play with
Re: DIY data logging - ordered some parts to play with
Good idea. I had thought of bridging the diagnostics port and running a wire to a dash switch instead of having to use a paperclip all the time.
-
Topic author - Posts: 4507
- Joined: 07/05/06 1:00
- Years of MR2 Ownership: 12
- MR2's Owned: 6
- Real Name: Mark
- Gender: Male
- Location: Reading, UK
- Been thanked: 2 times
- Contact:
Re: DIY data logging - ordered some parts to play with
That's another mod I keep on meaning to do but never quite get round toAManInDandism wrote:Good idea. I had thought of bridging the diagnostics port and running a wire to a dash switch instead of having to use a paperclip all the time.
-
- Posts: 266
- Joined: 12/05/13 21:40
- Years of MR2 Ownership: 1
- MR2's Owned: 1
- Gender: Male
- Location: Bournemouth
Re: DIY data logging - ordered some parts to play with
It is possible to read live data from the Toyota ECU. I haven't done it myself, but this is the info I have. I may consider making / including in a product in the future.
http://www.cdd.co.uk/stuff/TOYOTA.zip
http://www.cdd.co.uk/stuff/TOYOTA.zip
-
Topic author - Posts: 4507
- Joined: 07/05/06 1:00
- Years of MR2 Ownership: 12
- MR2's Owned: 6
- Real Name: Mark
- Gender: Male
- Location: Reading, UK
- Been thanked: 2 times
- Contact:
Re: DIY data logging - ordered some parts to play with
Not much progress tonight as I've been out all evening. I've just been tweaking the joystick input; an analogue joystick isn't great for single digital inputs, but with software nothing is impossible. So with a little code the joystick only reacts at the extremes so you can tap it in each direction, and it behaves like holding down a key on a keyboard, so you get a single press and holding it causes a repeat. The thing I've found with these joysticks and pads is that pushing the central button often ends up kludging one or both of the axis, thus providing unwanted input and possibly meaning you select the wrong menu option or something. However making an anti-kludge mode is also very easy... once you hit the central button, all other input is ignored until the button is released and the joystick returns to the center.
Yes, it's all a little OCD, but it's handy to get the behaviour of things right when it comes to user interfaces
Yes, it's all a little OCD, but it's handy to get the behaviour of things right when it comes to user interfaces
-
Topic author - Posts: 4507
- Joined: 07/05/06 1:00
- Years of MR2 Ownership: 12
- MR2's Owned: 6
- Real Name: Mark
- Gender: Male
- Location: Reading, UK
- Been thanked: 2 times
- Contact:
Re: DIY data logging - ordered some parts to play with
Well, yesterday evening was rather frustrating. I'm planning on using a double height font to display larger numbers when the unit is being used as a gauge. HD44780 displays can accept up to 8 custom characters, so I drew out the numbers 0-9 using 8 custom characters plus two that are in the standard font. Then I discovered:
1) My screen didn't have the standard font set
2) When I tried to use custom characters 0, 6 and 7 I would corrupt the display.
After much experimenting and confusion, I found the reason why; my OLED display is based on the WS0100 chipset which requires tighter timings than most HD44780 compatible chips. Thankfully Adafruit sell the same unit and have produced an alternative library for controlling it from Arduino: https://github.com/ladyada/Adafruit_CharacterOLED
From here everything worked, but I was still short of those two characters from the standard font set. And then I made a wonderful discovery; the first time I saw the display running, I suspected it was really a graphic OLED display being presented as a character display. ie. I suspected there were unused pixels between the characters where a character LCD does not. And as it happens I was right! The display is actually a 100x16 pixel graphic display that can simply be driven like a character LCD. However there is also an interface (not implemented in the Adafruit library) to drive it in graphics mode. Thus my large numbers can be displayed directly rather than using custom characters. It should also allow for small graphics or animations to go alongside readouts
So, one step backwards and one step forward but broader horizons as a result...
1) My screen didn't have the standard font set
2) When I tried to use custom characters 0, 6 and 7 I would corrupt the display.
After much experimenting and confusion, I found the reason why; my OLED display is based on the WS0100 chipset which requires tighter timings than most HD44780 compatible chips. Thankfully Adafruit sell the same unit and have produced an alternative library for controlling it from Arduino: https://github.com/ladyada/Adafruit_CharacterOLED
From here everything worked, but I was still short of those two characters from the standard font set. And then I made a wonderful discovery; the first time I saw the display running, I suspected it was really a graphic OLED display being presented as a character display. ie. I suspected there were unused pixels between the characters where a character LCD does not. And as it happens I was right! The display is actually a 100x16 pixel graphic display that can simply be driven like a character LCD. However there is also an interface (not implemented in the Adafruit library) to drive it in graphics mode. Thus my large numbers can be displayed directly rather than using custom characters. It should also allow for small graphics or animations to go alongside readouts
So, one step backwards and one step forward but broader horizons as a result...
-
- Posts: 266
- Joined: 12/05/13 21:40
- Years of MR2 Ownership: 1
- MR2's Owned: 1
- Gender: Male
- Location: Bournemouth
Re: DIY data logging - ordered some parts to play with
I've never used an arduino, but I was doing something similar 25 years ago in my old escort rally car. I was using a motorola 68705 single chip processor back then. Nowadays I use the pic16/18 mostly but have recently ventured onto dsPICs.
I really should have a look at arduinos and raspberry thingies as they look excellent for one offs or prototyping a concept. I tend to just produce a custom PCB instead, or use an existing own product as a base.
I really should have a look at arduinos and raspberry thingies as they look excellent for one offs or prototyping a concept. I tend to just produce a custom PCB instead, or use an existing own product as a base.
-
Topic author - Posts: 4507
- Joined: 07/05/06 1:00
- Years of MR2 Ownership: 12
- MR2's Owned: 6
- Real Name: Mark
- Gender: Male
- Location: Reading, UK
- Been thanked: 2 times
- Contact:
Re: DIY data logging - ordered some parts to play with
Heck.. I didn't even know what a microcontroller was then!Chris_D wrote:I've never used an arduino, but I was doing something similar 25 years ago
What's your training then Chris? Cos you clearly know what you'e doing much better than I do. I'm just a C programmer making my first real microcontroller project
-
- Posts: 266
- Joined: 12/05/13 21:40
- Years of MR2 Ownership: 1
- MR2's Owned: 1
- Gender: Male
- Location: Bournemouth
Re: DIY data logging - ordered some parts to play with
I had an interest in electronics from a very young age as my dad was (still is, in semi-retirement) an electronic engineer. I was always building radios, amplifiers, etc. etc.
My first computer when I was a teenager was one of these.
http://www.old-computers.com/museum/computer.asp?c=802
Came with basic on board plus a disassembler - no assembler though. Once I was bored with basic it was working in machine code (hex) with a disassembler available to view. I certainly learnt plenty.
Anyway, got an electronics degree and worked as an electronic/software engineer ever since. Experience includes specialised telecomms for bus/underground/railway, machine controls, video analysis for materials testing, motor drive systems, low power radio signalling systems.
Is this really your first microcontroller project ? You seem to be going about it pretty much as I would for a 1 off apart from choice of processor. I guess we all tend to use what we know.
My first computer when I was a teenager was one of these.
http://www.old-computers.com/museum/computer.asp?c=802
Came with basic on board plus a disassembler - no assembler though. Once I was bored with basic it was working in machine code (hex) with a disassembler available to view. I certainly learnt plenty.
Anyway, got an electronics degree and worked as an electronic/software engineer ever since. Experience includes specialised telecomms for bus/underground/railway, machine controls, video analysis for materials testing, motor drive systems, low power radio signalling systems.
Is this really your first microcontroller project ? You seem to be going about it pretty much as I would for a 1 off apart from choice of processor. I guess we all tend to use what we know.
-
- Posts: 266
- Joined: 12/05/13 21:40
- Years of MR2 Ownership: 1
- MR2's Owned: 1
- Gender: Male
- Location: Bournemouth
Re: DIY data logging - ordered some parts to play with
Back on topic (sort of) my prototype is now basically working & installed in my celica in the hopes I can sort it's leaky water pump before the event on the 16th. Still a lot of work to do extending the software before it's ready as a product but it can at least look after my car.
The ECU is right behind the stereo slot on a celica so easier than coming from the dash. I'm currently running a link G3 ECU to get the mapping better for LPG.
The ECU is right behind the stereo slot on a celica so easier than coming from the dash. I'm currently running a link G3 ECU to get the mapping better for LPG.
-
Topic author - Posts: 4507
- Joined: 07/05/06 1:00
- Years of MR2 Ownership: 12
- MR2's Owned: 6
- Real Name: Mark
- Gender: Male
- Location: Reading, UK
- Been thanked: 2 times
- Contact:
Re: DIY data logging - ordered some parts to play with
Yeah, pretty much. I've never really worked without an OS underneath my code before, bar a quick tinker with an Arduino Leonardo over Christmas which has morphed into this project.Chris_D wrote:Is this really your first microcontroller project ? You seem to be going about it pretty much as I would for a 1 off apart from choice of processor. I guess we all tend to use what we know.
And yes, I am going about this using individual components in a one-off fashion... because, for me, this will be a one-off project. However there are three other good reasons:
1) I've never fabricated a PCB before and I'm sure I'd get so many things wrong on my first attempt that I'd have to make multiple iterations of the design
2) I have plans for this beyond the first phase, so the ability to plug more wires to the microcontroller or maybe reconfigure the connections will be invaluable
3) I intend to document all the parts and connections so anyone else with a suitable level of bravery can make something similar, even if they don't understand all the code and electronics behind it.
Anyway, I've got a busy weekend so no progress is going to occur for a few days. Last time I was doing anything I was just tidying up my codebase a little a modularising things. I suspect I'll end up extending to Adafruit OLED library to implement the controller's graphics mode and submitting my changes back to them (you know, to be nice). the next step is to be able to import XBM files and display them on the screen as graphics. I know I'm going down a tangent, but I've got no car to fit it to at the moment... besides, actually taking and converting the measurements should be the easy bit!
One other thing I've been thinking about is the fascia. I've been talking to another member on here about getting something milled to an exact specification. However I might just be able to buy one of these and drill a couple of holes and slots myself: http://www.ebay.co.uk/itm/260566242821 (This probably all depends how many buttons I'm going to put on it in the end)
-
- Full Member
- Posts: 5436
- Joined: 29/07/06 1:00
- Current Model: None
- Years of MR2 Ownership: 16
- MR2's Owned: 6
- Real Name: Three guesses!
- Gender: Male
- Location: Kent
- Been thanked: 31 times
Re: DIY data logging - ordered some parts to play with
Go fully digital shinny - you know want to...
http://www.autoblog.com/photos/toyota-m ... to-1031439
http://www.autoblog.com/photos/toyota-m ... to-1031439
If you're not living life on the edge, you're taking up too much room!
HM wrote: TonyleFrog aka "The Fog Penetrator"
HM wrote: TonyleFrog aka "The Fog Penetrator"
-
Topic author - Posts: 4507
- Joined: 07/05/06 1:00
- Years of MR2 Ownership: 12
- MR2's Owned: 6
- Real Name: Mark
- Gender: Male
- Location: Reading, UK
- Been thanked: 2 times
- Contact:
Re: DIY data logging - ordered some parts to play with
One step at a time, TonyTonyleFrog wrote:Go fully digital shinny - you know want to...
http://www.autoblog.com/photos/toyota-m ... to-1031439
Trust me, I thought about all that before, but my ability to think vastly outstrips my ability to implement, so I'll start "small" and work up form there
Besides, I really like how my speedo cluster looks now-a-days so don't really want to fiddle with it...
For the record, this is how the project's roadmap currently looks, although it's subject to change on a whim:
1) Multigauge / datalogging
2) Boost controler
3) Radiator fan / charge cooler pump controller
4) Coilover damping controller (EDFC for my BCs)
5) BOV controller
I think that's enough to be getting on with for now...
Re: DIY data logging - ordered some parts to play with
Anyone know if the data logger ever kicked off? Tis autumn the one Chris D has shown?
Cheers all
Cheers all