Difference: MagicWandOld (1 vs. 12)

Revision 122022-06-25 - UliRaich

Line: 1 to 1
 
META TOPICPARENT name="TinyML"

The Magic Wand Example

Introduction

Line: 6 to 6
 The magic wand example shows how to detect gestures using an accelerometer. Different types of accelerometers are easily available:
Changed:
<
<
  • The MPU9250 is very similar to he MPU6050 but has a magnetometer in addition. Here is its data sheet and the register map. The MPU92/66 has the necessary pins to be accessed either through I2C or SPI.
    mpu9250.png
>
>
  • The MPU9250 is very similar to he MPU6050 but has a magnetometer in addition. Here is its data sheet and the register map. The MPU9250/6500 has the necessary pins to be accessed either through I2C or SPI.
    Attention: I bought an "MPU9250" board marked MPU92.65 with a chip marked MP92. This chip is either only a MPU6500 or it is faulty. It is probably a fake. I never managed to access the AK8963 magnetometer, which is part of a real MPU9250.
    mpu9250.png
 The MPU6050 and the MPU9250 gave hardware offset registers which allow calibrating the device. When the device is horizontally mounted and stationary (not moving) we expect the values:
  • 0,0,1g for the measured acceleration in x, y and z, z pointing in the direction of gravity.
  • and 0,0,0 for the gyroscope

Revision 112022-06-08 - UliRaich

Line: 1 to 1
 
META TOPICPARENT name="TinyML"

The Magic Wand Example

Introduction

Line: 7 to 7
 
Added:
>
>
The MPU6050 and the MPU9250 gave hardware offset registers which allow calibrating the device. When the device is horizontally mounted and stationary (not moving) we expect the values:
  • 0,0,1g for the measured acceleration in x, y and z, z pointing in the direction of gravity.
  • and 0,0,0 for the gyroscope
The measured values may however differ. Setting the hardware offsets for acceleration and gyroscope permit to correct for the offset. The application note;
http://www.digikey.com/en/pdf/i/invensense/mpu-hardware-offset-registers describes these registers.
 
  • The LIS2DH MEMS digital output motion sensor from ST Microelectronics is an ultra low power high performance 3 axis accelerometer.
lis3dh.png

Hardware

Revision 102022-06-06 - UliRaich

Line: 1 to 1
 
META TOPICPARENT name="TinyML"

The Magic Wand Example

Introduction

Line: 6 to 6
 The magic wand example shows how to detect gestures using an accelerometer. Different types of accelerometers are easily available:
Changed:
<
<
  • The MPU9250 is very similar to he MOU6050 but has a magnetometer in addition. The MPU92/66 has the necessary pins to be accessed either through I2C or SPI.
    mpu9250.png
>
>
  • The MPU9250 is very similar to he MPU6050 but has a magnetometer in addition. Here is its data sheet and the register map. The MPU92/66 has the necessary pins to be accessed either through I2C or SPI.
    mpu9250.png
 
  • The LIS2DH MEMS digital output motion sensor from ST Microelectronics is an ultra low power high performance 3 axis accelerometer.
lis3dh.png

Hardware

Revision 92022-05-19 - UliRaich

Line: 1 to 1
 
META TOPICPARENT name="TinyML"

The Magic Wand Example

Introduction

The magic wand example shows how to detect gestures using an accelerometer. Different types of accelerometers are easily available:

Changed:
<
<
>
>
 
  • The LIS2DH MEMS digital output motion sensor from ST Microelectronics is an ultra low power high performance 3 axis accelerometer.
lis3dh.png

Hardware

Line: 24 to 25
 
INT D0 26
XDA and XCL are foreseen to control an external I2C bus, These pins are currently not used. AD0 allows to modify the MPU6050 I2C address and is also not used.
Added:
>
>
The connections of the MPU92/63 are similar
MPU92/63 !WeMos GPIO I2C SPI
Vcc 5V      
GND GND      
SCL D5 GPIO 18 SCL SCK
SDA D7 GPIO 23 SDA MOSI
AD0 D6 GPIO 19 Alternate module address MISO
INT D1 GPIO22    
NCS D0     CS
FSYNC GND      

 The ADXL345 is connected as follows:
ADXL345 WeMos D1 bus GPIO
Vcc 5V  
Line: 61 to 74
 
META FILEATTACHMENT attachment="lis3dh.png" attr="" comment="" date="1644829697" name="lis3dh.png" path="lis3dh.png" size="182302" user="UliRaich" version="2"
META FILEATTACHMENT attachment="mpu6050.png" attr="" comment="" date="1643973693" name="mpu6050.png" path="mpu6050.png" size="163386" user="UliRaich" version="3"
META FILEATTACHMENT attachment="mpu6050assembly.png" attr="" comment="" date="1643973853" name="mpu6050assembly.png" path="mpu6050assembly.png" size="249044" user="UliRaich" version="2"
Added:
>
>
META FILEATTACHMENT attachment="mpu9250.png" attr="" comment="" date="1652989731" name="mpu9250.png" path="mpu9250.png" size="172394" user="UliRaich" version="1"

Revision 82022-03-22 - UliRaich

Line: 1 to 1
 
META TOPICPARENT name="TinyML"

The Magic Wand Example

Introduction

Line: 33 to 33
 
INT1 D6 19
INT2 D5 18
Changed:
<
<
While the MPU6050 and the ADXL345 use the I2C bus, I connected the LIS3DH to be used with the Serial Peripheral Interface (SPI) as follows:
>
>
While the MPU6050 and the ADXL345 use the I2C bus, I connected the LIS3DH to be used with the Serial Peripheral Interface (SPI) or I2C as follows:
 
LIS3DH SPI pins WeMos D1 bus GPIO
Vcc   3.3V  
GND   GND  
Line: 46 to 46
 
ADC1   D3 GPIO 16 on ESP32 WROOM, GPIO 25 on ESP32 WROVER-B model T7 V1.5
ADC2   D4 GPIO 17 on ESP32 WROOM, GPIO 27 on ESP32 WROVER-B model T7 V1.5
ADC3   D8 GPIO 5
Changed:
<
<
>
>
Remark: The LISDH breakout board has 3 SMD jumpers marked "0" on the photo above. These tie ADC channel zero and two to GND and channel one to Vcc. These jumpers must be removed if you want to use the ADC. The ADC however is of limited use as it only works in a range of ~ 800mV to 1.6V.
 

Providing a training data set

Changed:
<
<
In order to provide a training data set we must be able to record gestures. We must therefore provide a program that recognizes the start and the end of a gesture (movement and inactivity detection) and which records the accelerometer data of the gesture onto a file. Gesture detection is of course also needed to be able to feed the accelerometer data into the trained model, which will then recognize the gesture.
>
>
In order to provide a training data set, we must be able to record gestures. We must therefore provide a program that recognizes the start and the end of a gesture (movement and inactivity detection) and which records the accelerometer data of the gesture onto a file. Gesture detection is of course also needed to be able to feed the accelerometer data into the trained model, which will then recognize the gesture.
  -- Uli Raich - 2022-02-02

Revision 72022-03-16 - UliRaich

Line: 1 to 1
 
META TOPICPARENT name="TinyML"

The Magic Wand Example

Introduction

Line: 6 to 6
 The magic wand example shows how to detect gestures using an accelerometer. Different types of accelerometers are easily available:
Changed:
<
<
  • The LIS2dH MEMS digital output motion sensor from ST Microelectronics is an ultra low power high performance 3 axis accelerometer.
>
>
  • The LIS2DH MEMS digital output motion sensor from ST Microelectronics is an ultra low power high performance 3 axis accelerometer.
 lis3dh.png
Added:
>
>

Hardware

  I mounted the accelerometer onto a WeMos D1 prototype board. With the triple base and the CPU this makes up for a stable assembly that can easily be moved without cable contact problems.
Line: 32 to 33
 
INT1 D6 19
INT2 D5 18
Added:
>
>
While the MPU6050 and the ADXL345 use the I2C bus, I connected the LIS3DH to be used with the Serial Peripheral Interface (SPI) as follows:
LIS3DH SPI pins WeMos D1 bus GPIO
Vcc   3.3V  
GND   GND  
SCL SCK D5 GPIO 18
SDA MOSI D7 GPIO 23
SDO MISO D6 GPIO 19
CS CS D0 GPIO 26
INT1   D1 GPIO 22
INT2   D2 GPIO 21
ADC1   D3 GPIO 16 on ESP32 WROOM, GPIO 25 on ESP32 WROVER-B model T7 V1.5
ADC2   D4 GPIO 17 on ESP32 WROOM, GPIO 27 on ESP32 WROVER-B model T7 V1.5
ADC3   D8 GPIO 5
 

Providing a training data set

In order to provide a training data set we must be able to record gestures. We must therefore provide a program that recognizes the start and the end of a gesture (movement and inactivity detection) and which records the accelerometer data of the gesture onto a file. Gesture detection is of course also needed to be able to feed the accelerometer data into the trained model, which will then recognize the gesture.

Revision 62022-02-21 - UliRaich

Line: 1 to 1
 
META TOPICPARENT name="TinyML"

The Magic Wand Example

Introduction

The magic wand example shows how to detect gestures using an accelerometer. Different types of accelerometers are easily available:

Changed:
<
<
  • The ADXL345 is a tree axis digital accelerometer by Analog Devices
    adxl345.png
  • The MPU6050 is a six axis device (Gyro and Accelerometer) from Ivensense. It is described by it datasheet and the register description.
    mpu6050.png
>
>
 
  • The LIS2dH MEMS digital output motion sensor from ST Microelectronics is an ultra low power high performance 3 axis accelerometer.
lis3dh.png
Line: 34 to 34
 

Providing a training data set

Changed:
<
<
In order to provide a training data set we must be able to record gestures. Therefore a driver for the accelerometer is needed as well as a program that recognizes movement and writes the accelerometer data on a file.
>
>
In order to provide a training data set we must be able to record gestures. We must therefore provide a program that recognizes the start and the end of a gesture (movement and inactivity detection) and which records the accelerometer data of the gesture onto a file. Gesture detection is of course also needed to be able to feed the accelerometer data into the trained model, which will then recognize the gesture.
  -- Uli Raich - 2022-02-02

Revision 52022-02-14 - UliRaich

Line: 1 to 1
 
META TOPICPARENT name="TinyML"

The Magic Wand Example

Introduction

Line: 7 to 7
 
  • The ADXL345 is a tree axis digital accelerometer by Analog Devices
    adxl345.png
  • The MPU6050 is a six axis device (Gyro and Accelerometer) from Ivensense. It is described by it datasheet and the register description.
    mpu6050.png
  • The LIS2dH MEMS digital output motion sensor from ST Microelectronics is an ultra low power high performance 3 axis accelerometer.
Added:
>
>
lis3dh.png
 I mounted the accelerometer onto a WeMos D1 prototype board. With the triple base and the CPU this makes up for a stable assembly that can easily be moved without cable contact problems.

mpu6050assembly.png

Hardware connections

The MPU6050 is connected to the WeMos D1 bus as follows:

Changed:
<
<
MPU6050 !WeMos D1 bus GPIO
>
>
MPU6050 WeMos D1 bus GPIO
 
Vcc 5V  
GND GND  
SCL D1 22
SDA D2 21
INT D0 26
XDA and XCL are foreseen to control an external I2C bus, These pins are currently not used. AD0 allows to modify the MPU6050 I2C address and is also not used.
Added:
>
>
The ADXL345 is connected as follows:
ADXL345 WeMos D1 bus GPIO
Vcc 5V  
GND GND  
SCL D1 22
SDA D2 21
INT1 D6 19
INT2 D5 18
 

Providing a training data set

In order to provide a training data set we must be able to record gestures. Therefore a driver for the accelerometer is needed as well as a program that recognizes movement and writes the accelerometer data on a file.

Line: 31 to 43
 
<--/commentPlugin-->

META FILEATTACHMENT attachment="adxl345.png" attr="" comment="" date="1643972893" name="adxl345.png" path="adxl345.png" size="177514" user="UliRaich" version="1"
Changed:
<
<
META FILEATTACHMENT attachment="lis3dh.png" attr="" comment="" date="1643972893" name="lis3dh.png" path="lis3dh.png" size="182548" user="UliRaich" version="1"
>
>
META FILEATTACHMENT attachment="lis3dh.png" attr="" comment="" date="1644829697" name="lis3dh.png" path="lis3dh.png" size="182302" user="UliRaich" version="2"
 
META FILEATTACHMENT attachment="mpu6050.png" attr="" comment="" date="1643973693" name="mpu6050.png" path="mpu6050.png" size="163386" user="UliRaich" version="3"
META FILEATTACHMENT attachment="mpu6050assembly.png" attr="" comment="" date="1643973853" name="mpu6050assembly.png" path="mpu6050assembly.png" size="249044" user="UliRaich" version="2"

Revision 42022-02-07 - UliRaich

Line: 1 to 1
 
META TOPICPARENT name="TinyML"

The Magic Wand Example

Introduction

Line: 7 to 7
 
  • The ADXL345 is a tree axis digital accelerometer by Analog Devices
    adxl345.png
  • The MPU6050 is a six axis device (Gyro and Accelerometer) from Ivensense. It is described by it datasheet and the register description.
    mpu6050.png
  • The LIS2dH MEMS digital output motion sensor from ST Microelectronics is an ultra low power high performance 3 axis accelerometer.
Changed:
<
<
I mounted the accelerometer onto a WeMos D1 prototype board. With the triple base and the CPU this makes up for a stable assemble that can easily be moved with cable contact problems.
>
>
I mounted the accelerometer onto a WeMos D1 prototype board. With the triple base and the CPU this makes up for a stable assembly that can easily be moved without cable contact problems.
  mpu6050assembly.png
Added:
>
>

Hardware connections

The MPU6050 is connected to the WeMos D1 bus as follows:

MPU6050 !WeMos D1 bus GPIO
Vcc 5V  
GND GND  
SCL D1 22
SDA D2 21
INT D0 26
XDA and XCL are foreseen to control an external I2C bus, These pins are currently not used. AD0 allows to modify the MPU6050 I2C address and is also not used.
 

Providing a training data set

In order to provide a training data set we must be able to record gestures. Therefore a driver for the accelerometer is needed as well as a program that recognizes movement and writes the accelerometer data on a file.

Revision 32022-02-04 - UliRaich

Line: 1 to 1
 
META TOPICPARENT name="TinyML"

The Magic Wand Example

Introduction

The magic wand example shows how to detect gestures using an accelerometer. Different types of accelerometers are easily available:

Changed:
<
<
>
>
  • The ADXL345 is a tree axis digital accelerometer by Analog Devices
    adxl345.png
  • The MPU6050 is a six axis device (Gyro and Accelerometer) from Ivensense. It is described by it datasheet and the register description.
    mpu6050.png
  • The LIS2dH MEMS digital output motion sensor from ST Microelectronics is an ultra low power high performance 3 axis accelerometer.
I mounted the accelerometer onto a WeMos D1 prototype board. With the triple base and the CPU this makes up for a stable assemble that can easily be moved with cable contact problems.

mpu6050assembly.png

Providing a training data set

In order to provide a training data set we must be able to record gestures. Therefore a driver for the accelerometer is needed as well as a program that recognizes movement and writes the accelerometer data on a file.

 -- Uli Raich - 2022-02-02

Comments

<--/commentPlugin-->
Added:
>
>
META FILEATTACHMENT attachment="adxl345.png" attr="" comment="" date="1643972893" name="adxl345.png" path="adxl345.png" size="177514" user="UliRaich" version="1"
META FILEATTACHMENT attachment="lis3dh.png" attr="" comment="" date="1643972893" name="lis3dh.png" path="lis3dh.png" size="182548" user="UliRaich" version="1"
META FILEATTACHMENT attachment="mpu6050.png" attr="" comment="" date="1643973693" name="mpu6050.png" path="mpu6050.png" size="163386" user="UliRaich" version="3"
META FILEATTACHMENT attachment="mpu6050assembly.png" attr="" comment="" date="1643973853" name="mpu6050assembly.png" path="mpu6050assembly.png" size="249044" user="UliRaich" version="2"

Revision 22022-02-03 - UliRaich

Line: 1 to 1
 
META TOPICPARENT name="TinyML"

The Magic Wand Example

Introduction

Changed:
<
<
The magic wand example shows how to detect gestures using an accelerometer.

Article text.

>
>
The magic wand example shows how to detect gestures using an accelerometer. Different types of accelerometers are easily available:
 -- Uli Raich - 2022-02-02

Comments

Revision 12022-02-02 - UliRaich

Line: 1 to 1
Added:
>
>
META TOPICPARENT name="TinyML"

The Magic Wand Example

Introduction

The magic wand example shows how to detect gestures using an accelerometer.

Article text.

-- Uli Raich - 2022-02-02

Comments

<--/commentPlugin-->
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback