December 8, 2020

Pcomp8 - Eagle, Arduino nano 33, Introductory Machine Learning

In this week, learn how to draw circuit diagrams through CAD and try out the many sensor functions of nano 33, and some introductory machine learning principles and practices…


EAGLE is a scriptable electronic design automation (EDA) application with schematic capture, printed circuit board (PCB) layout, auto-router and computer-aided manufacturing (CAM) features. Engineers communicate through electronic documents and deliver them to the factory for manufacturing and production.


1.Eagle

Learn Eagle to draw simple circuit diagrams.


Eagle Schematic Layout


Eagle Board Layout


2.Arduino nano 33

The Arduino Nano 33 IoT is the easiest and cheapest point of entry to enhance existing devices (and creating new ones) to be part of the IoT and designing pico-network applications. I will test several nano sensors in the video below.


Nano senses gesture movement to control different lights.

Control the different LEDs by the direction of my palm movement.


Nano senses left and right directions.


Nano senses the touch and returns the value.


Nano senses the spatial position and draws a polyline.


3.Introducing Advanced Mode - Machine Learning

Voice data will be collected through mobile phones, and recognition capabilities will be obtained after model learning.


First, collect audio data fragments through the device. This is also the data set we used for training. Because it is an introduction, we simply sampled several sets of data.



Then we need to design an impulse, set the calculation method and parameter values.



Next, configure the MFCC block, it will visualize our data and show noise.



After processing the data for the first time, we need configure the neural network. During the training process, the internal state of the neuron will be gradually adjusted and perfected so that the network converts its input in the correct way to produce the correct output. This is done by inputting training data samples, checking the distance between the network output and the correct answer, and adjusting the internal state of the neuron to make it more likely to produce the correct answer next time. After completing thousands of times, a well-trained network will be formed.


We will get an classification result.



Finally, we will get a test data set to help us judge the accuracy of speech recognition.

Testing the model helps confirm whether it works in real life, and this should be done after every change. However, if you frequently adjust your model to try to improve its performance on the test data set, your model may gradually begin to overfit the test data set and lose its value as a metric. To avoid this situation, keep adding new data to the test data set.


About this Post

This post is written by Siqi Shu, licensed under CC BY-NC 4.0.