Puma board for FreeEMS

Marcos' unmaintained, but still in-use, Puma for FreeEMS circuit board/hardware design!
User avatar
KW1252
LQFP112 - Up with the play
Posts: 166
Joined: Tue Jan 15, 2008 5:31 pm

Re: Puma board for FreeEMS

Post by KW1252 »

I have to admit I've been somewhat cursory on catching up with the development, but I was thinking about how much emphasis there will be on CAN connectivity. Right now there's CANRx and CANTx pins exposed, but to use them a tranceiver circuit is needed. So, how's the policy on that?
User avatar
Fred
Moderator
Posts: 15433
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Re: Puma board for FreeEMS

Post by Fred »

KW1252 wrote:I have to admit I've been somewhat cursory on catching up with the development, but I was thinking about how much emphasis there will be on CAN connectivity. Right now there's CANRx and CANTx pins exposed, but to use them a tranceiver circuit is needed. So, how's the policy on that?
Circuitry and code, I welcome people adding both in a purely experimental off-by-default way.

Fred.
DIYEFI.org - where Open Source means Open Source, and Free means Freedom
FreeEMS.org - the open source engine management system
FreeEMS dev diary and its comments thread and my turbo truck!
n00bs, do NOT PM or email tech questions! Use the forum!
The ever growing list of FreeEMS success stories!
User avatar
jharvey
1N4001 - Signed up
Posts: 1607
Joined: Tue Jun 10, 2008 5:17 pm

Re: Puma board for FreeEMS

Post by jharvey »

Connector card should allow for those to be implemented. Would you be interest-able in taking a stab at the first connector card?
User avatar
KW1252
LQFP112 - Up with the play
Posts: 166
Joined: Tue Jan 15, 2008 5:31 pm

Re: Puma board for FreeEMS

Post by KW1252 »

Here's a quick shot at what the CAN connector card would look like:

Image

Of course, DE-9M is not a good idea to put inside the case. A proper setup would have a 2x1 pin header with a FTP cable connected to the ECU connector.
User avatar
Spudmn
LQFP112 - Up with the play
Posts: 232
Joined: Thu Feb 10, 2011 12:27 am
Location: Auckland, NZ

Re: Puma board for FreeEMS

Post by Spudmn »

There needs to be a place for the termination resistor if it is needed.

Also it's a good idea to run the GND line along with the CAN differential pair. This will keep both ends of the CAN bus at the same potential.

In my set up I am going to run power as well, so that I can power little CAN Modules off my CAN bus wiring. You may want to add 12V to that connector.
User avatar
KW1252
LQFP112 - Up with the play
Posts: 166
Joined: Tue Jan 15, 2008 5:31 pm

Re: Puma board for FreeEMS

Post by KW1252 »

The device is configured as high-speed unit on the connector, I was thinking of cable-terminated bus; with a resistor, it could use a configuration pin for slow speed mode too. The DE-9 footprint was the first idea, but I would much rather have a pin header instead and have the actual CAN connection on the ECU connector, with the power line routed from elsewhere.
User avatar
nitrousnrg
LQFP144 - On Top Of The Game
Posts: 468
Joined: Tue Jun 24, 2008 5:31 pm

Re: Puma board for FreeEMS

Post by nitrousnrg »

Glad to see these things being discussed :-)

About the 12v in the header, what kind of things would you be hooking there? Those sort of 12v are very crappy.
Marcos
lumpensack2003
QFP80 - Contributor
Posts: 38
Joined: Sun Oct 26, 2008 11:32 pm

Re: Puma board for FreeEMS

Post by lumpensack2003 »

KW1252 wrote:The device is configured as high-speed unit on the connector, I was thinking of cable-terminated bus; with a resistor, it could use a configuration pin for slow speed mode too. The DE-9 footprint was the first idea, but I would much rather have a pin header instead and have the actual CAN connection on the ECU connector, with the power line routed from elsewhere.
You mixed up two different resistors used with the xceiver:
- at Pin 8 you'll connect an appropriate resistor for slope control. As you wrote, connecting Pin 8 to GND will select High-Speed mode with steepest slopes.
- nevertheless there should be an option to stuff a 120Ohm resistor between CANh and CANl. Following the CAN specifications, the bus has to be terminated with 120Ohm at both ends. Assuming the FreeEMS is on end of the bus, the termination resistor should be there in most likely every installation.

Furthermore, there should decoupling capacitors (10nF and 220nF) close to Pin 2 and Pin 3.

Yes, it's a good idea to carry +12V and battery GND with your CAN signals in the CAN cable. Due to CAN being a differential bus, there is no need to connect the CAN cable GND to FreeEMS GND. Connecting both GNDs is potentially harmful.
User avatar
KW1252
LQFP112 - Up with the play
Posts: 166
Joined: Tue Jan 15, 2008 5:31 pm

Re: Puma board for FreeEMS

Post by KW1252 »

Okay, caps added to the circuit. Rs pin does more than just control the slope. If the pin is put high, the chip will go into standby mode, still functioning as RX node at reduced power consumption. I made a simple circuit that uses IGN voltage to drive this. I also used a configuration pin to determine whether controlled slope or fast signal rise and fall is used. When there's no voltage on the FET gate, the pull-up resistor puts the Rs pin high. Once voltage is applied, the pin falls to low, and into the set mode whether the path to the ground is shorted or through a resistor.

Here's the quick and dirty schematic; the component designator for the transistor is wrong and needs to be fixed and the resistor values aren't even close.
Image

and the board.

Image

There's 12v running now to the board, but I still wouldn't consider running it to the header, as switched source from outside the ECU box works just as well.
User avatar
Fred
Moderator
Posts: 15433
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Re: Puma board for FreeEMS

Post by Fred »

I figured out the reset/serial state stuff. After pulling that resistor off and doing the power-from-usb-bus mods, it, again, wouldn't boot into user code, marcos, please be more careful with your language, you kept saying "the mcu wouldn't start" it does start, code runs, and exhibits specific behaviour of not running FreeEMS code. This diagram shows why, it's from AN2548:

Image

So, we need a pullup on it!

I'll take a crack at it now, as I have to use it, but maybe there is a better way than what I do.

Fred.
DIYEFI.org - where Open Source means Open Source, and Free means Freedom
FreeEMS.org - the open source engine management system
FreeEMS dev diary and its comments thread and my turbo truck!
n00bs, do NOT PM or email tech questions! Use the forum!
The ever growing list of FreeEMS success stories!
Post Reply