Go Back   EcoModder Forum > EcoModding > Instrumentation > OpenGauge / MPGuino FE computer
Register Now
 Register Now
 

Reply  Post New Thread
 
Submit Tools LinkBack Thread Tools
Old 08-21-2008, 11:37 AM   #171 (permalink)
OBDuino coder
 
Magister's Avatar
 
Join Date: Jun 2008
Location: Montrťal, QC
Posts: 212

Titine - '13 Hyundai Sonata Hybrid
Thanks: 3
Thanked 10 Times in 8 Posts
ELM327 CAN part:

How can it be so simple, I took the reference design from the PDF and removed the non CAN stuff, here is the result:

The chip need more power than what the 78L05 from the duino (100mA) can provide so I will replace it with a 7805 (1A).
Basically there is the ELM327, the MCP2551, a crystal, 3 resistors, 5 capacitors.

This will be my starting point. Note that I will not use a MAX232 or transistors to convert the rx/tx to RS232 level as I will use a direct connect to the pin 0 and 1 of the Arduino, it should work, isn't it?

__________________
2013 Hyundai Sonata Hybrid

Last edited by Magister; 09-05-2008 at 04:05 PM..
  Reply With Quote
Alt Today
Popular topics

Other popular topics in this forum...

   
Old 08-21-2008, 11:52 AM   #172 (permalink)
Test Tool Engr.
 
Join Date: Aug 2008
Location: Elgin, IL, USA
Posts: 47

Red Rocket - '02 Honda Civic LX Sedan
90 day: 33.57 mpg (US)

Bronze Bucket - '98 Toyota Corolla VE
90 day: 34.97 mpg (US)

Silver Bullet - '06 Hyundai Sonata GL
90 day: 31.58 mpg (US)
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by Magister View Post
The freescale is free as a sample, even 2 samples are free
It is a chip used in professionnal tools for years, it includes about 75 transistors.
I plan to build at least two of these devices myself though, so I'm looking towards the future

Quote:
Originally Posted by dcb
I wouldn't even bother reporting on a non atmega168 results, yah it *should* work, bla bla, don't care , wait for your arduino before you draw any conclusions please.
I think you read what I said kind of backwards here.
As Magister said, the Freescale one is a real, professional way to ensure compliance to ISO 9141 spec. The "throw some resistors and transistors together" method is not. Whether or not I have an Arduino in my hands doesn't change this fact. My conclusion is still that the Freescale provides a lower-risk path to getting there, although when it comes to the longer term, if the resistor/transistor method works, it is both easier to solder and cheaper, so I'm enticed to try it first.
  Reply With Quote
Old 08-22-2008, 03:10 PM   #173 (permalink)
Test Tool Engr.
 
Join Date: Aug 2008
Location: Elgin, IL, USA
Posts: 47

Red Rocket - '02 Honda Civic LX Sedan
90 day: 33.57 mpg (US)

Bronze Bucket - '98 Toyota Corolla VE
90 day: 34.97 mpg (US)

Silver Bullet - '06 Hyundai Sonata GL
90 day: 31.58 mpg (US)
Thanks: 0
Thanked 0 Times in 0 Posts
Got my Arduinos
I'll solder one up this weekend (probably Sunday) and then it's time to party
  Reply With Quote
Old 08-22-2008, 03:24 PM   #174 (permalink)
dcb
needs more cowbell
 
dcb's Avatar
 
Join Date: Feb 2008
Location: ˇ
Posts: 5,032

pimp mobile - '81 suzuki gs 250 t
90 day: 96.29 mpg (US)

schnitzel - '01 Volkswagen Golf TDI
90 day: 53.56 mpg (US)
Thanks: 156
Thanked 264 Times in 207 Posts
FYI, if you are in a hurry, the currently recommended display is made by newhaven display in elgin. I've asked nicely and they have let me stop in to pick up a couple models. You can get everything else from ratshack.
__________________
WINDMILLS DO NOT WORK THAT WAY!!!
  Reply With Quote
Old 08-22-2008, 03:44 PM   #175 (permalink)
dcb
needs more cowbell
 
dcb's Avatar
 
Join Date: Feb 2008
Location: ˇ
Posts: 5,032

pimp mobile - '81 suzuki gs 250 t
90 day: 96.29 mpg (US)

schnitzel - '01 Volkswagen Golf TDI
90 day: 53.56 mpg (US)
Thanks: 156
Thanked 264 Times in 207 Posts
Quote:
Originally Posted by Magister View Post
ELM327 CAN part:

How can it be so simple,
Looks good.

I would change C5 to a 330uf electrolytic to be consistent with the mpguino

Don't need L5 and R1 of course, or can tap into the duinos 7805 if it has one.

Can also delete L1-L4 and R27-R30 if feeling adventurous

I might add about a 330 ohm resistor in series with the RX/TX lines, though it shouldn't matter if the pins come up with the right impedance/line levels when the chips boot up.
__________________
WINDMILLS DO NOT WORK THAT WAY!!!
  Reply With Quote
Old 08-22-2008, 03:48 PM   #176 (permalink)
Test Tool Engr.
 
Join Date: Aug 2008
Location: Elgin, IL, USA
Posts: 47

Red Rocket - '02 Honda Civic LX Sedan
90 day: 33.57 mpg (US)

Bronze Bucket - '98 Toyota Corolla VE
90 day: 34.97 mpg (US)

Silver Bullet - '06 Hyundai Sonata GL
90 day: 31.58 mpg (US)
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by dcb View Post
FYI, if you are in a hurry, the currently recommended display is made by newhaven display in elgin. I've asked nicely and they have let me stop in to pick up a couple models. You can get everything else from ratshack.
Nice, thanks for the heads-up on that. I'm probably not going to have a chance to interface it to my car this weekend, so I might order a handful of things from Mouser today.

I've got some LCDs (the blue ones with white backlight from Modern Device), and some LCDs we use at work (non-backlit Hantronix ones). For the time being, I'm going to use those, and I'll just wire it up so that I can swap it out with a different one later if I hate them.

But man, Newhaven is only like 2 miles from where I work... I'll see if I can work out that "drop in" with them at some point too. (I want to make a custom version of one of my company's products with a cooler looking LCD too)

Anyway, we'll see how far I get with it this weekend. I've gotta re-wire one of my RS232 level shifters to work with RBBB's pinout (or vice-versa) too.

EDIT: Well, I got my Arduino all soldered up, but I don't think I'll have any time to play with it until Sunday evening now. Maybe if I have a few extra minutes this evening I can at least verify communications with it.

Last edited by ishiyakazuo; 08-22-2008 at 07:56 PM..
  Reply With Quote
Old 08-28-2008, 07:11 PM   #177 (permalink)
EcoModding Lurker
 
Join Date: Aug 2008
Location: Home
Posts: 21
Thanks: 0
Thanked 0 Times in 0 Posts
Ok, my turn

I've been looking into this for a few days now, but DCB just send me to this thread.

Here's what I know and think -- feel free to disagree or correct where I'm mistaken. I'm coming from a car (Kia/Hyundai) that I believe is all-CAN. In either case, CAN is mandated in the future (MY2010, I think), so it's a good focus.

First off, I think ELM is the wrong way to go. Those chips are over $30 and they don't add any appreciable value to the circuit... certainly not $30 worth. Instead, I would go with the MC2515/MC2551 combination. Advantages:
- Less than $5 in single quantities, less than $3 in 100+.
- Available in DIP (and smaller form factors)
- SPI instead of RS23x -- forget baudrates, AT-commands and all that junk + run full-speed.
- ELM still calls their (expensive!!) chips "experimental", while Microchip is already on the 2nd generation of production.
- MC isn't going anywhere... ELM?
Disadvantages:
- Slightly more code.

Secondly, I think the arduino/ATMega platform is fine; AVR's automotive chips with built-in CAN are interesting, but beyond the reach of a hobbyist as far as handling goes. If code size really becomes an issue, there's the option of the ATmega328 with 32K flash. Additional advantages of the Arduino platform are the bootloader and IDE; and the 168 and 328 are available in DIP forms.

Thirdly, I'm not using an arduino -- I didn't gleam any info about what you folks are using, but I've taken to using the Boarduino (Adafruit Industries, Unique & fun DIY electronics and kits) and the RBBB (Modern Device Company). Both those kits are bread-boardable, and have much improved boatloaders. Don't forget the USB cable if you purchase one.

As far as code goes, there are some valid points made here -- both as far as planning ahead, as well as to the end of just getting things working. Proof-of-concept is great and positively a requirement, but it shouldn't be much more difficult to structure to code in such a way that it's adaptable. (Disclaimer: I haven't looked at the code yet).

My approach to this (as I've formed it in my mind over the last few days of researching OBDII, CANbus, etc) would be somewhat modular:
(A) Physical
(B) Protocol
(C) Application/UI

For all buses, (C) would be the Arduino with LCD and buttons. It would receive an abstracted form of the data, ideally (** more below) indepdent of the physical interface.

(A) would be a combination of cable, MC2551+MC2515 for the CANbus, then connect via SPI. For the other buses it could be another processor (mega48 or tiny2313) which interprets the data-stream from the OBDII and turns it into either SPI or UART-Serial. We could go nuts and emulate the MC2515 and have it truly plug-and-play, but given (B) is flexible, we probably wouldn't have to go that far.

(B) would likely reside on the UI processor and directly communicate with the 2515; it may partially reside within (A).

For my CAN scenario, I'm looking at $10-$12 in parts excluding the PCB, LCD and connector. The whole thing, in single quantity, should come in under $30 -- that's less than the ELM chip alone.

As far as the PIDs go, that is pretty well standardized: OBD-II PIDs - Wikipedia, the free encyclopedia ; ideally, the code would simply issue a $0100 to see what's available, and then look for those PIDs in the broadcast.

It looks as if all the parts are there... and we just have to glue them together with a little solder and a little more code. I won't be very active on this as far as hardware goes until after vacation (mid October), but it seems like a nice winter project.

Oh, and before I forget, my intention here is to achieve the following functionality:
- Replace the "trip computer"
- Add instant mpg
- Add avg mpg last x minutes/miles, since last stop, since beginning of trip, today, this week, this month.
- Track/log mpg for different drivers.
(and a few more)
  Reply With Quote
Old 08-28-2008, 08:10 PM   #178 (permalink)
dcb
needs more cowbell
 
dcb's Avatar
 
Join Date: Feb 2008
Location: ˇ
Posts: 5,032

pimp mobile - '81 suzuki gs 250 t
90 day: 96.29 mpg (US)

schnitzel - '01 Volkswagen Golf TDI
90 day: 53.56 mpg (US)
Thanks: 156
Thanked 264 Times in 207 Posts
Easy cowboy Elm has been decided for 1.0, it is universal, easy to implement, and being through hole it is very "kit"able. We are going to work on the price AFTER getting something out there.

for the post elm obd version, we hope to be as low cost as possible, but have not abandoned the arduino platform yet. ishiyakazuo is looking into a software only (duino + a couple transistors) ISO implementation. Maybe you want to sort out the bare bones CAN details? It would be good if there is a bare minimum through hole couple transistors software only CAN version as well, as far as price and assembly go.
__________________
WINDMILLS DO NOT WORK THAT WAY!!!
  Reply With Quote
Old 08-28-2008, 11:22 PM   #179 (permalink)
Test Tool Engr.
 
Join Date: Aug 2008
Location: Elgin, IL, USA
Posts: 47

Red Rocket - '02 Honda Civic LX Sedan
90 day: 33.57 mpg (US)

Bronze Bucket - '98 Toyota Corolla VE
90 day: 34.97 mpg (US)

Silver Bullet - '06 Hyundai Sonata GL
90 day: 31.58 mpg (US)
Thanks: 0
Thanked 0 Times in 0 Posts
From a through-hole vs. SMD standpoint, the Microchip parts are definitely a win, since they're both available in PDIP.
All told, the ATMega168 + MCP2515 + MCP2551 solution costs about the same as an AT90CAN64, without the hassle of surface mount. The drawback to this approach is just code size. (ATMega168's 16k vs. AT90CAN64's 64k)

I just got my AT90CAN64 and I ordered those boards from SparkFun, so I might try my hand at the surface-mount soldering. If it's easy enough, I might be willing to buy a bunch of those and pre-solder on the CPU for anyone who's not up to the task. (I've done some SMD soldering, but it's been quite awhile...)

I got the various parts I need yesterday, I just need to set aside some time to actually throw everything together. (I'm heading out of town for the long weekend, so it'll probably be Monday.) I'm also using RBBB for the moment, although I do plan to lay out a custom board that supports connection to ISO/VPW/PWM/CAN/ECU all in one (just populate the parts you need), which will hopefully fit into an Altoids tin. I found some fairly cheap standoffs on Mouser that I'll try out once the board is done as well.

For right now, I think if someone's willing to investigate the Microchip parts, that's good stuff. Since a good part of the protocol still needs to be done by hand, most of the code will probably be applicable to an AT90CAN implementation down the road as well, so I think the more the merrier, as far as these kinds of methods are concerned

As dcb said, the ELM is the "I want it right now" solution to the problem at hand. I wouldn't underestimate how much it actually takes care of for you -- it makes life quite a bit simpler.
  Reply With Quote
Old 08-28-2008, 11:35 PM   #180 (permalink)
dcb
needs more cowbell
 
dcb's Avatar
 
Join Date: Feb 2008
Location: ˇ
Posts: 5,032

pimp mobile - '81 suzuki gs 250 t
90 day: 96.29 mpg (US)

schnitzel - '01 Volkswagen Golf TDI
90 day: 53.56 mpg (US)
Thanks: 156
Thanked 264 Times in 207 Posts
Also worth noting that the atmega328 for arduino probably isn't very far off either and it should just be a drop in replacement for the atmega168. I know a few folks have already got it working. It has 2Kram and 32kflash, 1Keprom and is a buck or two more.

__________________
WINDMILLS DO NOT WORK THAT WAY!!!

Last edited by dcb; 08-29-2008 at 10:02 AM..
  Reply With Quote
Reply  Post New Thread


Tags
obd2

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
MPGuino release one workspace dcb OpenGauge / MPGuino FE computer 1060 09-27-2016 11:56 PM
Just some quick info on Scangauge vs. MPGuino NoCO2 OpenGauge / MPGuino FE computer 4 06-01-2015 05:58 PM
All New Nissan Models to Feature Fuel Efficiency Gauge MetroMPG General Efficiency Discussion 6 11-18-2008 05:57 PM
Vacuum gauge problems :( DifferentPointofView Instrumentation 3 05-15-2008 12:04 AM
Will Scan Gauge work on mine? bennelson Instrumentation 9 02-19-2008 11:04 PM



Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2018, vBulletin Solutions Inc.
Content Relevant URLs by vBSEO 3.5.2
All content copyright EcoModder.com