Use an arduino instead of a raspberry pi on magni



I know it may sound a bit extreme.

What if I just keep the magni hardware without the raspberry pi, and use an arduino-like board to:

  • mandatory : just drive the motors
  • nice to have : observe battery voltage (to know when it’s about to be empty)

ideally, I could still use the PID controllers to give each motor a speed target. but it’s ok if i have to just it a current target instead.

how can i do this?



That is possible - you’d need to re-implement the motor node on the Arduino board. The motor-node is open source and available here:

To get the functionality you want you’d need to reproduce the command that sends the speed command. You’d also need to reproduce the command that receives the battery voltage. There are many other commands of course (e.g. odometery messages, messages about the voltages of the various onboard power systems, messages that describe the PID parameters, other motor controller setting messages, etc.) how many of those you want to implement is of course up to you.

The arduino has a serial port which can connect directly to the serial port that’s available. There is a serial connector both on the header for the raspberry pi (3.3V) and one that goes directly in to the motor controller uC (5v).

So you’d be able to reproduce a lot of the functionality - the one thing that you’d definitely loose is the ability to update firmware on the board. If there were any improvements to the firmware, then you’d need to reattach the raspberry pi.

So all that said - this seems like a hell of a lot of work and I am not at all sure what you gain.