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-28-2008, 11:50 PM   #181 (permalink)
EcoModding Lurker
 
Join Date: Aug 2008
Location: Home
Posts: 21
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by dcb View Post
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.
Agreed. Elm is a good starting point. I'll probably skip 1.0 myself.

As far as bare-bones CAN, I'm not convinced it's a good idea. Hardware alone wouldn't just be "a couple of transistors", but rather quite a number of discretes (at least two Zeners, Cs, Rs, probably an op-amp). You'll need to worry about slew-rate, shielding the Arduino from transients and all that good stuff, and -- more importantly -- shield the car's CANbus from the Arduino. Just imagine what might happen if EMI within the Arduino is amplified and makes it to the CANbus, or if a transient melts your termination and shorts the bus... the CAN operates on a shared medium, and might well disable the car if choked.

And that's the next point... collision detection, arbitration, bitstuffing and phase-locking are all non-trivial problems that have folks much smarter than us scratching their heads. I don't think a 16 Mhz 168 is fast enough to handle 500kbs... even at 20 MHz you only have 40 cycles per bit to decode what's coming across the wire, and if that's enough, the uP is then fully utilized.

Logically, then, you might be looking for a second uP to handle the UI, and there you are out another $3-$4, along with the discretes... you might as well go with an available and proven solution.

Reading ahead (while I'm writing this) it appears ishiyakazuo was going the AT90-route. He is correct on the combined cost of MC+mega**8 solution vs. the AT90. Do keep in mind that the prototyping cost of the MC solution is considerably lower -- breadboard, RBBB, two DIP chips, done. No mussing with adapters or break-out boards. Ditto for reproducibility -- heck, you can wire-wrap this baby or stick it on a proto-shield.

I don't think we'll need 64K -- a large portion of the 12K-or-so in use now comes from the libraries you linked in. 32K should be plenty to do what you're attempting to accomplish here. I do have two precious ATmega328s here (thanks for the samples), and it's a perfect drop-in replacement for the 168. I'll pull the code and check the baseline this weekend.

BTW, good call on the Altoids tins The custom PCB to populate a la carte is certainly a very well "kit"able option. I'm curious to see how the differential bus compares to, say, an RS485, where many solid interfaces are available.

  Reply With Quote
Alt Today
Popular topics

Other popular topics in this forum...

   
Old 08-29-2008, 07:45 AM   #182 (permalink)
dcb
needs more cowbell
 
dcb's Avatar
 
Join Date: Feb 2008
Location: ÿ
Posts: 5,038

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: 158
Thanked 269 Times in 212 Posts
Quote:
Originally Posted by jmilk View Post
I don't think a 16 Mhz 168 is fast enough to handle 500kbs...
The elm runs at 4.00 mhz.
__________________
WINDMILLS DO NOT WORK THAT WAY!!!
  Reply With Quote
Old 08-29-2008, 07:49 AM   #183 (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
Also worth noting that the atmega32 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.
I meant to mention going this route, actually.

Quote:
Originally Posted by jmilk View Post
As far as bare-bones CAN, I'm not convinced it's a good idea. Hardware alone wouldn't just be "a couple of transistors", but rather quite a number of discretes (at least two Zeners, Cs, Rs, probably an op-amp). You'll need to worry about slew-rate, shielding the Arduino from transients and all that good stuff, and -- more importantly -- shield the car's CANbus from the Arduino. Just imagine what might happen if EMI within the Arduino is amplified and makes it to the CANbus, or if a transient melts your termination and shorts the bus... the CAN operates on a shared medium, and might well disable the car if choked.
I think there was a misunderstanding somewhere. We were talking about "a couple of transistors" for the ISO-9141 bus, which is fairly low speed and is basically RS-232 at different levels and at a strange 10400 baud rate.
For CAN, we'd use one of the following hookups:
- ELM 327 with its recommended schematic
- The Microchip parts you proposed
- AT90CAN parts with hardware CAN support

Quote:
Originally Posted by jmilk View Post
And that's the next point... collision detection, arbitration, bitstuffing and phase-locking are all non-trivial problems that have folks much smarter than us scratching their heads. I don't think a 16 Mhz 168 is fast enough to handle 500kbs... even at 20 MHz you only have 40 cycles per bit to decode what's coming across the wire, and if that's enough, the uP is then fully utilized.

Logically, then, you might be looking for a second uP to handle the UI, and there you are out another $3-$4, along with the discretes... you might as well go with an available and proven solution.
No one was ever suggesting we should implement CAN in software It's hard enough with a dedicated PHY, from what Yoshi said.

Quote:
Originally Posted by jmilk View Post
Reading ahead (while I'm writing this) it appears ishiyakazuo was going the AT90-route. He is correct on the combined cost of MC+mega**8 solution vs. the AT90. Do keep in mind that the prototyping cost of the MC solution is considerably lower -- breadboard, RBBB, two DIP chips, done. No mussing with adapters or break-out boards. Ditto for reproducibility -- heck, you can wire-wrap this baby or stick it on a proto-shield.
Agreed. Plus it's much quicker to get everyone the same setup.

Quote:
Originally Posted by jmilk View Post
I don't think we'll need 64K -- a large portion of the 12K-or-so in use now comes from the libraries you linked in. 32K should be plenty to do what you're attempting to accomplish here. I do have two precious ATmega328s here (thanks for the samples), and it's a perfect drop-in replacement for the 168. I'll pull the code and check the baseline this weekend.

BTW, good call on the Altoids tins The custom PCB to populate a la carte is certainly a very well "kit"able option. I'm curious to see how the differential bus compares to, say, an RS485, where many solid interfaces are available.
The only reason I was talking about AT90CAN64 vs AT90CAN32 is because the 64 is less than a buck more, and is more widely available. (And let's face it, extra flash never hurt anyone... unless you're terribly obsessed with power consumption.) I'll also be picking up some ATMega328s.
  Reply With Quote
Old 08-29-2008, 08:08 AM   #184 (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
The elm runs at 4.00 mhz.
Actually, it has a 4x PLL in it, so it could also be running at 16MHz...
But also worth noting is that the PIC that the ELM uses (PIC16F2x80) has hardware PWM and CAN as well, so CPU speed may be a non-issue (it's just shuffling data between the serial port and hardware peripherals, with the exception of VPW, which isn't too difficult due to its very broad definition of "10.4kbps" (it could be significantly more or less, depending on how good your bit timings are).
  Reply With Quote
Old 08-29-2008, 08:23 AM   #185 (permalink)
dcb
needs more cowbell
 
dcb's Avatar
 
Join Date: Feb 2008
Location: ÿ
Posts: 5,038

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: 158
Thanked 269 Times in 212 Posts
Quote:
Originally Posted by ishiyakazuo View Post
No one was ever suggesting we should implement CAN in software
I was, just putting it out there
__________________
WINDMILLS DO NOT WORK THAT WAY!!!
  Reply With Quote
Old 08-29-2008, 08:45 AM   #186 (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
I was, just putting it out there
Oh, sorry, missed that.
Yeah, probably not a good idea, for the reasons jmilk detailed. If the chip doesn't have a CAN hardware block, it's probably nigh impossible to do with anything cheap (you could write it in straight ASM, and maybe have a shot with a 50MHz ARM7, but at that point you've already blown past the cost of a dedicated CAN part).
  Reply With Quote
Old 08-29-2008, 12:46 PM   #187 (permalink)
EcoModding Lurker
 
Join Date: Aug 2008
Location: Home
Posts: 21
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by ishiyakazuo View Post
But also worth noting is that the PIC that the ELM uses (PIC16F2x80) has hardware PWM and CAN as well, so CPU speed may be a non-issue
18F2480, right? Hardware CAN... that'll do it. And it's also my problem with ELM... they're re-selling a $5 chip for $30. That's a $25 license fee for what amounts to bit-shuffling software that shields a tad of the complexity of the underlying bus... and you're pretty much stuck with the firmware, because they don't provide upgrades.

Quote:
Originally Posted by ishiyakazuo View Post
The only reason I was talking about AT90CAN64 vs AT90CAN32 is because the 64 is less than a buck more, and is more widely available. (And let's face it, extra flash never hurt anyone... unless you're terribly obsessed with power consumption.) I'll also be picking up some ATMega328s.
There's no appreciable difference in power-consumption for flash memory based on capacity. IIRC, flash only actively powers the page currently read-from/written-to, so page count is immaterial. RAM's different, but too small to matter here. Clock speed and operating voltage are just about proportional to power-consumption, however -- even so, I don't think the maximum consumption of fully clocked AT90 (0.15W at 5V/16MHz) would matter in the grand scheme of things (the LCD uses 10x that); and an ATmega328P uses even less... theoretically, it's 0.05W at 5V/20MHz).
  Reply With Quote
Old 08-29-2008, 01:25 PM   #188 (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
Note also that you must be CAN compliant to plug something on your CAN bus, unfortunatly the AtMega is not qualified for C&S CAN Conformance like the AT90CAN.

Also the ELM327/Arduino can be used as a "scantool" interface and be used with dozens of software running on laptop/palm/etc. using a simple 3-wires null modem cable.

The ELM327 v1.3 can easily retrieve 30-80 PIDs per second, which is more than enough. And it implements the basic ISO/VPW/PWM protocol but also the CAN protocol 11 bit and 29 bit, 250k, 500k, header filtering, etc

I agree the solution can move to the AT90CAN** for a 2.0 version, but it needs a PCB and all.

BTW we also use the MC 2551 with the ELM327.
For the code we actually use less than 10k for ISO, my ELM proto is about 12k, we still have space to play with.
__________________
2013 Hyundai Sonata Hybrid

Last edited by Magister; 08-29-2008 at 02:54 PM..
  Reply With Quote
Old 08-29-2008, 02:09 PM   #189 (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 jmilk View Post
There's no appreciable difference in power-consumption for flash memory based on capacity. IIRC, flash only actively powers the page currently read-from/written-to, so page count is immaterial. RAM's different, but too small to matter here. Clock speed and operating voltage are just about proportional to power-consumption, however -- even so, I don't think the maximum consumption of fully clocked AT90 (0.15W at 5V/16MHz) would matter in the grand scheme of things (the LCD uses 10x that); and an ATmega328P uses even less... theoretically, it's 0.05W at 5V/20MHz).
Like I said, you'd have to be absolutely nuts to worry about the difference in power usage of the extra flash I think as size increases, the controller is slightly more complex, which adds a VERY miniscule amount to the power usage (we're talking uW here). It was basically meant to be a joke.

The ATmega328P would use less, but then you have to use the extra Microchip part, which might even things up a bit.

I didn't look at the LCD power ratings, but do backlights use that much still? I guess 1.5W isn't that bad when hooked up to a car battery, but I'm a little surprised -- I just wrapped a project a few months back with an ARM7 @ 48MHz with USB, an FPGA and a 2x16 LCD (non-backlit) and the entire setup amounted to about 1W off of a +5v supply.
  Reply With Quote
Old 08-29-2008, 02:47 PM   #190 (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.
I was looking on Mouser for some other things and noticed this:
Alternate LCD?
It's the same display but with only one set of interface holes.
They also have this one which is the same thing but a little smaller (nice if fitting in your project box is tight).
This other one is yet cheaper but the connector is on the side (in my opinion, the most awkward).
I'm thinking when I lay out my Altoiduino board for this project, I'll try to put the LCD connectors on both the top and bottom so you can use either, and if there's extra space, I'll throw the side connector on too, but routing a handful of pins to two places is bad enough -- 3 is a real pain.

  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 1061 01-17-2020 01:37 AM
Just some quick info on Scangauge vs. MPGuino NoCO2 OpenGauge / MPGuino FE computer 4 06-01-2015 04:58 PM
All New Nissan Models to Feature Fuel Efficiency Gauge MetroMPG General Efficiency Discussion 6 11-18-2008 04:57 PM
Vacuum gauge problems :( DifferentPointofView Instrumentation 3 05-14-2008 11:04 PM
Will Scan Gauge work on mine? bennelson Instrumentation 9 02-19-2008 10:04 PM



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