- 1 Summary
- 2 Hardware Specifications
- 3 Wiring Pinout
- 4 Raspberry Pi Setup
- 5 Communication via Raspberry Pi
- 6 Communication via USB
- 7 Using the Carberry
- 8 Command Index
- 9 API
- 10 Known Issues
The Carberry is designed as a drop in replacement for some dash controls. This page is dedicated to research into making it do more than the pre-designed usage.
|1||Red||+12V Power Supply|
|3||Blu/Yellow||+12V Ignition Input|
|4||Black/Orange||+12V Ignition Output|
|5||White||General Purpose Input #1|
|7||White/Green||General Purpose Input #2|
|8||Green||CAN BUS High Channel #1|
|9||White||CAN BUS Low Channel #1|
|10||Yellow/Green||CAN BUS High Channel #2|
|11||Yellow/White||CAN BUS Low Channel #2|
|13||Blu||General Purpose Output #1|
|14||Blu/Green||General Purpose Output #2|
|15||Pink||Resistive Input Channel #1|
|16||Yellow||Resistive Input Channel #2|
|17||Pink/Black||Resistive Output Channel #1|
|18||Yellow/Black||Resistive Output Channel #2|
|19||Gray||GMLAN BUS Channel #1|
|20||Yellow/Gray||GMLAN BUS Channel #2|
|21||Cyan||External UART Output (TXD)|
|22||Cyan/White||External UART Input (RXD)|
Raspberry Pi Setup
Setting up the OS
Carberry.it provides multiple versions of the Carbian OS for download at Carberry Downloads. For Raspberry Pi 2 and above you must use the Carbian-Jessie distribution. This page also provides firmware updates, additional Carberry operating systems and Carberry daemons.
If you wish to use your own Raspbian distribution with Carberry Pi's daemons, follow the instructions at the below links.
To install the "Carberry" daemon on Raspbian follow the instructions at Carberry Daemon
To install the Carberry's "Shutdown" Daemon on Raspbian follow the instructions at Shutdown Daemon
To utilize UART with the Carberry, follow the instructions at UART. Raspbian "Jessie" does not have inittab as mentioned in this set of instructions, however, Raspbian "Wheezy" and earlier distributions do.
Connecting the Carberry
If testing functionality without a vehicle, connect your Carberry's +12v Power Supply and +12v Ignition Input (Carberry pins 1 and 3) to a +12v DC power source and Ground (Carberry pin 2) to ground. To use with a vehicle connect your Carberry's +12v Power Supply and +12v Ignition Input (Carberry pins 1 and 3) to a battery (pin 16 on OBD II ports), Ground (Pin 2 on Carberry) to Chassis Ground (Pin 4 on OBD II ports) and Signal Ground (Pin 6 on Carberry) to Signal Ground (Pin 5 on OBD II ports). Connect your Carberry's SWCAN or CAN ports to the applicable OBD II pins.
Updating Carberry Firmware
Communication via Raspberry Pi
Communication via USB
Setup on Windows
- The Carberry can communicate with a PC via USB or UART. To use with Microsoft Windows download USB Drivers. Extract the files. Connect your Carberry via MicroUSB to your computer. Once connected, navigate to Device Manager, Ports (COM & LPT) and right click on your device. Select Update Driver Software and click "Browse my computer for driver software." Navigate to the files you previously extracted and click "Okay." Once you click "Next" your drivers should begin installing.
- Make note of the COM port assigned to your Carberry for later use in serial communication. Install a suitable terminal application, such as PuTTY.
Connecting via PuTTY
- Open PuTTY and choose "Serial" under connection type. Enter the COM port you obtained from your "Device Manager" under Serial Line. Leave the speed at 9600 (the speed should not matter when connected via USB, however, leaving at default presents no issues). Adjust any of the other settings as you please. When ready, press "Open" and your computer should connect to the Carberry. Type in "AT" and push enter. If setup properly, the Carberry should return with an "OK."
Setup on Linux
- If Minicom is not installed on your distribution, follow the instructions at Minicom to install it. Linux should not require any additional drivers for communicating with the Carberry via USB. Connect the Carberry via MicroUSB to your computer's USB port. Once connected, open a terminal and "enter dmesg | grep tty" to determine your Carberry's serial port. It should look similar to ttyAMA0.
- Plug a micro USB Cable into the Carberry's Micro USB port and the opposing end into your computer.
Using the Carberry
Once connected to your Carberry, send the command AT to test communication with your Carberry. A response of OK indicates all is in working order. If you do not receive a response, double check your baud rate and COM ports. If you do not see your text as you type, send the command ECHO to display your commands as they're typed.
Convert (default) left aligned CAN ID to proper ID
The following Ruby code will convert the CAN ID to the correct format (courtesy of Craig Smith):
carb = "carb_var".split(":") x = ((carb.hex >> 5) << 18) + (carb.hex >> 6) puts x.to_s(16)
Replace the carb_var with the mislabeled CAN ID.
Convert right aligned CAN ID to proper ID
The following Python script will convert a right aligned CAN ID to the correct format:
rightid=input('Enter your right aligned CAN ID XXXX:XXXXXX: ')
GMLAN communication example
CAN MODE USER
CAN USER OPEN CH1 AUTO GMLAN
Please wait for timing result
. baud rate = 33K3 (33.3 Kbps)
CAN USER MASK CH1 0000
CAN USER FILTER CH1 0 100A
+++ (suspends reception)
ATO (resume reception)
|AT||OK||Tests communication with Carberry|
|ECHO||OFF or ON||Echo the commands typed by the user|
|VERSION||Version number||Display current Carberry firmware and hardware version|
|REBOOT||OK||System reboot (only reboots Carberry, not the Pi)|
|+++||Suspends message reception|
|ATO||Resumes message reception|
CAN Connection Modes
|CAN MODE||Informs the user of the current CAN mode|
|CAN MODE PARALLEL||OK||Sets the Carberry's CAN channels into parallel mode|
|CAN MODE SERIES||OK||Sets the Carberry's CAN channels into series mode|
|CAN MODE USER||OK||Provides the user full control over RX and TX of both CAN channels|