At this stage I had a simple proof-of-concept, but with some flaws I wanted to address:
- I didn't like the Turtlebot-shape of the robot, I wanted a more close to human size robot (around 1m50 / 1m60) which could carry a load.
- The wheels mounting brackets were failing. The added weight of the old laptop caused the brackets to misform.
- The old laptop I used was too slow to run gmapping in order to try to create a map and also had some Wifi reliability issues.
- The VESC's were driving the motors in BLDC mode, causing a high-pitched noise while driving. I wanted to drive the motors in FOC (Field Oriented Control) mode, which should make them more quiet.
- The large inrush current caused by the VESC's capacitor banks would trip the safety of the BMS integrated in the battery pack, which meant I couldn't use the switch to turn on the robot, but had to connect each VESC's power one by one.
So it was time to start over and try a new design. Instead of just a test frame, I started building a first version of the concept I had in mind. Things were changing at a rapid pace and I should have documented better to have something more to show for it.
I drilled 6mm holes in an 6x2cm T-slot profile beam and mounted the wheels with M6 bolts with the mounting blocks which were harvested from the hoverboard. The frame was made smaller and taller.
I replaced the old HP laptop with a Yoga 510-14ISK laptop. This has an I5 processor, 4GB memory, SSD and a full HD touch screen with the option to flip the keyboard behind the screen (360 degree hinge). This makes it possible to have a screen in the robot and save the cost of a separate tablet.
The large inrush current not only tripped the safety of the BMS, but also created sparks at the XT-60 connector eroding the contacts of the connector. To remedy this, I used some car relays to power on the VESC's one at the time triggered by an Arduino Nano.
In BLDC mode the phases are switched on and off at a high frequency, causing a high pitched noise. With Field Oriented Control the phases are driven in a sinusoidal pattern, reducing almost all switching noise. Low noise was one of my primary design goals. I didn't want any gear noise, which was why I opted for brushless hub motor. So the switching noise was also annoying and should be avoided. Hence I had to switch to FOC mode. Unfortunately switching to FOC mode caused some more issues than I anticipated. Apparently in FOC mode the PID control loop for speed control in the VESC firmware is much slower then it is for BLDC mode. This caused the motor to oscillate back and forth. With some PID tuning I was able to get the control stable for a certain ERPM (for instance 500), but it would still oscillate at lower ERPM and I couldn't get it stable within the range I needed. So after reading through the forums and suggestions I switched to duty cycle control instead of speed control. This solved the control issue for the VESC, but required the robot driver to be rewritten in order to convert the required speed command to a duty cycle parameter.
The end result was a huge improvement from before. I really like the absence of noise in FOC mode. Also the height of the robot is much better. But there were still some issues remaining:
- Odometry data was not good enough to build a map
- The base is still to wide to drive in some of the smaller areas in my living room
- The laptop is too heavy at the top, causing the robot to tilt when breaking
- There was some slippage when the ground is somewhat uneven caused by the caster wheels lifting one of the drive wheels. Adjusting the ground clearance of the caster wheels is crucial to prevent this.