First build | Loaded Icarus | Dual 5060 | 12S3P | Custom electronics

This topic is about the electric longboard I recently completed. In this post, I’ll try to give an overview of how it works, and how it was built. If you are interested in more details, please ask, I’ll be happy to answer.

First, I have to say that this forum was a very useful source of information, inspiration, and know-how. Thank you to all the members! I joined the forum only recently, but I was following it for a long time!

Before going into the details, this is what it looks like in the end:

Why am I making a custom electric longboard?

I could have just bought a ready-to-ride electric longboard, this would have been less expensive, and dramatically less time-consuming. However, I could not find a board that looked safe enough for the steep slopes of Lausanne, where I live. These are the points that really frightened me, and that I needed to address:

  • It is not possible to brake effectively at high speed for a long time, while going downhill. The braking power normally goes back to the battery, but what if the power is too high or the battery is full? Either the cells are damaged (no limits in the ESC configuration), or the braking torque decreases with speed (limited regen current and cell voltage).
  • In the case a mosfet blows, a possible failure mode is shorting two phases of the motor, which leads to an unexpected strong braking effect and a hard fall.
  • For sharp turns, you need lose trucks and soft bushings, but this may lead to speed wobble.

And finally, I simply wanted to train my electronics skills! So, I started this project that involved not only the usual DIY of mechanically making the board, but also the design of the PCBs themselves!

Summary of the uncommon features of this board:

  • Self-balancing “segway” mode for sharper turns at low speed, or even turning in place.
  • Large resistor to dissipate power when regenerative braking is not enough (battery full, or charge current limitation).
  • Headlights that support both directions. The rear red light is also lit brighter when braking.
  • Electro-mechanical relays on the ESC: avoids blocking the motors if the microcontroller stalls or a mosfet fails. This also allows pushing the board with less resistance, when it is unpowered.

Overview

Main components:

  • Deck: Loaded Icarus.
  • Trucks: Paris Trucks V2, 195mm.
  • Wheels: Orangatang Kegel 80mm, 80a.
  • Motors: dual NTM propdrive from HobbyKing, 5060, 270 RPM/V, modified termination (delta to star) which results in 156 RPM/V.
  • Battery: Samsung 25R cells from NKON, 12S 3P, with Bestech D345 BMS.
  • Transmission: 3MGT 15mm synchronous belt, aluminum pulleys, 21/60 gear ratio, because I wanted to climb steep slopes, and I am afraid to go fast.
  • Electronics: custom design (more on this later).

Specs:

  • Mass: 8.9 kg.
  • Dimensions: 1045 x 285 x 125mm.
  • Top speed: software-limited to 25 km/h to comply to the local laws. It should be able to go around 35 km/h otherwise, but I am not capable to ride it so fast yet.
  • Endurance: no idea, I should try to measure it.

Building this board

The CAD design was done with Solidworks. Notice how clean it is, when you omit the cables.

Deck: I enjoy riding the Icarus deck, but I am not so fan of the bottom artwork, which would not match the rest of the parts anyway. This is why it was sanded and painted in orange, to match the color of the wheels. I have also added threaded inserts to mount the enclosures later on. This deck is flexible, so I had to go the split enclosure way.

Motors: the motors termination was modified from delta to star, to lower the KV from 270 RPM/V to 156 RPM/V. A thermistor was also glued to the windings with thermal epoxy. Finally, a flat was ground on the motor shaft.

Motor mount: since the Paris Trucks have an irregular conical shape, the lathe was required to obtain a nice cylindrical face and attach the motor mount properly. The motor mounts were machined out of a block of aluminum, with a conventional milling machine (I don’t have access to a CNC unfortunately). There is an idler pulley to prevent belt skipping without having to tighten strongly the belt. These were 3D-printed and fit around a ball bearing.

Pulleys: both the pulleys and the belt were ordered here but needed modifications. The motor pulley needed a grub screw hole and a magnet holder for the magnetic encoder. The wheel pulley was modified with fixation holes and a hole for the ball bearing.

Battery enclosure: a fully 3D-printed enclosure would probably be suject to fatigue stress, and crack between the layers. A full aluminum enclosure would be ugly, because limited to simple angular shapes. This is why I made it based on a folded aluminum plate, with 3D-printed corners.

BMS: the stock heatsinks have been replaced by a threaded block of aluminum. This block is then screwed directly against the aluminum wall of the enclosure, with thermal paste for maximum heat dissipation. I really don’t want this part to fail.

Battery: the battery was challenging to make, because the deck and the enclosure are not flat. I also wanted that the cells are mechanically protected, and that the insulation never only depends on a thin piece of fishpaper or kapton tape. So, each P-group (or pair of P-group) is enclosed in a 3D-printed plastic enclosure, to protect them mechanically and prevent short-circuits between P-groups. They include supports for a copper bus bar, and you get tabs outside to solder your cables on. The nickel strips are first soldered to the copper bar, then spotwelded to the cells. An advantage of this design is that thanks to the looseness of the nickel strips, the spotwelds will never be mechanically stressed because of the possibly different thermal expansion of the cells and the nickel/copper. The positive side of each cell is connected to the bus bar by individual fuses. I was not able to solder reliably the fuses leads directly to the cells, so I soldered them first to a small piece of nickel, that I can spotweld it on the cell. Each balance lead is also fused, and the charge port too. The assembled battery unfortunately looks ugly because of the balance wires and the hot glue to secure the cells modules and the cables. This one is safe, but I’ll definitely look for a better design next time, which optimizes the wiring layout. Or I’ll just choose a stiff deck.

Motorboard enclosure: made from a large heatsink at the bottom, and 3D printed walls on the sides. Like all the other enclosures of this build, the outgoing cables are clamped with a dedicated 3D-printed part that is screwed to the enclosure, for strain-relief.

Braking power dissipator: I first computed the required wire diameter and number of turns to get the desired resistance and inductance: 400 turns of 0.75 mm diameter copper wire, to get 1 ohm and 150 uH, to keep the current ripple below 1 A. It needed to be custom because an off-the-shelf power resistor would be too heavy and does not have the inductance required to avoid excessive current ripple. The coil was hand-wound on a smooth cylindrical bar. A wooden plate was inserted to hold it and give it the compact shape.

Remote: 3D-printed enclosure, the trigger shaft is guided with a ball bearing. It is powered by a rechargeable 9V battery, that can be easily swapped by another one. The motors current is controlled with a RC-like trigger, if the thumb dead man’s switch is pressed. The LEDs indicate the board battery level.

Smartwatch: just a normal Android watch with a custom app to connect to the board with Bluetooth. From here, you can visualize the speed, the motors current, the battery level, the battery power, the components temperatures, the pitch angle of the board and the current operating mode. You can also unlock the board, switch on/off the headlights and tune the balance controller PID coefficients. It also records the skateboard data, in addition to the GPS position of the phone.

PCBs

Motorboard: The mosfets are rated up to 12S and 30 A for continuous operation. The large components are on top, the mosfets are on the bottom side and fixation screws are between the mosfets, so it is easy to screw firmly a heatsink below. This board does field-oriented control (sine wave commutation), and uses a 50 kHz PWM frequency to avoid bothering surrounding animals. The electro-mechanical relays are connected to a watchdog circuit that detects if the microcontroller crashed and avoid locking the wheels. The H-bridges are individually fused, which should allow to keep the control of one motor if the opposite side fails. The communication with the motors encoders is through a differential SPI bus for maximum reliability. There are also analog input connectors for thermistors. Last but not least, the USB communication port is also galvanically isolated, since I don’t want my laptop to die in case of a serious issue with the board.

LedBoard: they are powered directly from the 48V of the battery (no need for a BEC), and can be controlled from the motorboard. This allows to switch the headlights on and off directly from the smartwatch.

Each PCB has both the white and red LEDs. The white LEDs have a reflector to reduce the field of view. The red light is stronger when braking, to emulate the behavior of the taillights of a car.

When the headlights are enabled, the color is chosen automatically so that the white light is always in the direction of the movement, and the red light in the opposite direction.

RemoteBoard: just a potentiometer for the trigger, buttons, LEDs, and a Xbee module.

EncoderBoard: just a magnetic encoder and a differential transceiver to improve the reliability of the SPI communication.

If you want the details of what the main components are:

First ride test

This board can theoretically go up to 36 km/h by design, but the speed is software-limited to 25 km/h to comply to the local laws. The max motor current is also currently limited to 20A instead of 30A, because I am not yet skilled enough to handle it safely.

I have never rode another electric skateboard, but this one feels smooth and nice. The flex of the board probably helps. The only thing I really don’t like so far is the feeling of the trigger of the remote. The spring is not strong enough and there is a bit of friction, which makes more difficult to feel the neutral position. I need to fix this.

I have never needed so far to brake strongly at high speed, so the brake dissipator was not tested in real conditions yet.

Here is the video. Don’t expect good riding skills from me:

Balance control

Using its IMU, the motorboard is able to set the motors torque such that the board keeps a constant orientation. It can then be used like a segway, you just need to tilt (changing slightly the pitch angle of the board) to go forward or backward. Turning is controlled with the trigger of the remote.

This is still more difficult to ride than a segway or a hoverboard. While the board pitch angle is controlled by the motorboard, the roll angle is free because the truck can still pivot. So the rider should take care about stabilizing the lateral sway.

This is a video of how it works currently, but keep in mind this is still kind of the preliminary early pre-alpha stage of the development:

Let’s try breaking the world record for the longest manual!

Let me know what you think of that! Thanks!

76 Likes

Wow wtf this is one of the most DIY boards I’ve ever seen lol

How’s the startup torque? I imagine it should be really nice with the encoders

15 Likes

Indeed, thanks to the encoders you get the maximum torque whatever the speed. The torque is very smooth thanks to the sine commutation. You can even hold and rotate the wheels slowly with your hands (even in both directions) and feel that the torque almost doesn’t change.
This makes auto-balancing easier.

3 Likes

This is madness, a lot of cool surprisingly unusual things in one board! Very refreshing :slight_smile:

10 Likes

Nice job, I think it’s a good idea I wouldn’t have thought about it.
I love the manual in reverse.

Holy shit this is impressive. I’m curious how the board knows to stop sending power to the battery (when braking) and to send it to the resistor instead.

Also I really want wheelie mode for my EMTB because trying to balance my wheelies manually is hard.

8 Likes

Can you control the speed when you do a manual?

I think he could by leaning forward more.

1 Like

Wow dude, amazing. Some cool features I’d love to rip off in there if only I was smart enough lol.
This is a true diy board!

3 Likes

The current implementation is that the voltage (and then the current) applied to the power resistor is proportional to the excess current to the battery. For example, if you set the max battery regen current to 10.0 A and you actually are measuring 10.1 A, you multiply this error (10.1-10 = 0.1 A) by a gain (e.g. 20 V/A) and you obtain the voltage to apply to the resistor (in this case, 0.1 A * 20 V/A = 2 V).

I have to say I have not done the tuning of this gain yet, because I am not capable to brake hard AND at high speed at the same time. I think I would just loose balance. I really need to build a testrig to test that safely.

1 Like

Of course, this closed-loop control only works if the gain is large enough. If it is too low, it won’t limit the regen current to the battery enough. If it is too high, however, it may become unstable.

Yeah full brake full speed is sketchy but can be done. I was wondering what physically is reading these voltages and deciding where the current goes?

This is the first time that I’ve seen a flux capacitor used on anything other than a DeLorean.

6 Likes

Wow…that is an astounding build! Thank you for sharing it with us and I look forward to hearing more as you test and refine it.

1 Like

Physically, the battery current and the power resistor current are measured with a Hall-effect sensor (I am using this one). When the current flows through, the sensor outputs a voltage proportional to the current, that can be read by an analog input of the microcontroller.

What “decides” where the current goes is a single half-bridge (it is kind of a double switch, you normally need 3 of these for driving a brushless motor) that is dedicated to that, and sets whether some current should flow into the resistor or not. Like a drain tap for water. Note that the current will then flow both to the battery and the resistor. Not sure if this is clear, it is difficult to explain.

2 Likes

WTF, this has more engineering and R&D behind it than most production boards! :exploding_head: You must really have a ton of spare time! :sweat_smile: Very unconventional solutions to the problems a lot of us deal with.

Okay, snarky remarks aside, this board is awesome! Definitely interested in seeing you test the braking power dissipator, I want to see how hot it gets when braking down a steep hill :smiley:

9 Likes

This is amazing. Like seriously amazing. What do you do for money? Engineer maybe? I can’t even fathom half the stuff you did here. Design your own remote/esc’s, lighting control. Not even getting into the machining of custom parts lol. Really impressed. Like, you figured out so much shit on your own here. Very cool.

How much did this build cost you?

Oh ya, last thing, bend your knees a bit more when riding. Keep center of gravity low and above the board (not that you weren’t), it’ll start to feel very comfortable quick. Then you’ll have to remove the speed limitations. You’re gonna love this ride! All the cools.

Thanks for sharing!

3 Likes

Holy fuck, Ive been wanting to get an app on my smartwatch to do that stuff, that’s so cool! You’re really pushing the limits of diy

I don’t have so much spare time, unfortunately… This is why this board took forever to design and build. I started the design and ordered the first parts in 2017!

3 Likes

Yes, I have a mechanical engineering degree. I was PhD student at the Swiss federal institute of technology of Lausanne until very recently. Now it’s time to go working in the industry again!

This is the approximate breakout of the cost of this board:

Part Amount in €
Motors (with one spare) 138
Power cables + connectors 43
Signal cables + fuses 76
Bare PCBs 277
PCB components + charger 547
Pulleys + belts 86
18650 cells (with spares) + nickel strips 174
BMS (with one spare) 134
Complete Icarus board 395
Larger trucks + griptape 105
Misc: paint, glue, screws, ball bearings, 9V battery, nGen filament, etc. 250
kWeld spot welder 293
Total 2518 €

This board costed quite some money, compared to its power. But the goal was to have fun and to learn as much as possible!

13 Likes