Difference between revisions of "BOARDLOCK"

From ESE205 Wiki
Jump to navigation Jump to search
Line 273: Line 273:
  
 
Update: GPS chip and Pi are communicating!  
 
Update: GPS chip and Pi are communicating!  
 
  
 
[[File:coordinates.jpeg|center left|300px|Coordinates]]
 
[[File:coordinates.jpeg|center left|300px|Coordinates]]
  
 
[[File:setup.jpeg|center|300px|Pi and GPS Chip Connections]]
 
[[File:setup.jpeg|center|300px|Pi and GPS Chip Connections]]

Revision as of 20:09, 31 October 2018


Link to Project: [[1]]

Week 1: September 3rd- September 7th

1. Brainstorming project ideas

- Inspired by the convenience of BIRD and LimeBike, we hoped to recreate this idea in a longboard rather than bikes and scooters


2. Decided on BOARDLOCK, envisioning a single-motor mappable electric longboard with manual locking ability (from iPhone)


Week 2: September 10th- September 14th

1. Max: Research/Acquiring materials (1.5 hours)

- Found optimal longboard size (33 inches), brushless motor, ESC, E-Longboard Assembly Kit, 2x Lipo Batteries


2. Sept 13: All 3 of us met with Jim and our TA to finalize BOARDLOCK idea, make a plan (1 hour)

- Got idea approved :), decided to focus on building GPS using Raspberry Pi

- Discarded building an app (not enough knowledge/would take too long)

- Debating how to manually increase/decrease motor speed (remote control vs wire connection?)

- Debating whether to use Bluetooth to detects user's proximity to longboard

- Debating best way to manually lock/unlock wheels (RFID key card?)


3. TA provided us with materials (Night Light, Raspberry Pi) and locker number


Week 3: September 17th - September 21st

1. Amin, Isa, Max: set up Night Light (2 hours)

- Built and tested the circuit on a breadboard, got it to work

- Designed a case for project (dimensions in millimeters: 50 x 24 x 80)

- Holding off on soldering -- need to show TA case design


2. Max and Isa: (unsuccessful) attempt to set up Raspberry Pi (1 hour)


3. Sept 21: Group meeting with Jim and TA (1 hour)

- Discuss progress and next steps

- Decide on budget, have materials approved in order to purchase them

- Set goals for next week


Week 4: September 24th - September 28th

GOALS:

a) Group: Finalize budget/Receive materials

c) Max: Set up Raspberry Pi, get GPS working

d) Amin: 3D print Night Light design

e) Isa: Understand basics of Bluetooth interface, finish Gantt chart/Presentation slides


1. Max:

- Met with Jim, got a new Raspberry Pi, set up to his computer (2 hours)

- Assembled Longboard (30 min)


2. Amin:

-Learned how to use Tinkercad and designed night light box (2 hours)


3. Isa:

- Set up Bluetooth connection to Raspberry Pi (1 hour)

- Finalized Gantt Chart/Presentation slides (30 min)


Week 5: October 1st - October 5th

1. Max and Isa: attempted to email Pi's IP address to ourselves (1 hour)


2. Max, Amin, Isa: successfully soldered components for Night Light onto Perfboard (30 min)


3. Amin: 3D printed Night Light design


Week 6: October 8th - October 12th

GOALS:

- Learn Python

- Power Pi with Lipo Battery, connect to ESC to Brushless Motor

- Program the Pi, test Bluetooth connection

- Attach motor to Longboard

- *Establish a Bluetooth connection from phone to Pi, be able to give commands


1. Isa:

- downloaded, familiarized with Python

- Start building plan to program Pi GPS


Week 7: October 15th - October 19th

GOALS:

- be able to communicate between the Pi and ESC

- secure Bluetooth connection: Can we give the board commands from a phone?

- Draw connections sketch!

- Program Pi using Python


1. Max: made Longboard electric! (in total ~ 24 hours)

2. Isa: lit up LED light on Breadboard using Pi/programmed in Python (1.5 hours)

3. Amin: researched the best way to get GPS coordinates from pi and plot them on a map. Figured out that the best way to do so would be to write from the pi to a usb or sd card, and program a script that plots those coordinates on a map. (1.5 hours)

Sketch
LED
Wire Connections from Pi to ESC

Retrieved from: https://www.instructables.com/id/Driving-an-ESCBrushless-Motor-Using-Raspberry-Pi/

Week 8: October 22nd - October 26th

GOALS:

- Locking mechanism: Figure out how it will work -- is there a way we can power it using Bluetooth?

  • IDEA: Manual Clamp - similar to a boot design for a car


https://www.amazon.com/uxcell%C2%AE-Electric-Positions-Keylock-Switch/dp/B007QAJ2Q0

https://en.wikipedia.org/wiki/Wheel_clamp

https://www.autoanything.com/wheels-rims/what-are-wheel-locks

https://www.amazon.com/IZTOSS-SLIVER-Mini-Bicycle-Brake/dp/B01M22PNF7/ref=sr_1_12_sspa?s=hi&ie=UTF8&qid=1540407785&sr=1-12-spons&keywords=longboard+wheel+lock&psc=1


- Finish assembling Longboard (encase battery)


- Send GPS coordinates from Pi --> USB, write program that used these coordinates to map BOARDLOCK's location


1.) Amin: Made a python script that sends information to usb flash drive from raspberry pi (2 hrs)


2) Max: Designed a case for battery (1 hour)

  • Dimensions:
        130mm*155mm*65mm


3) Isa: sketch design and research logistics for locking clamp (1.5 hr)

https://pinout.xyz/

- Using Pi's GPIO pins: lock/unlock wheels based on Bluetooth connection:

  • Read INPUT pin that the switch is connected to, send OUTPUT to another pin -- powered by Pi
  • If in close proximity of board -- assume strong Bluetooth connection -- switch ON (1) --> high voltage
  • If far from board, assuming Bluetooth is disconnected, switch OFF (0) --> low voltage


Week 9: October 29th - November 2nd

GOALS:

1) Get the Pi and ESC to communicate for Locking Mechanism (handheld remote already controls the motor's speed)

  • HOW? Wiring from the pins on the Pi to those on the ESC - Program 1 PMW input pin and 1 BEC output pin + Ground pin

M-M SERVO CONNECTER WIRING

- WHITE: PWM SIGNAL

- RED: +5V WIRE

- BLACK: GND


ESC pin abbreviations

GND = ground

RX = receive

TX = transmit

CLK = clock in

RST = reset


  • Then, run a program in Python that will allow the Pi to control the motor through the ESC — allow it to move forward or not through different outputs of voltage
  • This way, when BOARDLOCK is "Locked" = no voltage being passed to the motor, unable to move


2) Establish Bluetooth Connection with Pi, be able to give commands

  • Bluetooth connection (ON vs OFF) --> Raspberry Pi (GPIO pins) --> ESC (powered by LiPo batteries) --> Motor


3) Get the GPS Chip and the Pi to communicate in order to display/map BOARDLOCK's coordinates in real time

- Manually connecting the chip to the Pi, connecting the Pi to a monitor, passing appropriate commands on Terminal

- Once this works, write a Python script that will parse useful data that we will use to map coordinates.


USEFUL TUTORIALS:

https://learn.adafruit.com/adafruit-ultimate-gps-on-the-raspberry-pi/setting-everything-up

https://www.youtube.com/watch?v=LVRXa8pX0Oc

https://www.piddlerintheroot.com/gps/


  • CHALLENGES TO DISCUSS AT GROUP MEETING ON 10/31:

- Pi is extremely unreliable, connects to some monitors only, others say "No Signal"

- Limited by only having tested the GPS inside (Do we need an open space?)

- Pi Terminal does not recognize commands to give GPS chip, is not extracting information

- 3 specific input pins on the ESC belong to remote controller (Which can we use instead to connect to Pi?)


Update: GPS chip and Pi are communicating!

Coordinates

Pi and GPS Chip Connections