DIY Electric Car Forums banner

1 - 9 of 9 Posts

·
Registered
Joined
·
4 Posts
Discussion Starter #1
I'm involved in a project where we're converting a diesel boat to electric. All the electronics and the motor work on the bench, no questions there. My main task in this is getting the data about the rpm, power and everything else from the Curtis 1236 controller, into a raspberry pi. I'm having trouble where to start. What pins on the controller and pi should connect, is something between necessary, what software do I need? Say I want to log the rpm to a file every second, as a start. Thanks!
 

·
Registered
Joined
·
4,045 Posts
Start looking into CAN. There's some info on google on CAN for the Curtis inverters if you look around. They use CAN open, so you'd have to do a lot of protocol implementation. Not much is available over Serial other than what displays on their cheapo little display.
 

·
Registered
Joined
·
152 Posts
CAN is a automotive bidirectional address-based bus. Each "frame" has an ID, length, and data bytes.
A Pi can use CAN if you add an MCP2515 module (cheap on Amazon etc.).
Python works well for CAN since there are lots of libraries you can use.

Software side:
Send an NMT message to put the inverter into state 5. Repeat at least every 100ms.
ID:0x000
DLC:2
Data: 0x01 0x00

Response will be sent with ID=0x700 + node ID. You need the Node ID for the next step (remember it's all in hex).

Then send PDO1 and PDO2 requests.
PDO1
ID:0x200
DLC:8
Data: Whatever

PDO2
ID:0x300
DLC:8
Data: Whatever

Have fun decoding the responses :)


Hardware:
[quick-guide] CAN bus on raspberry pi with MCP2515 - Raspberry Pi Forums

This sets up the MCP2515 CAN interface as a network connection, then you can use can-utils to see what's going on.

Try the python-can library on your Pi. It should work well.

-Isaac

EDIT Also check this thread out: Curtis 1234 and CAN bus
 

·
Registered
Joined
·
4,045 Posts
Yes that HAT should work.

Concerning the CAN messaging, I think there's some if you search online for Curtis + 1236 or 1238 + Canopen. I recall there being some things people have done with RPi already.
 

·
Registered
Joined
·
4 Posts
Discussion Starter #8
While I'm waiting for the HAT to arrive, I'd like to make sure I understand the wiring between it and the controller. Page 22 of the controller manual is about CAN wiring.
1: Is it correct to connect pin 21 (CAN Term H) and 34 (CAN Term L) on the controller together with short wires? If yes, what does this accomplish? Enabling CAN?
2: Pin 23 (CANH) and 35 (CANL) correspond nicely with the CANH and CANL shown on the HAT here:
119982

Just connect pin 23 to CANH and 35 to CANL? Anything else I should connect?

Thanks for all the help :)
 

·
Registered
Joined
·
152 Posts
1. Yes, that is correct. Connecting those will enable the CAN termination resistors. I don't remember if I did that but my CAN adapter was terminated already.
Termination resistors place a load on the drivers -- I'm not really sure why this is necessary, it probably has something to do with making the signals cleaner (since there's a current flowing). It is definitely needed though, if you skip resistors the signals look really nasty and reflect around inside the wires and also don't work.

2. Correct. Also hook the CAN_GND_ISO to the Curtis ground :)

-Isaac
 
1 - 9 of 9 Posts
Top