Weeks 28-32 – Eboard

Week 28:

  • assemble, configure and test VESC
  • order parts from Botland (VESC heatsinks)
  • create Eboard v2 overview, units descriptions, tasks and functions in the system, general work plan
  • Rear Lights Driver (RLD):
    • block diagram, choose main parts
  • Power Distribution Board (PDB):
    • block diagram, choose main parts
    • select capacitors and connectors
    • board layout in AutoCAD, determine capacitors count
  • CAN Bus:
    • select CAN Transceiver from TME for CAN bus testing
  • order power wires (from Allegro)

Week 29:

  • order parts from TME (cases, parts for RLD and PDB)
  • order parts for second VESC
  • add heatsinks to built VESC, test drive
  • Data logging:
    • test serial data output from VESC (through serial terminal)
    • road tests with one VESC, see how temperatures change
  • DU:
    • create 3D model of selected case
    • download/create 3D model of VESC
  • RLD:
    • PCB layout

Week 30:

Nothing done 🙁

Week 31:

  • DU:
    • RLD: PCB layout, gerber files generation
    • PDB: schematic, PCB layout, gerber files generation

Week 32:


Working on Eboard again!

The exams are finished and all the study projects are done, so I can spend more time on my own creations. It’s high time I resumed my fantastic Eboard project. For the last 9 months the board was hidden under my desk, covered in dust. Not anymore!


I plan to us the Eboard project as my Bachelor’s Thesis. To do that I need to improve electronic systems on board. Right now they are a mess. Ugly protoboards, unreliable connectors, messy software, difficult debugging and so on.

The plan is as follows:

  • assemble the board in its current form to test drive system once again (and to ride it as soon as possible, who am I trying to cheat 😉 )
  • create solid overview of electrical and electronic systems. Decide what parameters should be measured, what should be displayed, what should be logged (and how) etc.
  • select microcontrollers. STM32s are on my mind, tied together with CAN interface…
  • electronics schematics, PCB design and manufacturing
  • port code to STM (if selected instead of AVRs), refactor it, add useful logging

I hope to have the project finished by the end of summer holidays (new term starts in October), but it’s difficult to make any estimates now. We’ll see.

Electric mountainboard – post #4 Electronics finished, software in progress

Hello, it’s been a while since my last update on Eboard project.

Last time I wrote about mechanical part being more or less finished. Since then I focused my efforts on developing electronics and software.


Electronics basically consists of three main parts: Drivers Unit, Battery Unit and Control Unit.

Drivers Unit


Unit is composed of custom board and two ESCs. Board is used to distribute power and signal from receiver to ESCs, measure current drawn by controllers, measure temperatures (of motors, ESCs and current sensors – 6 thermometers in total), control the rear lights and fans. Initially I wanted to use just one microcontroller (uC) in this project, but I decided that it would require too many wires going thorugh the board (analog signals, power, etc.), so I added Arduino Pro Mini clone board (with ATmega328p), which reads all the sensors and sends the data over serial port to uC located in Control Unit.



To mount this board to deck I designed a simple “case” (no top yet)


As you can see I added four slots for small fans to increase airflow – I don’t know if they will be necessary, I will have to carry out a few field tests.

Battery Unit

It will be mounted in middle of the board. I had a little bit of a problem with deciding how to design it so that I could easily remove batteries, mount it properly to the deck (only two holes in it, I don’t want to drill any additional) and first of all it should reliably hold the batteries. As far as electronics goes I built a board with four MOSFETs, which will be used to turn on and off the ESCs. I did that in order to limit “startup” actions just to turning the key in front part of the board.


I additionally installed thermometer on one of the heatsinks to measure the temperature and possibly display a warning on a LCD when certain threshold is exceeded. At higher currents quite a lot of heat can be generated on these transistors (their resistance in on state is 15mOhm). I did a bit of math and at current of 20A ( ~25 km/h on flat ground) 1,5W is generated on each of them, which should result in temperature around 45C (at 20C ambient temperature). Again – tests will confirm or negate my calculations and assumptions.

Control Unit

Main purpose of this unit is to display data on embedded LCD and control a few things (turning MOSFETs in Battery Unit on and off, lights, etc.). Right now ATmega328p is used, but in near future I’m planning to switch to ATmega2560 (graphical LCD requires many pins and I will need additional serial port to receive data from GPS).

CU connected to DU during initial software testing:



Main task on DU’s side is to get readings from sensors, prepare a “packet”, convert it to character string and send it over serial. So far, so good. CU’s task is a bit more difficult, since it needs to perform parsing of received data, check if everything is correct and display data and so on.

Debugging AVRs can be a bit troublesome, so I first wrote PC “emulation” of aforementioned system. I implemented a class “MyString” to create additional layer of abstraction and avoid playing with pointers everywhere in my code. The whole source code is about 600 lines long and is available at my Github. After eliminating initial bugs I uploaded slightly modified version to DU (sending data is easier 😉 ). When I had sending part sorted out, I moved on to CU’s software. Again I had to do a bit of debugging, but eventually the system is working. I guess I reinvented the wheel a bit with creating my own string class, but I’ll treat it as an exercise 😉 Also I made slightly stupid decision when choosing sent data format- packet string is  in format “sIaxx.xIbyy.yTazz.z …  “, where ‘s’ indicates start of packet. Now I think I needn’t have included all the Ia, Ib and so on, since in my parser class I don’t even look at these characters – I just “jump” from one number to next, so these characters just increase transmission time and take unnecessary space in uCs’ memory.

There are a few things to be added, but hopefully in next few days I will assemble everything and finally do some real riding 😀

Electric mountainboard – post #3 Update

I managed to improve power transmission by using sprockets with already added hubs. I just had to make two threaded holes in hubs and modify motors’ shafts to make flat surfaces on them.


Another thing that I did is motors’ temperatures monitoring – I had some concerns about motors’ overheating so I added LM35 thermometer to each motor and quickly built board with 2×16 LCD, ATmega328P (on Arduino Pro Mini clone board) and a 7805 voltage regulator.


I also rerouted the wires a bit since they were quite messy (they still are, but slightly less 😉 ).

Tests showed that my mechanical solution works OK – no sprocket slip on motor’s shaft. Temperature monitor also passed the test – I noticed that both motors have the same temperature (+/- 2 C) – I was worried that one motor may get hotter than the other because I changed bearings in one of them. While riding, motor’s temperature is about 6-10C higher than ambient temperature. When I stop and no airflow occurs motor temperature is higher, around 15C. No big deal here.

A few more photos of the board:

P1060857 P1060856 P1060858

Right now I focus my efforts on building case for batteries and designing electronics (power – IGBTs, sensing (temperatures, currents, voltages) and displaying data). I encountered problems with 128×64 graphical LCD I took out of HMI control panel – I believe it’s some kind of wiring error (I don’t know which type of pinout it has).

Electric mountainboard – post #2 Plans

Today I’d like to write a short post about my plans concerning my board project.

Right now I have almost working board with very simple “control unit” with LCD to display motor’s temperatures (by “almost working” I mean being able to ride for about 5-10 minutes, then some mechanical part breaks). Batteries are mounted using transport strap, wires are attached to the board using adhesive tape, to make it ready to ride I have to connect 4 plugs. But it’s just a first prototype to check whether my idea is viable (i.e. building a reliable board with brushless motors using only 3D printer and generic tools – no milling machine and welding).

So here’s my plan for the next 1-2 months:

  • Mechanical part of the project:

Mainly power transmission problems – I have troubles attaching sprocket wheel to the motor’s shaft in a reliable way. But after today’s tests I hope that I need to make just minor improvements to my design and I will be done with that problem.

Second mechanical issue is bearing the motors and shafts. As I mentioned in my previous post, recently I added shaft’s support on second end to eliminate moment load). After quick tests I noticed that the bearing I added was getting a bit too warm (but I haven’t measured it exactly yet) – that’s probably due to the fact that there are 2 bearings inside the motor and adding third bearing makes one of the bearings overly loaded (due to inaccuracies in bearings position on the shaft).

If I manage to fix these two problems I will probably done with the mechanical part – at least I hope so, but probably a few other problems will show up.

  • Electronics part of the project:


Right now I only have attached thermometers to the motors. I’m planning to add temperature measurement to the motor’s drivers, a GPS, current sensors (two, one for each motor), batterie’s voltage measurement.

Control unit

My initial plan is to use Arduino Mega as the “brain” of the whole board (but I’ll probably write code in C++, without using Arduino “framework”/libraries). I already have an LCD 192px x 128px. The display will be mounted in front part of the board in a 3D-printed case. I will also add “ignition switch” to eliminate tiresome connecting connectors.

Power management

Aforementioned ignition switch will connect power (from small Li-po) to the Arduino, which will make sure the main batteries are connected and it will turn on IGBTs, which will be located between batteries and motor’s drivers. I will describe this in more detail in one of future posts. I still haven’t figured out how I’ll charge the batteries (how to make it the least tiresome)

  • Designing cases/mounts

I’ll have to create cases for control unit (already started) , batteries and motor’s drivers. So far I have printed mounts for drivers, but I already see that I’ll have to redesign them (I didn’t consult additional space for board with IGBTs).

I also want to make proper lighting – both for safety and better style. To test my design idea I printed and assembled one back light, render and real photo:


Obviously there’s a lot to be done yet, but I’ll never give up – I’ve already sacrificed too much time and money for this project to surrender.

Electric mountainboard – post #1 Motivation and what I’ve done so far


I live in the capital of Poland – Warsaw. Since it’s a pretty big city, commuting takes quite a long time – especially from my new flat, which is located 5 kilometers from my faculty and 7 kilometers from my workplace. If I take a bus, one-way commute can take between 30 minutes to 1 hour. Right now I don’t want to buy a car (a bit too costly + traffic jams).

Commuting by bike takes 20-25 minutes, but the weather has to be good (temperature + no rainfall)  and being sweaty for next hour or so is pretty discouraging.

That’s why I came up with an idea of building an electric mountainboard. I can ride it even when it’s cold and if it starts raining I can grab the board and take a bus/tram.

In theory it’s simple: take a mountainboard, mount a motor or two on it, add remore control and motor drivers, batteries and Bob’s your uncle.

But in real life situation is not that simple:

Theory and practice


Nevertheless, I decided to try to build it.

I started thinking about building some kind of electric board in the end of 2014. Learing using Autodesk Inventor during 3rd term and buying 3D printer in February 2015 enabled me to turn vague thoughts into reality.

My initial approach was using a deck from a regular skateboard with mountainboard trucks and tyres, two BLDC motors with drivers, Li-po batteries, 3D printed motor mounts, power transmission via two sprockets and a chain.

I created a very simplified model in Autodesk Inventor:


After printing the mounts and assembling the unit (without chain and sprockets):


Wheel sprocket was supposed to be mounted to the motor’s shaft using prop adapter.

My main problems with first version of the board were:

  • mounting sprocket wheel on motor’s shaft
  • radial and axial play of sprocket wheel mounted to a wheel’s rim
  • taking turns
  • board a bit too short
  • bearings inside motors were overly loaded with moment (long distance between motor and sprocket, shaft was unsupported on second end)

After first tests I bought a proper deck, redesigned motor mount (to minimise distance between motor and sprocket), added shaft support:



For the last few days I worked mainly on electronics part of the board – I thermometers to monitor motor’s temperature and display in the front part of the board. I also worked on mechanical part – modified motor’s mounts a bit, prepared new sprockets with hubs.

Right now my 3D model looks like this:


Most recent photos of the board:

20150604_102008 P1060848

I’m planning to make a test of my latest improvements tommorow. Fingers crossed!