Designing and Building a Self-Driving Car – Part 4

Topics:  The many lessons of Pulse Width Modification or “Where have I seen this before?” Thoughts on Motor Speed and where to look for inspiration for a project.

This blog will be about the many lessons one learns throughout his or her life – and boy! have I’ve learned many!  In college I took electrical and electronics engineering courses, but one of the biggest lessons learned were not about resistors, capacitors, or Kirchhoff’s Voltage Law, or transistors; it was: ” You will forget what you learn quickly, if you don’t apply it in practice.”  This is the lesson that I intend to instill in my child throughout this project.

My “Parent’s Guide” tip is to create a project that will continuously reinforce the concepts that you will be using for the project.  The best way, in my opinion, to do this is to have a project that will last many months (or in years in my case).  Take a detour now and then to do a science fair or demonstration in from of the grandparents, science clubs and assortment of friends; in between boy scouts, or girl scouts, baseball, volleyball, tennis, swimming, or the myriad of activities children do throughout their lives, you need one project that is consistent and continuous and big for which they can take into college or whatever the next big step in their lives will be.

Learned about pulse modifications throughout my education.  First in an electronics lab course in 1993, and again in 1997 and 1999.  When I began working on the autonomous car project with my child, we began working on the PWM circuit for the electric motor that was to go into the car.  I forgot how it worked or what it would take to build this circuit.

The morale is working on a project such as this she help to continuously reinforce concepts of STEM throughout a child’s life and should not just be about getting it done!

We decided to create multiple prototypes (4), varying in difficulty, size, configuration and purpose.

Prototype 1:  Will be the an simplified Arduino and RaspberryPi prototype built for the sole purpose of controlling a DC Motor and a Servo with OpenCV and a RaspberryPi camera.  It’s a non-functional RC model.

IMG_2630[1]

Prototype 2:  Will be a workable RC Car that will do everything that Prototype 1 will do, but will have a Brushless motor with ESC and will move.

IMG_0849

Prototype 3:  Will be a 3D printed model designed in Bender and then 3D printed.  This prototype will better emulate an “actual car”.  It will have all the essentials such as a transmission, steering, suspension, differential, axle, etc.  It will not have all the other things a car has that have nothing to do with power, acceleration or steering.  I will be a working model with an actual brushless motor, computers and microcontrollers.  It will not have cameras, but will be operated by a dataset from actual road video.

2019-10-29_16-56-33

Figure 1:  Blender open source design software

Prototype 4:   An actual gasoline car rebuilt into an electrified self-driving car.  My hope is to rebuild an old Geo Metro.  But the chances are a little small at this point, because Geo Metros all over the country are being snapped up to convert to electric.  The advantages of rebuilding an electric car using a Geo Metro are:

  1. They’re cheap.  Many have bad engines which make them even cheaper.  You could find one from $300 to $1500.
  2. They’re lightweight.  Geo Metros are three cylinder and don’t have all the stuff that weights modern cars down.
  3. The shape is conducive to the space you would need for an electric car.  Since the car that I’m building will also contain computers and other mechanisms to make it self-driving, the hatchback is particularly attractive.

 

Chevrolet_Metro_hatchback_rear

 

DataSciCon.Tech 2017 Review

Saturday, December 2nd , 2017

DataSciCon.Tech is a data science conference held in Atlanta, Georgia Wednesday November 29th to Friday, December 1st and includes both workshops and conference lectures. It took place at the Global Learning Center on the campus of Georgia Tech.  This was the first year of this conference, and I attended to get a sense of the data science scene in Atlanta.  Overall, the experience was very enlightening and introduced me to the dynamic and intensive work being conducted in the area of data science.

IMG_1786

Keynote speaker Rob High, CTO of IBM Watson, discussing IBM Watson and Artificial Intelligence (DataSciCon.Tech 2017).

DataSciCon.Tech Workshops

Four workshop tracks were held Wednesday including Introduction to Machine Learning with Python and TensorFlow, Tableau Hands-on Workshop, Data Science for Discover, Innovation and Value Creation and Data Science with R Workshop.  I elected to attend the Machine Learning with Python with TensorFlow track.  TensorFlow is an open source software library for numerical computations using data flow graphs for Machine Learning.

To prepare for the conference, I installed the TensorFlow module downloaded from https://www.tensorflow.org/install.  In addition to TensorFlow, I downloaded Anaconda (https://www.anaconda.com/), a great Python development environment for those practicing data science programming and includes many of the Python data science packages such as Numpy and SciKit-Learn.

Among the predictive and classification modeling techniques discussed in the workshop:

  • Neural Networks
  • Naive Bayes
  • Linear Regression
  • k -nearest neighbor (kNN)  analysis

These modeling techniques are popular for classifying data and predictive analysis.    Few training sessions on Python, SciKit-Learn or Numpy go into these algorithms in detail due to the various math educational levels of the audience members.  For the course, we used Jupyter Notebook, a web-based python development environment which allows you to share and present your code and results using web services.  Jupyter Notebook can also be hosted in Microsoft Azure, as well as, in other cloud platforms such as Anaconda Cloud and AWS.  To host Python Jupyter Notebook in Azure sign into  https://notebooks.azure.com.

TensorFlow

TensorFlow has a series of functions that uses neural networks and machine learning to test, train and score models.  The advantage of TensorFlow is its ability to train models faster than other modules, which is a very big advantage since splitting data for training models is a process intensive operation. It is particularly powerful on the Graphics Processing Unit (GPU) architecture popular for Machine Learning and Deep Learning.

Download Tensorflow from http://tensorflow.org.  The website also includes a Neural Network Tensorflow sandlot at http://playground.tensorflow.org.

2017-11-29_16-11-32

source:  http://playground.tensorflow.org.  tensorflow.org (DataSciCon.Tech)

DataSciCon.Tech Sessions

I’m going to break down the sessions I attended into the main topics that were covered.  So this is a very high level, one hundred foot point-of-view of the topics covered at the conference.  My plan is to create a few more blogs on the topic that will go into my work as an aspiring data scientist/data architect.  All the information in this blog is based on information presented at the DataSciCon.Tech 2017 conference.

Machine Learning and Artificial Intelligence

The conference emphasized Artificial Intelligence and Machine Learning pretty heavily.  Artificial Intelligence was discussed more in theory and direct applications than design and development.  There were a few demonstrations of the popular IBM Watson Artificial Intelligence system; but I want to focus this blog primarily on Machine Learning, as it’s something that interests me and other data architects.  Artificial Intelligence and Machine Learning are both based on computerized learning algorithms.  Machine Learning uses past data to learn, predict events or identify anomalies.

Another key fact presented at the conference is the number of open source projects and companies that have produced software modules, libraries and packages devoted to the use and implementation of Machine Learning in business applications.  I strongly recommend anyone interested in learning more to research the software solutions discussed in this blog and how they can be implemented.

For those who are new to the concept of Machine Learning (like me), essentially it is defined as follows:

Machine Learning is a subset of Artificial Intelligence that focuses on creating models that learn and predict events based on past data without a human computer programmer having to change code to adapt to new events.  An example would be a spam filter learning new exploits and then blocking those exploits.

2017-12-02_8-17-02 Continue reading