S17: ElectricBoard

From Embedded Systems Learning Academy
Revision as of 02:52, 18 May 2017 by Proj user15 (talk | contribs) (Hardware Design)

Jump to: navigation, search

Grading Criteria

  • How well is Software & Hardware Design described?
  • How well can this report be used to reproduce this project?
  • Code Quality
  • Overall Report Quality:
    • Software Block Diagrams
    • Hardware Block Diagrams
      Schematic Quality
    • Quality of technical challenges and solutions adopted.

ElectricBoard

Abstract

Transportation is a necessary part of everyday life, and it can be a stressful, time-consuming task. People are often looking for faster, cleaner, inexpensive, and more convenient modes for transportation. Considering the amount of traffic in urban areas such as San Jose, regular vehicles are not as convenient or quicker than other methods such as bikes or skateboards. However, cities like SJ are quite large college cities, so human-powered modes make it potentially tiring. Therefore, this project hopes to enhance these modes by creating electronic versions.

The goal of this project is to design an electric skateboard which can be controlled via a wireless remote. Two SJOne Boards with FreeRTOS will be used as microcontrollers to control both the remote control and motors.

Objectives & Introduction

The main objective of this project is to develop a user-controlled electric skateboard. In order to do so, the following will need to be done:

  • Design of motor control system
    • Appropriate motor controls and interfacing with Electronic Speed Controllers (ESC)
  • Design of remote control system
    • Button and analog linear slider inputs to determine motor powers
    • LCD screen to display electric skateboard data
  • Establish wireless communication between motor control and remote control systems

Team Members & Responsibilities

  • Andrew Vo
  • Elton Leung
  • Eric Panganiban
    • Money Bag
  • James Grantham
  • Saketh Sai Narayana

Schedule

Week# Date Task Status Details Actual Date Complete
0 03/14 Finalize Project Proposals Completed Project Proposal Finalized. 03/14/2017
1 03/21 Finalize Bill of Materials/Design Schematic Completed BoM finalized. Design schematic completed. 03/25/2017
2 03/28 Order Parts/Components Completed Kit ordered 3/22. LiPo and Charger ordered 3/30. Personal longboard to be used. 03/30/2017
3 04/04 PCB Design/Order Completed PCB designed 04/07. PCB received 5/11. 05/11/2017
4 04/11 Assembly of Components Completed Will not be using housing. All parts mounted by velcro tape. 05/10/2017
5 04/18 Motor Control Implementation Completed Use PWM pin 2.0 on board. 04/20/2017
6 04/25 Remote Control Implementation Completed Using pin 2.6 for button and pin 0.26 for analog slider. Screen to be implemented later. 04/25/17
7 05/02 Testing/Debug/Troubleshoot Completed Need to improve wireless communication range. Max motor velocity causes instability. 05/08/2017
8 05/09 Fine Tune
9 05/16 Prepare for Demo/Complete Report In Progress Report began 05/13
10 05/23 Project Demo

Parts List & Cost

Part Name Cost Qty Comments
SJOne Board $80.00 2 Microcontrollers used for communicating b/w remote control/skateboard
Nucbot Motor Kit $369.00 1 Includes Motors, wheels, and ESC
LiPo Batteries $43.00 1 Rechargeable battery to power ESC/motors
LiPo Balancer/Charger $62.99 1 Charge LiPo batteries
PCB order  ??? 1 Battery charing for Remote Control
Skateboard $100.00 1 Longboard used.
Velcro mounting $8.99 1 Mounting components onto bottom of longboard
Button $1.99 1 Press to send motor driving percentage.
Analog Slider $1.99 1 Slide to adjust power to drive motors.
LED Screen  ??? 1 UI display for remote control

Design & Implementation

The design section can go over your hardware and software design. Organize this section using sub-sections that go over your design and implementation.

Hardware Design

Discuss your hardware design here. Show detailed schematics, and the interface here.

There are two subsystems to consider for hardware design: the motor controller and the remote control.

Motor Controller

The main hardware components for the electric skateboard consist of:

  • SJ One Board
  • Electronic Speed Controllers (ESCs) x2
  • Brushless Wheel Hub Motors x2
  • 6S 3300 mAh 22.2V Lithium Polymer (LiPo) Battery
  • 2-AA Battery Pack
  • Force/Pressure Sensor
Remote Control

The main hardware components for the electric skateboard consist of:

  • SJ One Board
  • Slider Switch
  • Button

Hardware Interface

In this section, you can describe how your hardware communicates, such as which BUSes used. You can discuss your driver implementation here, such that the Software Design section is isolated to talk about high level workings rather than inner working of your project.

Electric Skateboard

The main micro controller used for the skateboard portion was the SJ One Board. It is connected directly to the ESC's, which are then directly connected to the motors. The board also connects to pressure sensor as an additional feature to aide in controlling the skateboard. However, the ESC's and SJ One Board are powered separately. The SJ One board is powered via the 2 pack AA batteries, while the ESC's use the 6S 3300 mAh 22.2V Lithium Polymer (LiPo) Battery. The wiring of the configuration can be seen below:

INSERT FIGURE HERE

Remote Control

The pins used for the remote control were a slider switch and a button. The slider switch would control the speed of the skateboard by varying resistance, while the button would be used to initiate that change. The speed can only be changed once the button is being held. This use was to limit communication, and thus, power consumption as well. For this instance, an ADC pin and a GPIO pin were needed for both the slider switch and the button, respectively. A diagram of the connections can be seen in the Figure below:

INSERT FIGURE HERE

Once the button is pressed, it would activate an interrupt, which would immediately send the signal of the slider into a queue to communicate with the SJ One Board on the skateboard to control the motors. To send the information via wireless communication, the nordic wireless API ("wireless.h") was used. This is a wrap-around for "mesh.h".

TALKS ABOUT SCREEN

Software Design

Show your software design. For example, if you are designing an MP3 Player, show the tasks that you are using, and what they are doing at a high level. Do not show the details of the code. For example, do not show exact code, but you may show psuedocode and fragments of code. Keep in mind that you are showing DESIGN of your software, not the inner workings of it.

There are three main files that runs this project: RemoteControl, ElectricBoardControl, and ElectricBoardReceiver. RemoteControl continuously checks to see if the button is pressed. If so, there is an interrupt that activates and starts to calculate the appropriate power level given from the slider switch, and sends it out to ElectricBoardReceive. ElectricBoardReceiver simply handles the packet coming from RemoteControl via wireless communication, and reads the data to send to the queue. The queue is then seen by ElectricBoardControl, which reads the power level, calculates duty cycles, and controls the motors to run accordingly.

Implementation

This section includes implementation, but again, not the details, just the high level. For example, you can list the steps it takes to communicate over a sensor, or the steps needed to write a page of memory onto SPI Flash. You can include sub-sections for each of your component implementation.

Testing & Technical Challenges

Describe the challenges of your project. What advise would you give yourself or someone else if your project can be started from scratch again? Make a smooth transition to testing section and described what it took to test your project.

Include sub-sections that list out a problem and solution, such as:

Hardware Mounting

Most electric skateboards have a housing which encases the LiPo battery, ESCs, and receiver that are necessary to be mounted onto the board. However, all commercially available housings for skateboards were too small for the components ordered. This is mainly due to the size of the LiPo battery. The LiPo battery being used for this project is not one typically used for electric skateboards. It is very thick compared to the ones that are used for electric skateboards. Velcro mounting tape will be used instead of the housing enclosure for this project because it has a strong enough hold and can easily be removed without damaging the equipment. This is only being used as a temporary solution until a thinner LiPo battery can replace the existing one and an appropriate housing enclosure can be ordered.

Electronic Speed Controllers

The electronic speed controllers (ESC) were ordered as part of a kit. However, no specification sheet or documentation came with the ESC's. ESC's usually receive and interpret an input PWM signal to drive motors at a specified speed. The duty cycle of the PWM signal required by the ESC's to drive the motor was unknown. We requested a data sheet for the ESC's from the company that we ordered from but there was no response.

An existing wireless receiver and remote came with the kit as well, but, for this project, we wanted to design and implement our own remote control. The output of the wireless receiver was observed with an oscilloscope after connecting these two components to the board. From the oscilloscope readings, proper PWM signals were determined for an idle state, maximum velocity state, and maximum reverse velocity state for the ESC's.

Wireless Communication Range

The electric skateboard and wireless communication were initially working. However, with further testing, it was found that the wireless communication was unstable for the nordic wireless chip on the SJ One board for distances over approximately 3 feet. The data transfer rate was lowered to 250 kB/s from 2000 kB/s which increased the wireless communication distance to about 4 feet. However, we wanted a much more stable connection so antennas were added.

Conclusion

Conclude your project here. You can recap your testing and problems. You should address the "so what" part here to indicate what you ultimately learnt from this project. How has this project increased your knowledge?

Project Video

Upload a video of your project and post the link here.

Project Source Code

References

Acknowledgement

Any acknowledgement that you may wish to provide can be included here.

References Used

List any references used in project.

Appendix

You can list the references you used.