Skip to content

Commit a649e84

Browse files
authored
Update README.md
1 parent d3b6459 commit a649e84

File tree

1 file changed

+5
-50
lines changed

1 file changed

+5
-50
lines changed

README.md

Lines changed: 5 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ This is an optimized **blink** example which was created at the start of the lab
2424

2525
### 1.3 - code/SLSTK3400A_ADXL362
2626

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).
2828

2929
------
3030

@@ -122,41 +122,15 @@ The following two figures are output examples in the UART console. The first one
122122

123123
------
124124

125-
## 3 - Development problems
125+
## 3 - Future
126126

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**.
130-
131-
![Auto CS = true](/doc/reports/figures/ADXL-reset-autoCStrue.png?raw=true "Auto CS = true")
132-
133-
**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.
138-
139-
![Auto CS = false](/doc/reports/figures/ADXL-reset-autoCSfalse-CSPD4.png?raw=true "Auto CS = false")
140-
141-
<br/>
142-
143-
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.
144-
145-
![Auto CS = true](/doc/reports/figures/ADXL-read-autoCStrue.png?raw=true "Auto CS = true")
146-
147-
![Auto CS = false](/doc/reports/figures/ADXL-read-autoCSfalse-CSPD4.png?raw=true "Auto CS = false")
148-
149-
------
150-
151-
## 4 - Future
152-
153-
### 4.1 - Process the data
127+
### 3.1 - Process the data
154128

155129
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.
156130

157131
<br/>
158132

159-
### 4.2 - Wakeup-mode
133+
### 3.2 - Wakeup-mode
160134

161135
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:
162136

@@ -170,25 +144,6 @@ In wake-up mode, all accelerometer features are available with the exception of
170144

171145
<br/>
172146

173-
### 4.3 - FIFO and wave frequency
147+
### 3.3 - FIFO and wave frequency
174148

175149
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

Comments
 (0)