Simple CAN Bus Prototyping Board
Simple CAN Bus Prototyping Board
Not directly rusefi related, but it's tangentially related to vehicle hacking and retrofitting, and I think this could be useful.
In an attempt to better familiarize myself with circuit design and to help with one of my ongoing projects, I've "developed" a compact breakout board for the MCP2515 SPI CAN interface chip with onboard transceiver and RJ45 connectors.
The idea behind these adapters is they can be daisy chained together using off the shelf CAT6 cables to connect an arbitrary number of MCUs via a common CAN bus. Jumpers on each board control the connection of the onboard terminating resistor as well as an operating voltage selector for either 5v or 3v3 operation. The eventual plan involves using shielded cables and connectors, but for testing I figure the regular stuff should be fine.
Is this anything new? No, but every variant of this idea that I could find was either designed as an Arduino shield, had too many additional features, used a different connector (I specifically want RJ45) or some combination thereof, so here it is.
I make no promises that this actually works in its current state, I've already had one set of boards fabbed only to find I messed up the footprints, so this is the second try as well as an opportunity for some proofing by better trained eyes.
Currently, the MCP2562 is on backorder with all retailers I checked (for soic footprint), but I believe the MCP2551 to be a suitable substitute (although this forces 5v operation only).
GitHub: https://github.com/ZHoob2004/canbus
I'll add pictures eventually, but there is a pdf of the schematic as well as kicad files in the github link
Here's a render for you
In an attempt to better familiarize myself with circuit design and to help with one of my ongoing projects, I've "developed" a compact breakout board for the MCP2515 SPI CAN interface chip with onboard transceiver and RJ45 connectors.
The idea behind these adapters is they can be daisy chained together using off the shelf CAT6 cables to connect an arbitrary number of MCUs via a common CAN bus. Jumpers on each board control the connection of the onboard terminating resistor as well as an operating voltage selector for either 5v or 3v3 operation. The eventual plan involves using shielded cables and connectors, but for testing I figure the regular stuff should be fine.
Is this anything new? No, but every variant of this idea that I could find was either designed as an Arduino shield, had too many additional features, used a different connector (I specifically want RJ45) or some combination thereof, so here it is.
I make no promises that this actually works in its current state, I've already had one set of boards fabbed only to find I messed up the footprints, so this is the second try as well as an opportunity for some proofing by better trained eyes.
Currently, the MCP2562 is on backorder with all retailers I checked (for soic footprint), but I believe the MCP2551 to be a suitable substitute (although this forces 5v operation only).
GitHub: https://github.com/ZHoob2004/canbus
I'll add pictures eventually, but there is a pdf of the schematic as well as kicad files in the github link
Here's a render for you
Re: Simple CAN Bus Prototyping Board
A hole which can be used to screw it down, or zip tie it to something could be useful. Those RJ45's are likely to be connected to something and the strain relief could be helpful. Also you could make an RJ45 with a termination resistor, or purchase one. This removes the need for that to be local, and it ensure your termination resistor is at the end of the line. I don't know if there are any RJ45 standard pin outs, but I might suggest using Schneider's pin out from the CANOpen stuff.
Pricey, but purchasable RJ45 CANOpen termination resistor found here.
https://www.schneider-electric.us/en/product/TCSCAR013M120/canopen-line-terminator-for-rj45-connector/
Schneider's CANOpen pin out. Found here.
https://www.schneider-electric.com/library/SCHNEIDER_ELECTRIC/SE_LOCAL/APS/182258_DD0E/16.9690.gif
Pricey, but purchasable RJ45 CANOpen termination resistor found here.
https://www.schneider-electric.us/en/product/TCSCAR013M120/canopen-line-terminator-for-rj45-connector/
Schneider's CANOpen pin out. Found here.
https://www.schneider-electric.com/library/SCHNEIDER_ELECTRIC/SE_LOCAL/APS/182258_DD0E/16.9690.gif
Welcome to the friendlier side of internet crazy
Re: Simple CAN Bus Prototyping Board
Using the CANOpen pinout is a really good idea. I think the thought crossed my mind but I forgot before I actually implemented it. The two pins I've used so far match the CANOpen pinout, but I also forgot that CAN needs a common ground between all nodes which I planned to pass over the ethernet cables along with power (which CANOpen doesn't technically allow over rj45, but I think I can run it over pin 7 without trouble.) I also realize now that I need to connect every pin of the RJ45 connectors in parallel, even the ones I'm not currently using.
I'm not too excited about the cost of those ready-made RJ45 terminators, and since this is mostly intended for breadboard development I think I'll stick with the built in terminator for now (it can be omitted during assembly if the functionality isn't needed.)
I'm not too sure about mounting/tie down holes since my original idea involves connecting this to an MCU via a breadboard, and then implementing the can interface on board in the final project.
I'm not too excited about the cost of those ready-made RJ45 terminators, and since this is mostly intended for breadboard development I think I'll stick with the built in terminator for now (it can be omitted during assembly if the functionality isn't needed.)
I'm not too sure about mounting/tie down holes since my original idea involves connecting this to an MCU via a breadboard, and then implementing the can interface on board in the final project.
Re: Simple CAN Bus Prototyping Board
I've given myself a week or so to think about the design to make sure I don't make any other stupid mistakes (I ordered a set before I posted and screwed up the MCP2515 footprint) and after giving the design another look I don't see any glaring flaws. I've also added lines to the connectors so all 8 pins are connected straight through.
I'm ordering a set of boards to test out so hopefully they're close enough that I can make them work.
I could probably better utilize the backside of the board to make it smaller (and cheaper), but that will have to wait because I don't feel like it right now.
I'm ordering a set of boards to test out so hopefully they're close enough that I can make them work.
I could probably better utilize the backside of the board to make it smaller (and cheaper), but that will have to wait because I don't feel like it right now.
Re: Simple CAN Bus Prototyping Board
what's the purpose of that board? why don't you buy the ready-made chinese boards - they have both the tranceiver and the logic chip. All you need is to attach them to a µc. you can daisychain them using any wires, not nececerily CAT6 cables.
Re: Simple CAN Bus Prototyping Board
If I were asked what the point of the Frankenso board is, I'd have trouble coming up with a "real" answer. I usually just mumble something gibberish and hope it's enough to distract the asking party. If that doesn't work, I say I just felt like it, either that or world domination.
It might be worth considering, an RJ45 breakout board with a china CAN module. Perhaps something similar to the below.
It might be worth considering, an RJ45 breakout board with a china CAN module. Perhaps something similar to the below.
- Attachments
-
- brksm8p8csj-r-p_term_iso.jpg (34.62 KiB) Viewed 21691 times
Welcome to the friendlier side of internet crazy
Re: Simple CAN Bus Prototyping Board
on the contrary! there were no alternatives for frankenso, i.e. a shield for stm32 discovery, that would have all those bells and whistles to control automotive engines. however, there are plenty of similar can boards like this
https://www.aliexpress.com/item/MCP2515-CAN-Bus-Module-TJA1050-Receiver-SPI-Module-For-arduino/32817132818.html?spm=2114.search0104.3.18.1v94mo&ws_ab_test=searchweb0_0,searchweb201602_3_10152_10065_10151_10068_10344_10345_10342_10343_10340_10341_10543_10541_10307_5670020_10301_10060_10155_10154_10056_10055_10539_10537_10536_10059_10534_10533_100031_10103_10102_10169_10142_10107_10562_10084_10083_10563_10561_10566_5740016_10564_10565_5650020_10312_10313_10314_5660020_10550_10073_10551_10552_10553_10554_10557,searchweb201603_4,ppcSwitch_2&btsid=627180e3-7471-4ea7-b99d-a6b4ab52ae84&algo_expid=38c5d35b-a6fa-41ea-902b-65b1c9c358c7-2&algo_pvid=38c5d35b-a6fa-41ea-902b-65b1c9c358c7
I'd suggest the following idea (if you want to try yourself in designing pcbs): you can design a board that would accomodate all those can-related stuff like the shield above + an automotive-grade 5V power supply, an old good avr microcontroller (mega328?), an ISP connector to flash the firmware and a placeholder for switec stepper motor. You can the use such boards for building sexy custom automotive gauges. This could score a big win! (you listen to the can bus and dislay needed values using a needle on a dial plate!). I'd even pay 10$ for a couple of such boards
https://www.aliexpress.com/item/MCP2515-CAN-Bus-Module-TJA1050-Receiver-SPI-Module-For-arduino/32817132818.html?spm=2114.search0104.3.18.1v94mo&ws_ab_test=searchweb0_0,searchweb201602_3_10152_10065_10151_10068_10344_10345_10342_10343_10340_10341_10543_10541_10307_5670020_10301_10060_10155_10154_10056_10055_10539_10537_10536_10059_10534_10533_100031_10103_10102_10169_10142_10107_10562_10084_10083_10563_10561_10566_5740016_10564_10565_5650020_10312_10313_10314_5660020_10550_10073_10551_10552_10553_10554_10557,searchweb201603_4,ppcSwitch_2&btsid=627180e3-7471-4ea7-b99d-a6b4ab52ae84&algo_expid=38c5d35b-a6fa-41ea-902b-65b1c9c358c7-2&algo_pvid=38c5d35b-a6fa-41ea-902b-65b1c9c358c7
I'd suggest the following idea (if you want to try yourself in designing pcbs): you can design a board that would accomodate all those can-related stuff like the shield above + an automotive-grade 5V power supply, an old good avr microcontroller (mega328?), an ISP connector to flash the firmware and a placeholder for switec stepper motor. You can the use such boards for building sexy custom automotive gauges. This could score a big win! (you listen to the can bus and dislay needed values using a needle on a dial plate!). I'd even pay 10$ for a couple of such boards
Re: Simple CAN Bus Prototyping Board
Welp, I've been found out . The final goal is to create some drop-in PCBs to retrofit the gauges in my 280z with steppers and interconnect them using a daisy-chained canbus. I could still do that with bare wires, or DB9 or any other of the billion connectors available, but I'm a network admin by trade and I like the idea of grabbing a handful of $2 cables and just plugging the system together. Hopefully, I should be able to almost completely eliminate the dash harness and replace it with a single CAT6 cable connecting to the rest of the car.puff wrote:you can design a board that would accomodate all those can-related stuff like the shield above + an automotive-grade 5V power supply, an old good avr microcontroller (mega328?), an ISP connector to flash the firmware and a placeholder for switec stepper motor. You can the use such boards for building sexy custom automotive gauges. This could score a big win! (you listen to the can bus and dislay needed values using a needle on a dial plate!). I'd even pay 10$ for a couple of such boards
As for the point? I'm a complete amateur when it comes to designing electronics and think this is a simple enough design to start, but complex enough that I'm not just following a tutorial. I figured I would start by making this part work, then move up to a completely integrated solution. Ideally, the Datsun will need 2x boards for the speedo/tach and 2x smaller boards for the other gauges (and potentially another small board if I want to sacrifice that sweet analog clock). Plus these boards will be useful for when I'm testing the gauge boards as I can use them to put more devices on the bus for testing.
Hopefully there weren't any glaring errors on this batch of boards, because I already submitted them to oshpark.
Re: Simple CAN Bus Prototyping Board
If your intention is automotive use then (Jared would probably agree) RJ45 is not your choice!
From my point of view it's comlete waste of money
I am familiar with such obsession. Usually it needs some time before I talk myself out of some crazy idea. And then comes the next iteration, which is usually way better.
I would say such boards need to have solder pads or some vibration-resistant automotive-grade connectors (4 pins? 5 pins?) they need to have smallest possible footprint with some decent mounting holes (my initial idea was to replace speedo, tacho, fuel and temp gauges in my rover dashboard). plus it needs some solution to zero the needle when the device is turned off.
some time ago I built a proto board with all this canbus stuff and a microcontroller, with just several connectors, but I couldn't make it talk to rusefi for some reason. instead, as a temporary solution,I got a beautiful dashboard from mazda rx7 - haven't installed it yet though ;-(
btw, that proto board is still there waiting for me.. %-)
From my point of view it's comlete waste of money
I am familiar with such obsession. Usually it needs some time before I talk myself out of some crazy idea. And then comes the next iteration, which is usually way better.
I would say such boards need to have solder pads or some vibration-resistant automotive-grade connectors (4 pins? 5 pins?) they need to have smallest possible footprint with some decent mounting holes (my initial idea was to replace speedo, tacho, fuel and temp gauges in my rover dashboard). plus it needs some solution to zero the needle when the device is turned off.
some time ago I built a proto board with all this canbus stuff and a microcontroller, with just several connectors, but I couldn't make it talk to rusefi for some reason. instead, as a temporary solution,I got a beautiful dashboard from mazda rx7 - haven't installed it yet though ;-(
btw, that proto board is still there waiting for me.. %-)
Re: Simple CAN Bus Prototyping Board
RJ45's for automotive dash use... I would have mixed opinions on it. I suspect there are issues with them if you attempt to do things like drive the stepper motors. Those connectors were intended for communications, not power. I would have to look into POE standards to see what kind of power you can get across those connectors. I recall they do it with something like 60VDC, and allow fairly low amps, as well they limit the inrush currents, etc. I recall they basically use very small amps, the once they establish the connection has been made and is solid not bouncing contacts, etc, then it allows the increased currents. Power of such cables is very difficult.
About AEQ qualified components, they do have lots of extra quality check points, which is really helpful for life safety stuff. I think your gauges are debate-ably life safety related. I don't think they are life safety, but I can see how others might debate they are critically important. I agree that an automotive grade connectors are very likely better as they will not only include the locking tab, but they generally offer designs which work well in vibration environments. You may discover the light springs in the RJ45's are not good enough under certain vibration conditions, or that the locking tab is able to vibrate in such a way that it disconnects. We don't have much information about RJ45's used in vibration conditions.
Or you may find it works good enough, just like the DB's used on MS. Many people consider those to be just fine. I disagree and I know many MS users have problems, which I would attribute to a bad connector. So I guess automotive grade connectors for this application would be a personal preference.
How low cost can you get a 4 connector cable which can handle not only say 1A of 12V, but also fairly high communications? I recall the LIN bus was supposed to be some low cost thing. Are there low cost LIN bus connectors?
About AEQ qualified components, they do have lots of extra quality check points, which is really helpful for life safety stuff. I think your gauges are debate-ably life safety related. I don't think they are life safety, but I can see how others might debate they are critically important. I agree that an automotive grade connectors are very likely better as they will not only include the locking tab, but they generally offer designs which work well in vibration environments. You may discover the light springs in the RJ45's are not good enough under certain vibration conditions, or that the locking tab is able to vibrate in such a way that it disconnects. We don't have much information about RJ45's used in vibration conditions.
Or you may find it works good enough, just like the DB's used on MS. Many people consider those to be just fine. I disagree and I know many MS users have problems, which I would attribute to a bad connector. So I guess automotive grade connectors for this application would be a personal preference.
How low cost can you get a 4 connector cable which can handle not only say 1A of 12V, but also fairly high communications? I recall the LIN bus was supposed to be some low cost thing. Are there low cost LIN bus connectors?
Welcome to the friendlier side of internet crazy
Re: Simple CAN Bus Prototyping Board
currents there are much lower. you can drive that stepper motor directly by the pins of a microcontroller (20mA?). I believe, the whole board (with all four chips and a motor) consumes somewhat 50mA in the worst case.
Re: Simple CAN Bus Prototyping Board
Power over Ethernet operates at up to 57v and 960ma (per pair) depending on the version of the standard and the negotiated rate between the devices, but it isn't an option here (it's fairly complex and expensive to implement). Even with up to two steppers, AVR and LEDs, the current should be well within the tolerable range for the cabling and connectors. I understand that CAT6 probably isn't the best for this, and definitely isn't "automotive grade", but I'm drawn to it largely for the availability of ready made cables.
I'm going ahead with the CAT6 route for now, but I'm entirely willing to change to something more robust if it proves necessary. If I do end up going to a different connector, do you have any suggestions? I think I would only need 4 pins (12v, gnd, canh, canl), interior, and something I can mount vertical on a PCB. I may even end up extending the scope of the project to cover other miscellaneous wiring such as interior lights, in which case I will need slightly more current capacity. (probably on a separate bus)
I'm going ahead with the CAT6 route for now, but I'm entirely willing to change to something more robust if it proves necessary. If I do end up going to a different connector, do you have any suggestions? I think I would only need 4 pins (12v, gnd, canh, canl), interior, and something I can mount vertical on a PCB. I may even end up extending the scope of the project to cover other miscellaneous wiring such as interior lights, in which case I will need slightly more current capacity. (probably on a separate bus)
Re: Simple CAN Bus Prototyping Board
I see 1A on a 5V Cat6 would drop about 0.5V. That's 5ft there and 5ft return. So your GND reference would be about 0.25V higher than normal GND. The connector would likely add some voltage drop to this as well. I'm nor sure how much voltage drop you can sustain before you run into CAN bus reliability issues. I know that as the voltage gets smaller, the bit error rate increases.
https://rusefi.com//forum/viewtopic.php?f=4&t=775&p=13419
I've dreamed of making a dash. You may find this thread of interest. I understand that steppers can be used instead of the RC servo's I was looking to use. https://rusefi.com//forum/viewtopic.php?f=4&t=775&p=13419
Welcome to the friendlier side of internet crazy
Re: Simple CAN Bus Prototyping Board
Hello, who can help me, with find any can bus protocol example for add it to prometheus ECU
Отправлено с моего PRO 6 через Tapatalk
Отправлено с моего PRO 6 через Tapatalk
Re: Simple CAN Bus Prototyping Board
servos are not so good (at least cheap ones) - they're wiggling all the time. steppers seem to be the defacto standard. I got my pack of 6 switec motors pretty cheap off ebay.
I believe can bus will be working with much bigger voltage drops. but why do you expect voltage drop on low-current signal wires?
darxfame, it's already there, the board sends RPM, speed, some other stuff via can. what exactly you want to achieve?
once I failed with my board, I got an rx7 cluster, and it works just fine! Not sure if it was my bad, or something got fixed over that half a year gap before I got the mazda cluster.
However, I want to retain the original look and feel, so retrofitting can-controlled gauges is still in my plans)
I believe can bus will be working with much bigger voltage drops. but why do you expect voltage drop on low-current signal wires?
darxfame, it's already there, the board sends RPM, speed, some other stuff via can. what exactly you want to achieve?
once I failed with my board, I got an rx7 cluster, and it works just fine! Not sure if it was my bad, or something got fixed over that half a year gap before I got the mazda cluster.
However, I want to retain the original look and feel, so retrofitting can-controlled gauges is still in my plans)
Re: Simple CAN Bus Prototyping Board
Perhaps of interest
https://rusefi.com/wiki/index.php?title=Manual:Hardware:CAN_sniffer
I recall some talk about some ISO protocols here before. I'm not sure if there are any good examples of how to do them though. Is there a goal to work with specific devices? I think many devices use many different protocols.
https://rusefi.com/wiki/index.php?title=Manual:Hardware:CAN_sniffer
I recall some talk about some ISO protocols here before. I'm not sure if there are any good examples of how to do them though. Is there a goal to work with specific devices? I think many devices use many different protocols.
Welcome to the friendlier side of internet crazy
Re: Simple CAN Bus Prototyping Board
I tried to connect the on-board computer to the bus, it connected but it did not work adequately on any of the possible protocolspuff wrote:servos are not so good (at least cheap ones) - they're wiggling all the time. steppers seem to be the defacto standard. I got my pack of 6 switec motors pretty cheap off ebay.
I believe can bus will be working with much bigger voltage drops. but why do you expect voltage drop on low-current signal wires?
darxfame, it's already there, the board sends RPM, speed, some other stuff via can. what exactly you want to achieve?
once I failed with my board, I got an rx7 cluster, and it works just fine! Not sure if it was my bad, or something got fixed over that half a year gap before I got the mazda cluster.
However, I want to retain the original look and feel, so retrofitting can-controlled gauges is still in my plans)
Отправлено с моего PRO 6 через Tapatalk
Re: Simple CAN Bus Prototyping Board
this is true, but there are basic protocols that are everywhere, I'm going through.kb1gtt wrote:Perhaps of interest
https://rusefi.com/wiki/index.php?title=Manual:Hardware:CAN_sniffer
I recall some talk about some ISO protocols here before. I'm not sure if there are any good examples of how to do them though. Is there a goal to work with specific devices? I think many devices use many different protocols.
Отправлено с моего PRO 6 через Tapatalk
Re: Simple CAN Bus Prototyping Board
so you want to make OBD applications communicate to rusefi? i guess this would require some coding efforts. However, I do recall there were some diagnostic features implemented (I do remember some error code) - it might be so that you just need to enable diagnostics in rusefi (some tiny checkbox?)
Re: Simple CAN Bus Prototyping Board
My Car on-board computer is prestige v55.
It used for Cars and trucks of American manufacture (since 1996), European and Asian production (since 2001), with petrol or diesel engines, supporting diagnostics by software interfaces:
ISO 9141-2, ISO 14230-2 (KWP2000), ISO 15765-4 CAN.
Also it use for VAZ,GAZ,UAZ and other Russian cars with ECU
It used for Cars and trucks of American manufacture (since 1996), European and Asian production (since 2001), with petrol or diesel engines, supporting diagnostics by software interfaces:
ISO 9141-2, ISO 14230-2 (KWP2000), ISO 15765-4 CAN.
Also it use for VAZ,GAZ,UAZ and other Russian cars with ECU
Re: Simple CAN Bus Prototyping Board
Yes, i want to use on-board pc for diagnostic and monitoring my car's sistems without notebook or phone.puff wrote:so you want to make OBD applications communicate to rusefi? i guess this would require some coding efforts. However, I do recall there were some diagnostic features implemented (I do remember some error code) - it might be so that you just need to enable diagnostics in rusefi (some tiny checkbox?)
Re: Simple CAN Bus Prototyping Board
What kind of protocol used for Mazda MX8 Can?
One of this? or other?
Can we include ISO 15765-4 protocol into our firmware?
One of this? or other?
Code: Select all
1 SAE J1850 PWM (41.6 kbaud)
2 SAE J1850 VPW (10.4 kbaud)
3 ISO 9141-2 (5 baud init, 10.4 kbaud)
4 ISO 14230-4 KWP (5 baud init, 10.4 kbaud)
5 ISO 14230-4 KWP (fast init, 10.4 kbaud)
6 ISO 15765-4 CAN (11 bit ID, 500 kbaud)
7 ISO 15765-4 CAN (29 bit ID, 500 kbaud)
8 ISO 15765-4 CAN (11 bit ID, 250 kbaud) - used mainly on utility vehicles and Volvo
9 ISO 15765-4 CAN (29 bit ID, 250 kbaud) - used mainly on utility vehicles and Volvo
Code: Select all
static void canMazdaRX8(void) {
commonTxInit(CAN_MAZDA_RX_STEERING_WARNING);
// todo: something needs to be set here? see http://rusefi.com/wiki/index.php?title=Vehicle:Mazda_Rx8_2004
sendCanMessage();
commonTxInit(CAN_MAZDA_RX_RPM_SPEED);
float kph = getVehicleSpeed();
setShortValue(&txmsg, SWAP_UINT16(getRpmE(engine) * 4), 0);
setShortValue(&txmsg, 0xFFFF, 2);
setShortValue(&txmsg, SWAP_UINT16((int )(100 * kph + 10000)), 4);
setShortValue(&txmsg, 0, 6);
sendCanMessage();
commonTxInit(CAN_MAZDA_RX_STATUS_1);
txmsg.data8[0] = 0xFE; //Unknown
txmsg.data8[1] = 0xFE; //Unknown
txmsg.data8[2] = 0xFE; //Unknown
txmsg.data8[3] = 0x34; //DSC OFF in combo with byte 5 Live data only seen 0x34
txmsg.data8[4] = 0x00; // B01000000; // Brake warning B00001000; //ABS warning
txmsg.data8[5] = 0x40; // TCS in combo with byte 3
txmsg.data8[6] = 0x00; // Unknown
txmsg.data8[7] = 0x00; // Unused
sendCanMessage();
commonTxInit(CAN_MAZDA_RX_STATUS_2);
txmsg.data8[0] = (uint8_t)(engine->sensors.clt + 69); //temp gauge //~170 is red, ~165 last bar, 152 centre, 90 first bar, 92 second bar
txmsg.data8[1] = ((int16_t)(engine->engineState.vssEventCounter*(engineConfiguration->vehicleSpeedCoef*0.277*2.58))) & 0xff;
txmsg.data8[2] = 0x00; // unknown
txmsg.data8[3] = 0x00; //unknown
txmsg.data8[4] = 0x01; //Oil Pressure (not really a gauge)
txmsg.data8[5] = 0x00; //check engine light
txmsg.data8[6] = 0x00; //Coolant, oil and battery
if ((getRpmE(engine)>0) && (engine->sensors.vBatt<13)) {
setTxBit(6, 6); // battery light
}
if (engine->sensors.clt > 105) {
setTxBit(6, 1); // coolant light, 101 - red zone, light means its get too hot
}
//oil pressure warning lamp bit is 7
txmsg.data8[7] = 0x00; //unused
sendCanMessage();
}
Re: Simple CAN Bus Prototyping Board
if it was one of those, then either
6 ISO 15765-4 CAN (11 bit ID, 500 kbaud)
or
7 ISO 15765-4 CAN (29 bit ID, 500 kbaud)
(it's a 500kbaud thing)
but as far as I understand, it's not exactly OBD, it's just the canbus messages to control the dashboard. the obd part might use some other packet IDs or even upper-layer protocols.
6 ISO 15765-4 CAN (11 bit ID, 500 kbaud)
or
7 ISO 15765-4 CAN (29 bit ID, 500 kbaud)
(it's a 500kbaud thing)
but as far as I understand, it's not exactly OBD, it's just the canbus messages to control the dashboard. the obd part might use some other packet IDs or even upper-layer protocols.
Re: Simple CAN Bus Prototyping Board
I add to attachment a part of rusefi console's log file with communication my on-board pc and prometheus
There we can see some message with
and
There we can see some message with
Code: Select all
Got unhandled request
Code: Select all
Got unhandled OBD message
- Attachments
-
- CAN.txt
- (275.07 KiB) Downloaded 767 times
Re: Simple CAN Bus Prototyping Board
Wouldn't it be better if we move to the Russian-speaking part of the forum? %-)
What are your can-related settings (in tunerstudio probably, and in the engine config file)?
Do you have a logic analyzer? Don't you want to hook it up to the board to see what exactly is going on there? I guess, this error (warning) is generated by the firmware when it receives an unexpected message from the external device (from your on-board PC). In my engine_config CAN is enabled only for transmitting, not for receiving. However, judging by all thos 'got request' you've enabled can receiver. So, probably, if I were you, I would look for the occurance of that error message in the code and add a handler for that particular message ID.
So, does your on-board PC display any info?
P.S.
this file:
https://rusefi.com//docs/html/obd2_8cpp_source.html (pay attention to lines 54, 64, 81, 91)
What are your can-related settings (in tunerstudio probably, and in the engine config file)?
Do you have a logic analyzer? Don't you want to hook it up to the board to see what exactly is going on there? I guess, this error (warning) is generated by the firmware when it receives an unexpected message from the external device (from your on-board PC). In my engine_config CAN is enabled only for transmitting, not for receiving. However, judging by all thos 'got request' you've enabled can receiver. So, probably, if I were you, I would look for the occurance of that error message in the code and add a handler for that particular message ID.
So, does your on-board PC display any info?
P.S.
this file:
https://rusefi.com//docs/html/obd2_8cpp_source.html (pay attention to lines 54, 64, 81, 91)
Re: Simple CAN Bus Prototyping Board
in this case, my onboard computer does not understand what sends rusefi, and if you do not include write messages, then he does not see the board at all.puff wrote:might be of use:
page 23 http://www.emotive.de/documents/WebcastsProtected/Transport-Diagnoseprotokolle.pdf
line 13 https://rusefi.com//docs/html/obd2_8h_source.html
Re: Simple CAN Bus Prototyping Board
once again. does your on-board PC show anything at all when connected to rusefi? since according to your logs, rusefi should probably have sent RPM and CLT values to your PC.
Re: Simple CAN Bus Prototyping Board
my on-board pc view some values like RPM and CLT, but all of it is not realpuff wrote:once again. does your on-board PC show anything at all when connected to rusefi? since according to your logs, rusefi should probably have sent RPM and CLT values to your PC.