0
\$\begingroup\$

I was looking at this open source BLDC motor circuit, and I noticed it had a CAN bus transceiver apart of the circuit. I don't understand why this circuit would need a CAN bus transceiver? Does this actually do anything or is it most likely there just in case somebody wants to add additional things to the circuit later on?

From my understanding you would need CAN communication in an automotive applications to communicate with all the other devices on the same CAN bus, but in this circuit there isn't anything else you need to communicate with right? The only thing this circuit has is a MOSFET driver, some mosfets, temp sensor, BLDC motor sensor, and a BLDC motor. None of these devices need communication except the MOSFET driver, but the MCU can communicate with that with simple HIGH / LOW pulses.

Why is CAN communication included in this circuit and what are the uses of CAN communication in a circuit like this?

\$\endgroup\$
8
  • 1
    \$\begingroup\$ What would I do if I wanted to control the motor driver via CAN? I think I would need a CAN transceiver connected to the MCU ;) \$\endgroup\$
    – DKNguyen
    Commented Mar 25, 2023 at 0:44
  • \$\begingroup\$ In the schematic it shows that the motor driver is being controlled by the MCU, not the CAN bus transceiver. Why do we need the CAN transceiver? \$\endgroup\$
    – Trev347
    Commented Mar 25, 2023 at 1:05
  • \$\begingroup\$ Because the designer wants to hook up the entire motor driver (not the schematic block) to CAN bus and send commands to control it. \$\endgroup\$
    – DKNguyen
    Commented Mar 25, 2023 at 1:07
  • \$\begingroup\$ What do you mean by "entire motor driver (not the schematic block)"? Are you saying if he wants to add additional things such as a LCD display or something similar to communicate with? What does "entire motor driver" mean? Cause i'm not seeing anything else to communicate with in the circuit since the MOSFET driver is controlled by the MCU \$\endgroup\$
    – Trev347
    Commented Mar 25, 2023 at 1:27
  • 1
    \$\begingroup\$ Forget adding additional things. The designer just wants to be able to hook up the motor controller, aka the ENTIRE circuit (what I have been meaning when I say "motor driver") to a CAN bus and control it using CAN commands. Stop thinking as though the MCU with a CAN transceiver must be a primarily be a bus master. In this case it is mostly going to be receiving messages about how to control the motor. \$\endgroup\$
    – DKNguyen
    Commented Mar 25, 2023 at 1:38

1 Answer 1

2
\$\begingroup\$

How fast should the motor driver drive the motor? In very simple projects, maybe it's fine to just program a certain speed and make the motor go at that speed as long as the power is turned on. But in most projects you want a way to change the motor speed constantly.

This motor driver offers several ways to control it. You can attach an analog signal, maybe from a potentiometer to the ADC pin. You can attach a standard RC servo signal from a remote control receiver, to one of the pins. You can attach it to a computer by USB. You can attach it to another microcontroller by I2C or SPI. Or you can attach it to a CAN bus.

There may be other commands available, such as asking the motor driver to report the current speed or angle of the motor.

In any case, the microcontroller on this motor driver is receiving the control signal, as a slave. It does what the other part of the system tells it. Perhaps you decide to have a central microcontroller, which tells the speed to the motor driver's microcontroller. The motor driver's microcontroller switches the MOSFETs on and off with the right timing, to make the motor go at the speed that the central microcontroller selected.

I presume the motor driver comes with software that supports all of these interfaces: CAN, USB, I2C, and so on. The board design leaves the options open for the software, but that doesn't necessarily mean someone has written the software, so you should check.

\$\endgroup\$
1
  • 1
    \$\begingroup\$ And OP's link even says "Interface to control the motor: PPM signal (RC servo), analog, UART, I2C, USB or CAN-bus." \$\endgroup\$
    – Ben Voigt
    Commented Sep 9 at 15:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.