Slide 1

Slide 1 text

Tomáš Jukin @Inza Arduino and Neural Nets

Slide 2

Slide 2 text

No content

Slide 3

Slide 3 text

16 MHz

Slide 4

Slide 4 text

2 KB RAM 16 MHz

Slide 5

Slide 5 text

:-(

Slide 6

Slide 6 text

:’-(

Slide 7

Slide 7 text

No content

Slide 8

Slide 8 text

? ? ?

Slide 9

Slide 9 text

7 + 8 + 4 = 19!

Slide 10

Slide 10 text

7 + 8 + 4 = 19

Slide 11

Slide 11 text

7 + 8 + 4 = 19 Input Hidden Output

Slide 12

Slide 12 text

7 + 8 + 4 = 19 7 Segment Display to Binary

Slide 13

Slide 13 text

Tomáš Jukin @Inza www.juicymo.cz @JuicymoCZ

Slide 14

Slide 14 text

Tomáš Jukin @Inza academy.juicymo.cz @JuicymoAcademy

Slide 15

Slide 15 text

No content

Slide 16

Slide 16 text

Dendrite Nucleus Axon

Slide 17

Slide 17 text

Input Activation Function Output

Slide 18

Slide 18 text

Dendrite 2 Nucleus Axon Dendrite 1

Slide 19

Slide 19 text

Input 2 Activation Function Output Input 1

Slide 20

Slide 20 text

Input 2 Activation Function Output Input 1 0,2 0,8 0,43 0,18 0,37

Slide 21

Slide 21 text

No content

Slide 22

Slide 22 text

Input Hidden Output Feed Forward ANN

Slide 23

Slide 23 text

Input Hidden Output

Slide 24

Slide 24 text

Input Hidden Output Ultrasonic Sensor Gyroscope Wheel Encoder Left Motor Right Motor

Slide 25

Slide 25 text

Input Hidden Output Ultrasonic Sensor Gyroscope Wheel Encoder Left Motor Right Motor Flow

Slide 26

Slide 26 text

Input Hidden Output Ultrasonic Sensor Gyroscope Wheel Encoder Left Motor Right Motor 20º = 20/180 = 0,111…

Slide 27

Slide 27 text

Input Hidden Output Ultrasonic Sensor Gyroscope Wheel Encoder Left Motor Right Motor 20º = 20/180 = 0,111…

Slide 28

Slide 28 text

Input Hidden Output Ultrasonic Sensor Gyroscope Wheel Encoder Left Motor Right Motor 20º = 20/180 = 0,111…

Slide 29

Slide 29 text

Input Hidden Output Ultrasonic Sensor Gyroscope Wheel Encoder Left Motor Right Motor 20º = 20/180 = 0,111… 0,345 = 34% power

Slide 30

Slide 30 text

Input Hidden Output Ultrasonic Sensor Gyroscope Wheel Encoder Left Motor Right Motor 20º = 20/180 = 0,111… 0,345 = 34% power 0,4 = 40% power

Slide 31

Slide 31 text

Input Hidden Output Ultrasonic Sensor Gyroscope Wheel Encoder Left Motor Right Motor 20º = 20/180 = 0,111… 0,345 = 34% power 0,4 = 40% power 0,4 - 0,345 = 0,055

Slide 32

Slide 32 text

Input Hidden Output Ultrasonic Sensor Gyroscope Wheel Encoder Left Motor Right Motor 20º = 20/180 = 0,111… 0,345 = 34% power 0,4 = 40% power 0,4 - 0,345 = 0,055

Slide 33

Slide 33 text

Input Hidden Output Ultrasonic Sensor Gyroscope Wheel Encoder Left Motor Right Motor 20º = 20/180 = 0,111… 0,345 = 34% power 0,4 = 40% power 0,4 - 0,345 = 0,055 W11 = 0,14 W12 = 0,65 W14 = 0,42 W13 = 0,26 W21 = 0,21 W22 = 0,37 W24 = 0,19 W23 = 0,46

Slide 34

Slide 34 text

Ultrasonic Sensor Gyroscope Wheel Encoder Left Motor Right Motor 20º = 20/180 = 0,111… 0,345 = 34% power 0,4 = 40% power 0,4 - 0,345 = 0,055 W11 = 0,14 W12 = 0,65 W14 = 0,42 W13 = 0,26 W21 = 0,21 W22 = 0,37 W24 = 0,19 W23 = 0,46 Backpropagation

Slide 35

Slide 35 text

Ultrasonic Sensor Gyroscope Wheel Encoder Left Motor Right Motor 20º = 20/180 = 0,111… 0,345 = 34% power 0,4 = 40% power 0,4 - 0,345 = 0,055 W11 = 0,14 W12 = 0,65 W14 = 0,42 W13 = 0,26 W21 = 0,21 W22 = 0,37 W24 = 0,19 W23 = 0,46 Backpropagation

Slide 36

Slide 36 text

Ultrasonic Sensor Gyroscope Wheel Encoder Left Motor Right Motor 20º = 20/180 = 0,111… 0,345 = 34% power 0,4 = 40% power 0,4 - 0,345 = 0,055 W11 = 0,14 W12 = 0,65 W14 = 0,42 W13 = 0,26 W21 = 0,21 W22 = 0,37 W24 = 0,19 W23 = 0,46 Backpropagation

Slide 37

Slide 37 text

Ultrasonic Sensor Gyroscope Wheel Encoder Left Motor Right Motor 20º = 20/180 = 0,111… 0,345 = 34% power 0,4 = 40% power 0,4 - 0,345 = 0,055 W11 = 0,14 W12 = 0,65 W14 = 0,42 W13 = 0,26 W21 = 0,21 W22 = 0,37 W24 = 0,19 W23 = 0,46 Backpropagation

Slide 38

Slide 38 text

When to use ANNs? It can learn and detect patterns

Slide 39

Slide 39 text

When to use ANNs? But beware local optimum!

Slide 40

Slide 40 text

When to use ANNs? To much training is bad!

Slide 41

Slide 41 text

When to use ANNs? To much training is bad! To few training is bad too!

Slide 42

Slide 42 text

And what about hardware?

Slide 43

Slide 43 text

How ANN stores data? FF ANN needs just a two dimensional array

Slide 44

Slide 44 text

How ANN stores data? FF ANN needs just a Feed-Forward Artificial Neural Net

Slide 45

Slide 45 text

Nice! So I can run it everywhere then, can I?

Slide 46

Slide 46 text

No content

Slide 47

Slide 47 text

ANN on UNO? NOPE :-(

Slide 48

Slide 48 text

ANN on UNO? 2 KB RAM => 19 neurons effectively

Slide 49

Slide 49 text

ANN on UNO? Average ANN has >100 neurons

Slide 50

Slide 50 text

ANN on UNO? Interesting ANN has >2000 neurons

Slide 51

Slide 51 text

ANN on UNO? => No go on UNO …

Slide 52

Slide 52 text

No content

Slide 53

Slide 53 text

ANN on Raspi? Yop, that is a start…

Slide 54

Slide 54 text

ANN on Raspi? Yop, that is a start… and I2C or UART will connect it with UNO…

Slide 55

Slide 55 text

ANN on Raspi? Yop, that is a start… and I2C or UART will connect it with UNO… but BEWARE the VOLTAGE!

Slide 56

Slide 56 text

Case Study

Slide 57

Slide 57 text

#Probee Robot

Slide 58

Slide 58 text

#Probee Robot 3x UltraSonic Sensor (Forward / Backward / Turret) 4x DC Motor 1x Motor Controller (Left / Right) 1x Arduino UNO (= brain) 1x Bluetooth Module 1x 2x16 I2C LCD (= status display)

Slide 59

Slide 59 text

#Probee Robot UNO ANN Hours to learn movement…

Slide 60

Slide 60 text

#Probee Robot UNO ANN Hours to learn movement… 15 minutes battery

Slide 61

Slide 61 text

#Probee Robot UNO ANN Hours to learn movement… 15 minutes battery Needs better HW preparation … =>

Slide 62

Slide 62 text

Interested? Build or Implement start today! You can start right now… …with any language… …or on Arduino!

Slide 63

Slide 63 text

Inspiration http://goo.gl/sKTfsd Blog post about ANN on UNO http://goo.gl/cuIUiH ANN controlling robot in video

Slide 64

Slide 64 text

Questions?

Slide 65

Slide 65 text

Tomáš Jukin @Inza www.juicymo.cz @JuicymoCZ

Slide 66

Slide 66 text

Photo Credits All photos used are CC from Flickr !