WaiveCar / WaiveTelem

Repository for files related to the waivetelem project
0 stars 0 forks source link

CAN Bus Lower Power Mode #53

Open jlandau10 opened 5 years ago

jlandau10 commented 5 years ago

Don't currently have hardware control to transceivers to pull low. Update schematic to do so. Attempt on-board wire hack.

By setting the MCU, the CAN controller (MCP2515) and the transceiver (MCP2551) into sleep mode, you can reduce the power consumption of the whole setup from around 50mA down to 240uA (Arduino directly connected to 5V, regulator and power LED removed). The node will wake up when a new message arrives, process the message and go back to sleep afterwards.

Look at the examples "receive_sleep" and "send_sleep" for more info.

In order to set the MCP2551 CAN transceiver on the shield into sleep/standby mode, a small hardware modification is necessary. The Rs pin of the transceiver must either be connected to pin RX0BF of the MCP2515 or to a free output of the Arduino, both via the resistor R1 (17k). Cut the connection to ground after R1 and solder in a wire to one of the pins. Note however that from now on, you have to pull this pin low in software before using the transceiver. Pulling the pin high will set the transceiver into standby mode.

Without this modification, the transceiver will stay awake and the power consumption in sleep mode will be around 8mA - still a significant improvement!

source: https://github.com/Seeed-Studio/CAN_BUS_Shield/blob/master/README.md

jlandau10 commented 5 years ago

adding duplicate 10k2 resistors between: MCP2515-STBN1 <-> 10k2 <-> TJA1048TK(CAN0) RX0BF MCP2515-STBN2 <-> 10k2 <-> TJA1048TK(CAN1) RX0BF

Plan to DNI the resistors between the STBN1/2 and 3v3, install the ones to the mcps. If this doesn't work, move the resistors/DNI for the final build

jlandau10 commented 5 years ago

Hardware Done. Software Solution Needed. Can try to get the can shield looped like this too for testing.