Ah, and the code for the bmi160 driver is exactly the same as the driver code for bmi160 on vedderb (Benjamin Vedder) · GitHub. hmm.
As we are talking about update for the FreeDrive. We should really consider a possibility to add a esp32-s3 as a backpack (over CAN) in order to integrate a VESC Express. In the community there is something called PubRemote which works over BT and can replace all standard remotes. Its fully integrated in VESC.
I tried that without success but I might try again.
I tested it again, this time with the Superflux Funwheel motor, it works. The fix is easy, GND is on the same connector, 3.3V is on the corner pin of the “Freepill” MCU board.
you could use the vcc on the hall connector as well it is 3.3v . So it could be possible to add this fix directly into the hall connector without soldering to the freeDrive.
So i would connect the cap between (1) and (5) and the resistor between (6) and (5). All in the cable that goes to the motor plug and the temp reading should work. (That is from the freeDrive revision which is in my board!)
but the thing is if I do it in the cable it will work on any revision because the used wires are all the same
I measured it and the HALL sensors are using 3.3v so this should be ok.
So the superflux hall sensors work with 3.3V?
yes. Thats how i use mine
Compatible IMUs are in the code, see here:
BMI160 is EOL, JLCPCB Stock 0, MPU9520 is out of stock as well, leaves 2 supported options
ICM20948
LSM6DS3
recommended replacement part for BMI160 would be BMI270
But this one seems not to be supported by vesc at current.
It would be interesting to see what other VESC builders do as they have the same problem.
LSM6DS3 is used by other vescs, i.e. tronic: TRONIC X12 24S – TRONIC SYSTEMS
LSM6DS3TR-C is the IMU that has been “recently” added to Vesc. And it works fine for me. Basicaly I bought C version instead non C version and then someone from comunity added code support for it.
LSM6DSLTR Should be the replacement for LSM6D3. It should be pin compatible and is in stock at jlcpcb.
Before using this IMI please verify if it is supported in vesc. I know what a pain it was to get C variant supported with vesc.