RC Wheelchair 3: Difference between revisions

From Alnwlsn - Projects Repository
Jump to navigation Jump to search
No edit summary
No edit summary
 
Line 3: Line 3:
So, after my first taste of the CAN bus from work, I decided to upgrade the wheelchair to use a proper bus for communication between modules. CAN is a bit complex for my tastes, but a similar (but lower level) technology is RS485 which is used in industrial automation. With just 1 converter chip required, this basically takes all the serial ports on all the different modules and ties them together with a 2 wire bus. So, a transmission from 1 reaches all other devices. It's half duplex, so the different modules have to take turns, but that's plenty fine for my case.
So, after my first taste of the CAN bus from work, I decided to upgrade the wheelchair to use a proper bus for communication between modules. CAN is a bit complex for my tastes, but a similar (but lower level) technology is RS485 which is used in industrial automation. With just 1 converter chip required, this basically takes all the serial ports on all the different modules and ties them together with a 2 wire bus. So, a transmission from 1 reaches all other devices. It's half duplex, so the different modules have to take turns, but that's plenty fine for my case.


As of today, I have modules for the wheelchair motor controller and arm motor controllers.
The different modules then become greatly simplified; instead of implementing complex control algorithms on the microcontrollers themselves, each module only needs to be responsible for managing IO, mabye counting some encoders, etc. As of today, I have modules for the wheelchair motor controller and arm motor controllers.
 
==Protocol==
{| class="wikitable"
{| class="wikitable"
|-
|-
| Bit || 0 || 1 || 2 || 3
| Bit || 0 || 1 || 2 || 3
|-
|-
| Rx || address ||
|}
|}

Latest revision as of 13:25, 3 September 2020

Since the previous version, I added an arm and a new LORA radio module. With the only microcontroller being ATmega1284p in the original motor controller box, the project was beginning to outgrow both the IO and processing capability of the existing system. Plus, if I ever wanted to add more stuff, like GPS tracking, LIDAR, more sensors, etc. it would only make the problem worse.

So, after my first taste of the CAN bus from work, I decided to upgrade the wheelchair to use a proper bus for communication between modules. CAN is a bit complex for my tastes, but a similar (but lower level) technology is RS485 which is used in industrial automation. With just 1 converter chip required, this basically takes all the serial ports on all the different modules and ties them together with a 2 wire bus. So, a transmission from 1 reaches all other devices. It's half duplex, so the different modules have to take turns, but that's plenty fine for my case.

The different modules then become greatly simplified; instead of implementing complex control algorithms on the microcontrollers themselves, each module only needs to be responsible for managing IO, mabye counting some encoders, etc. As of today, I have modules for the wheelchair motor controller and arm motor controllers.

Protocol

Bit 0 1 2 3
Rx address