-
Notifications
You must be signed in to change notification settings - Fork 2
2. The micro controller & chips
The Arduino Due
Due to the real-time signal generation and processing requirements of our project, we needed a relatively fast microcontroller with which to control all of the peripheral components. For this we chose the Arduino Due which features a AT91SAM3X8E microcontroller. The AT91SAM3X8E supports the ARM Cortex-M3 instruction set and is clocked at 84Mhz. We chose this board not only because of the high clock speed but also because of its support for cached memory. This would prove particularly useful when writing voltage values to output the stimulation waveform. With this chip, we were able to achieve a voltage write latency of around 4µs. Additionally, the Arduino Due features a built-in DAC which helped to further improve its performance.

| Microcontroller | AT91SAM3X8E |
|---|---|
| Operating Voltage | 3.3V |
| Input Voltage (recommended) | 7-12V |
| Input Voltage (limits) | 6-16V |
| Digital I/O Pins | 54 (of which 12 provide PWM output) |
| Analog Input Pins | 12 |
| Analog Output Pins | 2 (DAC) |
| Total DC Output Current on all I/O lines | 130 mA |
| DC Current for 3.3V Pin | 800 mA |
| DC Current for 5V Pin | 800 mA |
| Flash Memory | 512 KB all available for the user applications |
| SRAM | 96 KB (two banks: 64KB and 32KB) |
| Clock Speed | 84 MHz |
The chip used (pictured below) is the Adafruit LSM9DS0 Accelerometer + Gyro + Magnetometer 9-DOF chip giving us the capability to truly orient ourselves in space. Inside it, there is a 3-axis accelerometer that measures the gravitational force on the chip and how fast it is accelerating in space. The 3-axis gyroscope measures how fast the chip is twisting and turning in the x, y, and z direction. Lastly, the 3-axis magnetometer, measures where the strongest magnetic force is coming from. While this last component may not be directly useful towards the final goal of the project, it may help us orient ourselves and determine which direction is 'North'.
Due to the different degrees of freedom, the chip has many pin-outs that help isolate certain sub-chips and use them more efficiently. Since electrical stimulation works under very small time constraints, it is important to only turn-off any subchips that are not being used at a specific time. The table below displays the pin-outs and their meaning:
| Name | Function |
|---|---|
| Vin | Accepts anywhere between 3.3V to 5V. There is a voltage regulator on the board that safely regulates the voltage down |
| 3V3 | This is simply the 3.3V output |
| GND | Ground Pin |
| Name | Function |
|---|---|
| SCL | I2C clock pin that connects to the Arduino's clock |
| 3V3 | I2C data pin that connects to the Arduino's I2C data line |
| DEN | This can be used to enable/disable the gyroscrope |
| INT 1/2 | Interrupts for the accelerometer and magnetometer subchip respectively |
| INT G | Interrupt for the gyroscrope subchip |
- The gyroscope can measure at ±245 dps, ±500 dps, and ±2000 dps
- The accelerometer can measure at ±2 m/s^2, ±4 m/s^2, ±6 m/s^2, ±8 m/s^2, and ±16 m/s^2
- The magnetometer can measure at ±2 gauss, ±4 gauss, ±8 gauss, and ±12 gauss
The Bluetooth chip used (shown below) is the HC-06 Bluetooth chip produced by Atomic Market. The chip uses Serial Port Protocol (SPP) to communicate with other devices, with the basis of this Bluetooth communication method being that it allows for wireless serial port communications. This model in particular can only function as a slave, which sets it apart from the HC-05 model.

| Name | Description |
|---|---|
| 5V | Voltage Input Pin |
| GND | Ground Pin |
| TX | Transmission Pin (Attaches to receiving pin of Due) |
| RX | Receiving Pin (Attaches to transmitting pin of Due) |
- Functions at the standard frequency of 2.4 GHz
- Low power usage, only needing 8 mA while transmitting or receiving
- Bit error rate is 0, given normal or optimal conditions