You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+5-50Lines changed: 5 additions & 50 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,7 +24,7 @@ This is an optimized **blink** example which was created at the start of the lab
24
24
25
25
### 1.3 - code/SLSTK3400A_ADXL362
26
26
27
-
This is the main code developed for the project for the lab sessions. This is where most of the rest of this *readme* is about.
27
+
This is the main code developed for the project for the lab sessions. This is where the rest of this *readme* is about. This code is also talked about in more detail in [this report](doc/reports/EmbeddedDesign1-Labo-project-BrechtVanEeckhoudt-ChrisThoen.pdf) (Dutch).
28
28
29
29
------
30
30
@@ -122,41 +122,15 @@ The following two figures are output examples in the UART console. The first one
122
122
123
123
------
124
124
125
-
## 3 - Development problems
125
+
## 3 - Future
126
126
127
-
Along the way there were some hiccups in the code-development. The main problem we first faced is discussed in short below.
128
-
129
-
We first left `automatic ChipSelect` in the `USART config` enabled. After getting no response from the accelerometer we observed the `SPI` bus with a logic analyser. Below we see the incorrect behaviour, normally the accelerometer should perform a **soft reset**.
**As seen above, the ChipSelect pin goes low for each byte. This is not the correct behaviour, since it needs to stay low for three bytes** (`register address`- `read/write` - `value to read/write`).
134
-
135
-
<br/>
136
-
137
-
After manually setting the CS pin high and low we got the correct behaviour, as depicted below.
The same behaviour was observed when we tried to *read a register*. The first picture below is the incorrect behaviour, afterwards we see the accelerometer responding correctly.
Right now data doesn't really get read in by the sensor, only the LED is turned on and the interrupt on the accelerometer is cleared if necessary. In the future this could change.
156
130
157
131
<br/>
158
132
159
-
### 4.2 - Wakeup-mode
133
+
### 3.2 - Wakeup-mode
160
134
161
135
The accelerometer can be put in a `wakeup-mode` where he only consumes about **270 nA** (@2.0V) and measures the acceleration *about six times per second* to determine whether motion is present or absent. If motion is detected, the accelerometer can respond autonomously in the following ways:
162
136
@@ -170,25 +144,6 @@ In wake-up mode, all accelerometer features are available with the exception of
170
144
171
145
<br/>
172
146
173
-
### 4.3 - FIFO and wave frequency
147
+
### 3.3 - FIFO and wave frequency
174
148
175
149
We can perhaps use the `FIFO` to store measurements at an optimal `ODR` (Output Data Rate) so the **wave frequency** can be calculated using *FFT* functionality available in `CMSIS` libraries. The accelerometer could fill this FIFO on it's own and signal to the microcontroller when it is filled by using an interrupt (there is still one pin unused). Then the microcontroller can read all these values at once and calculate the frequency, after which he again goes to sleep. *We also need to look into the amount of samples we need for this to work.*
176
-
177
-
------
178
-
179
-
## 5 - Current measurements
180
-
181
-
These are rough measurements (16-12-2018), the values were not read from the sensor, it was only put in measurement mode at the given ODR:
182
-
183
-
- ODR 12,5 HZ ~ 29,60 - 30,41 µA
184
-
- ODR 25 Hz ~ 28,43 µA (?)
185
-
- ODR 50 Hz ~ 30,88 µA
186
-
- ODR 100 Hz ~ 32,09 µA
187
-
- ODR 200 Hz ~ 33,77 µA
188
-
- ODR 400 Hz ~ 35,43 - 36 µA
189
-
190
-
**The microcontroller was manually reset each time using the button to get these "correct" values.**
191
-
192
-
<br/>
193
-
194
-
**More current measurements can be found at [doc/reports/current-measurements/](/doc/reports/current-measurements)**
0 commit comments