Smartboard

by jaronvan134 in Outside > Skateboarding

249 Views, 0 Favorites, 0 Comments

Smartboard

287863010_5804326702931300_6220521428921208968_n.jpg

Hello, I am a student from Howest in belgium.

I made a Smart skateboard that can read the speed and luminosity as you ride. You can also start a session where it stores the time, distance, average speed and saves it to a database where you can get a graph from it.

Today I will show you step by step how to make a smartboard with a raspberry pi on your own.

How I came up with the idea of making a smart skateboard? Well, personally I skate and I always wanted to know after I made a trip. How long it was and what the distance and speed was. So that's how I came up with the idea of making a smart board.

Supplies

I used the following items:

  • Skateboard
  • Raspberry Pi 3 Model B
  • memorycard
  • hall sensor
  • Raspberry Pi 40 GPIO pins Extension kit
  • powerbank
  • LCD - screen
  • Ultrasonic Distance Sensor Module
  • LDR sensor
  • magnet
  • ledstrip
  • MCP3008
  • potentiometer
  • level shifter
  • wires
  • 5v battery

The total cost of this build is € 250,00

The Wiring

286848630_1206862966731873_3182216242775879350_n.jpg
schakeling_breadboard.png
electronica_schem.png

For the circuit we have 3 sensors, a distance sensor, ldr sensor and a hall sensor. The first sensor is the Ultrasonic Distance Sensor Module, I use this sensor to change the screen of the LCD screen with your foot. By tapping with your foot it will register the distance and when your foot is on it will register that and will change the lcd screen. The second sensor is the LDR sensor, it will see if it is light or dark outside and based on that data the led strip will turn on or off. The third sensor is the hall sensor. This is a sensor that can measure the magnetic field, this I will use to know the number of revolutions the wheel makes by attaching a magnet to the wheel. These revolutions I will then convert to speed so I can know the speed you are driving at. 

For the active elements, I use the LCD screen. It is used to indicate the real-time speed and light intensity. If you then change screens with the distance sensor I mentioned above. you will come to the screen with the ip address on so you can surf on it for the website. 

The Database

smartboard.png

I've made a database so i could store the data of all my sensors and the sessions. You can download the database dump from below.

Downloads

Construction Smartboard

288521015_368984858469010_8167563739134540660_n.jpg
23014.jpg
universalsaw-18v-100-53303-hires-png-rgb-oneux-360519PpJy2CaUFDgHj_600x600.png
283470243_551617896460803_6896635714662763724_n.png
286748634_5060839967378569_4828099854098353972_n.jpg

The first thing we're going to do is make holes in the nose of the skateboard for the distance sensor, the hall sensor and the lcd screen. I drilled the holes for the distance sensor with the kind of drill from picture 2. I cut the hole for the lcd screen with a jigsaw, but you can also make holes with a drill and cut out the rest with a saw. Between the distance sensor and the LCD is a hole for the lDR who you can just drill. You can place the led strip wherever you want, but I put it on the side of the box. The last part is the hall sensor. You need to place the hall sensor on the trucks and I taped it on. What you also need to do is put the magnet on the side of the wheel so that the hall sensor can read it as it passes by. note, you need to pay close attention to which side of the magnet it reads in and which one it doesn't. The hall sensor measures the plus on one side and the minus on the other side of the magnet. For the box that holds the electronics, I used a regular box that I attached to the skateboard with screws. The battery is attached with a regular strap that I stapled in place so you can replace the battery or take it out to charge.

Connect Everything

286748634_5060839967378569_4828099854098353972_n.jpg

If you have done everything from previous steps you are ready to connect everything. Connecting is not that difficult. You just have to follow the diagram from step 1 and you are good to go. Just make sure you don't forget the level shifter because otherwise the raspberry pi will break down. And also be careful not to power the MCP3008 with 5v, It only need 3.3v.

Programming

For the code. The first thing you have to do is make sure you have downloaded visual studio code. Before you download enything we will have to enable the spi interface and to do that we first have to typ "sudo raspi-config" and there you can install the spi interface. If that is done you have to install python on visual studio code. The you can download my code here. for the people who are not familiar with github. push on the link and it will take you to a screen with my code on it. What you have to do then is click on the green code button on the top right and there you can download it. Then with the zip file that is on your computer, you can then upzip it and open it in visual studio code.

Run the Code & Done

We have now come to the end of the project. The last thing left to do is the easiest. You just have to run the code and surf to the address that comes up on your lcd screen and your done!