Difference between revisions of "Electric Bobby Car Build"

From ivc wiki
Jump to navigationJump to search
Line 246: Line 246:
| 2x  
| 2x  
| Hoverboard STM32 MCU
| Hoverboard STM32 MCU
| Motor wheels
| Wheels, controllers, batteries and misc.
|-
|-
| 1x  
| 1x  

Revision as of 22:36, 7 December 2019

Electric bobby car build final.jpg

This is the electric motor upgrade build log of a Bobby Car using two Hoverboard. The end result will have four motors, one per wheel, two Xbox 360 potentiometers as throttle and brake on the stock steering wheel, and two push buttons to turn on and off each controller separately (e.g. FWD, RWD, AWD). Inside the Bobby Car cavity, the controllers, battery, and cabling will reside.

Most of the front wheel steering assembly has been replaced by 3D-printed parts, which are available for download. The rear wheel base has been replaced with an aluminum mounting plate.

The controllers will be flashed to a new firmware developed by Larsmm which is a fork of NiklasFauth original base.


Base preparation

Main equipment bay

A slot had to by cut out of the base to allow internal access.

File:Electric bobby car build base cut internal slot1.jpg File:Electric bobby car build base cut internal slot2.jpg

Two rear indentations were cut to insert the wooden base structure which later will be used to mount the aluminium wheel base plate. These are cut at the same height as the new front wheels, so the base is level. It is an advantage to prepare the back wheel base before cutting the slots.

Electric bobby car build base cut rear slot1.jpg Electric bobby car build base cut rear slot2.jpg Electric bobby car build base cut rear slot3.jpg

To remove sharp edges and to release stress areas, the cut edge was heat gun finished.

Electric bobby car build base cut heatgun.jpg

Rear wheel structure

The rear wood structure consists of one cross beam and six smaller wood pieces to fill the new slots. The load of the drive will nicely be distributed to the wheels and ground, increasing the max. driver weight to over 100kg.

Each wooden piece was fastened to the parent piece, making sure to use a different screw pattern for each layer to avoid conflicts.

Electric bobby car build base rear structure1.jpg Electric bobby car build base rear structure2.jpg Electric bobby car build base rear structure3.jpg

Mounting the wooden structure to the plastic base was done by nine wooden screws through the side of the rear walls, linking each layer of the internal structure. Using washers to distribute the load as wide as possible.

Electric bobby car build base rear mounting structure1.jpg Electric bobby car build base rear mounting structure2.jpg File:Electric bobby car build base rear mounting structure3.jpg

Rear wheels

All the parts of the stock front and rear wheels was removed, only a few of the front assembly was reused.

Electric bobby car build wheels rear cad overview.png Electric bobby car build wheels rear plate design.png

Wheel base plate

As much of the drivers weight will be over the rear wheels, the wheels will be mounted to an 200x70x12mm 6061 aluminium base plate. Slots and screw holes were routed and drilled/tapped out using regular home/garage gear.

File:Electric bobby car build wheels rear plate1.jpg File:Electric bobby car build wheels rear plate2.jpg File:Electric bobby car build wheels rear plate3.jpg

Mounting wheels

Both wheels are mounted to the base plate by sandwiching the axle between the stock Hoverboard bracket using four screws.

Electric bobby car build wheels rear mounting1.jpg Electric bobby car build wheels rear mounting2.jpg

Axle cover

The axle and motor wires are directly exposed and could be damaged. A 3D-printed cover screws in place over this area.

Electric bobby car build wheels rear cover1.jpg File:Electric bobby car build wheels rear cover2.jpg

Wiring

The wiring coming from the motor is feed through the base plate and then inside the base through a small hole just underneath the front end of the plate.

Electric bobby car build wheels rear wiring1.jpg Electric bobby car build wheels rear wiring2.jpg

The wires are protected by a cable sleeve.

Front wheels

The front wheel assembly was modeled and new parts designed to incorporate the motors into the front stock wheel structure. Wheel clearance height was increase/raised by 15 mm to all the bigger radius Hoverboard wheels to fit. All parts were 3D-printed but strength was designed into the parts, primarily using long through screws to relieve much of the sheer stresses on the plastic.

Electric bobby car build wheels front cad overview1.png Electric bobby car build wheels front cad overview2.png

Full aluminium CNC parts or metal support inserts would be a future upgrade here.

Wheel assembly

The assembly consists of three main parts and six screws along with six nuts to keep it all together. A skateboard bearing lessens some of the pressure and tear on the base plastic.

Electric bobby car build wheels front assembly1.jpg Electric bobby car build wheels front assembly2.jpg Electric bobby car build wheels front assembly3.jpg

Wheel bracket

Both wheels are kept in alignment by the stock front wheel bracket. This is screwed onto the base frame. The bracket has been reinforced using eight screws with a counter plate instead of the stock two threaded screws.

Electric bobby car build wheels front bracket1.jpg Electric bobby car build wheels front bracket2.jpg Electric bobby car build wheels front bracket3.jpg

Wiring

The wiring coming from the motor is feed a small hole just in the middle of steering motion to minimize cable stress.

Electric bobby car build wheels rear wiring1.jpg Electric bobby car build wheels rear wiring2.jpg

The wires are protected by a cable sleeve.

Steering

Much of the steering assembly was redesigned from ground, except for the steering wheel itself. Much work went into figuring out how the throttle and brake wiring would be routed and protected. Addition base strength was also needed.

Electric bobby car build steering cad overview1.png

Rod bend

To make the steering usable, the steering rod had to be lengthened by approx. 20 cm including the end mounting holes. The new rod was based on the stock dimension and bend, just longer on one end to put the steering wheel at a comfortable position.

Using a Ø10mm stainless steel rod, one end was heated using a simple butane camping gas stove to heat the metal to make it pliable. Stick it in vise and bend it to the approx. radius. Then put the entire bend into the vise and squeeze it into the right dimension, using the stock as a template.

Electric bobby car build steering rod1.jpg Electric bobby car build steering rod2.jpg File:Electric bobby car build steering rod3.jpg

Rod length and mounting

Try the rod on the Bobby Car with the steering wheel next to it to find the correct steering height, approx. +16cm on the stock length. Mark the spot and cut the rod. To allow for different steering wheel heights, I made three different mounting holes. This also requires a through hole in the plastic on the steering wheel.

Electric bobby car build steering rod mounting1.jpg Electric bobby car build steering rod mounting2.jpg

To keep the rod from falling through on assembly, an outer Ø32mm white PVC tube keeps the steering wheel at the correct position and protects the wiring going to the controller.

Electric bobby car build steering rod tube1.jpg Electric bobby car build steering rod tube1.jpg

Base rod support

As there will be a lot of load on the steering rod, so additional support has been added to the top and bottom side where the rod protrudes through the base.

File:Electric bobby car build steering rod support1.jpg File:Electric bobby car build steering rod support2.jpg File:Electric bobby car build steering rod support3.jpg

Throttle and brake

Using NiklasFauth method for the throttle and brake levers by mounting them on the front side on the steering wheel. A special 3D-printed holder keeps the trigger, potentiometer and support board in place. All put in place on the steering wheel using hot glue. An upgrade here would be a through screw.

Wiring the potentiometer is simple, 3V3 (red), analog out (yellow, mid-pin), and ground (black). This connects to my break-out board located inside the steering wheel column.

Electric bobby car build steering throttle brake mounting1.jpg Electric bobby car build steering throttle brake mounting2.jpg

Electronics

Break-out board

This is board makes it easier to finish the build. It has easy to connect plugs for the throttle and brake, analog signal filtering, master and slave throttle isolation - where one driver board can be turned off without interfering with the other.

Inspired by the Jan Henrik break-out boards.

Bobbycar hoverboard throttle breakout schematic.png

Bobbycar hoverboard throttle breakout pcb top.png Bobbycar hoverboard throttle breakout pcb bottom.png

Motor wiring

Connecting the front motors to controller is straight plug and play, but the rear main motor wires needed to be extended 10 cm to reach the controller.

The hall-effect wires were easily extended using custom made 20cm extension wires.

Controllers

The controllers are essentially identical, except for slightly different caps, power transistors, and wiring method. Both are from Hoverboard productions in 2015. Both rock the same STM32F103 ARM Cortext-M3 MCU.

Electric bobby car build controller1.jpg Electric bobby car build controller2.jpg

Both controllers are mounted back-to-back and installed vertically using two flat head screws.

Electric bobby car build controller mounting1.jpg Electric bobby car build controller mounting2.jpg

Battery

This build is using the stock 10S 36V battery from the original Hoverboards. Although a 12S 44.4V battery is supported by the controllers.

The battery is kept secure by a strap around two slots in a Lexan cover plate.

Electric bobby car build battery1.jpg File:Electric bobby car build battery2.jpg

Power buttons

As this is a four motor, two controller setup, I wanted to have the possibility to power-on each controller separately. This would allow for FWD or RWD, depending on the occasion. This requires the break-out board I designed in order to isolate the two controllers so they would not power each other or block the throttle/brake signal.

Electric bobby car build power buttons1.jpg Electric bobby car build power buttons2.jpg

Power plug and charging

A 3D-printed bracket holds the power plug and charging port in place just rear of the equipment bay slot.

Electric bobby car build power charging1.jpg Electric bobby car build power charging2.jpg

Flash firmware

The Hoverboard controllers expose the programming port, requiring only wires or header to be soldered.

Electric bobby car build flash port1.jpg Electric bobby car build flash port2.jpg

Make sure the power-button is connected as this is required to put the MCU into DFU flashing mode. Connect the ST-Link V2 Mini programmer to the mainboard.

GND -> GND
SWDIO -> DIO
SWDCLK -> CLK
3V3 unconnected, powered by board

Press and hold the power-button while executing the following commands.

Unlock MCU:

openocd -f interface/stlink-v2.cfg -f target/stm32f1x.cfg -c init -c "reset halt" -c "stm32f1x unlock 0"

Flash MCU:

openocd -f interface/stlink-v2.cfg -f target/stm32f1x.cfg -c "reset halt" -c "stm32f1x mass_erase 0" -c "flash write_bank 0 test_set_led_on.bin 0" -c "reset run"

References

BOM

General parts

Quantity Description Destination
1x Big New Bobby Car Main base
2x Xbox 360 Game controller Throttle and brake potentiometer
2x Hoverboard STM32 MCU Wheels, controllers, batteries and misc.
1x ST Link V2 compatible programmer Flash new firmware
1x Aluminium 6061 200x70x12mm plate Rear wheel plate
1x Stainless steel rod Ø10mm x 100cm Steering wheel rod
1x PVC Ø32mm 50cm tube Steering wheel height and wire protection
1x XT60 connectors Power plug and power distribution
2x Ball Bearing 608ZZ Front wheel load distribution

Screws

Quantity Description Destination
16x 4 x 30mm Screws Chipboard Pozi Pan in A2 Stainless Rear plastic body to wood structure
16x M4 Washer Form A in A2 Stainless - ISO 7089 DIN 125A Rear plastic body to wood structure
12x 6 x 45mm Torx Countersunk Chipboard Screws in A2 Stainless Steel Rear alu-plate to wood structure
8x M8 x 30mm screws for motor axle bracket - use existing Hoverboard screws, 1.25mm pitch Rear motor bracket to alu-plate screws
8x M8 x 40mm Socket Low Head Cap Screws 3mm profile A2 DIN 7984 Steering assembly motor clamp
2x M8 x 25mm Low Socket Head Cap Screw 5mm low head in A2 Stainless - DIN 7984 Steering inner assembly stability top plate core
2x M8 x 80mm Socket Head Cap Screw Full Thread cut to 74mm in A2 Stainless - ISO 4762 DIN 912 Steering inner assembly stability body and bearing
2x M8 x 40mm Cap Socket Head Cap Screw 8mm head depth in A2 Stainless - ISO 4762 DIN 912 Steering inner assembly stability arm core
14x M8 Nyloc Nut Type T Thin 8mm in A2 Stainless - DIN 985 Nuts for steering assembly
4x M4 x 30mm Socket Head Cap Screws ISO 4762 DIN 912 in A2 Stainless Steel Reinforcement screws for steering bracket corners
4x M4 Nyloc Nut Type T Thin in A2 Stainless - DIN 985 Reinforcement screws for steering bracket corners
4x M4 Washer Form C in A2 Stainless - BS4320 Reinforcement screws for steering bracket corners
1z M5 304 Compression spring rod Steering wheel to rod lock screw
4x M4 x 25mm Slotted Mushroom Screw in A2 Stainless Steering rod bracing support brackets top and bottom
4x M4 Locking Nuts Nyloc Type T Thin in A2 Stainless - DIN 985 Steering rod bracing support brackets top and bottom
4x M4 Washer Form C in A2 Stainless - BS4320 Steering rod bracing support brackets top and bottom
4x M4 x 30mm Socket Head Cap Screws ISO 4762 DIN 912 in A2 Stainless Steel Motor controller board assembly screws
4x M4 Nyloc Nut Type T Thin in A2 Stainless - DIN 985 Motor controller board assembly screws
2x M5 x 16mm Slotted Mushroom Screw in A2 Stainless Motor controller board assembly mounting to plastic body screws
2x M5 Locking Nuts Nyloc Type T Thin in A2 Stainless - DIN 985 Motor controller board assembly mounting to plastic body screws
2x M5 x 16mm Slotted Mushroom Screw in A2 Stainless Bottom cover plate support screws
2x M5 Locking Nuts Nyloc Type T Thin in A2 Stainless - DIN 985 Bottom cover plate support screws