Hello everyone,
I'm new to the VESC world and not an electronics specialist, but I have a small project in mind. I want to control a VESC using a Teensy 4.0 (Arduino framework). I've successfully communicated with it using UART, but I'm considering the ability to send commands while still being able to modify VESC parameters using a mobile app with a BLE adapter.
My idea is to connect a BLE NRF adapter directly to the Teensy so that I can programmatically pass through all data from the VESC to BLE when needed - I could switch between normal mode and passthrough. I envision connecting my two ESCs like in the picture below Do you think this is possible? I attempted it with one VESC, but I couldn't connect from the mobile VESC app. Any help would be appreciated. I guess I could probalby use CAN in this scenario but I'm really curious if this approach could function.
You don't really need the complexity of two modes such as normal vs. pass through and you don't need manual switch between the two controllers.
You can use Teensy both as BLE-UART bridge by sending data as is to vesc and you can send commands to Teensy itself and tell it what to do. Since vesc protocol packets start with either 2 or 3, you can differentiate whether is a vesc command or not. Then you connect via UART to one controller and connect your second controller via CAN to that first controller where you have the Teensy. When you send your commands to a vesc controller, you add the CAN id where the message should go. It will be routed appropriately.
NextGen FOC High voltage 144v/34s, 30kw (https://vesc-project.com/node/1477)