Skip to content
Snippets Groups Projects
Commit 19a2e9f4 authored by Grace Copplestone's avatar Grace Copplestone
Browse files

datasheet cross checking

parent c1ee211e
No related branches found
No related tags found
No related merge requests found
Pipeline #
No preview for this file type
rf/m0_rfm95_lora/feather_lora_scope.PNG

6.14 KiB

rf/m0_rfm95_lora/images/data_sheet_timing.jpg

57.6 KiB

rf/m0_rfm95_lora/images/feather_lora_scope.jpg

11.6 KiB

rf/m0_rfm95_lora/images/paramp.jpg

35.4 KiB

rf/m0_rfm95_lora/images/ts_hop.jpg

28.2 KiB

rf/m0_rfm95_lora/images/ts_re.jpg

80.3 KiB

rf/m0_rfm95_lora/images/ts_tr.jpg

35.3 KiB

<html>
<head>
<title>Radio Ring Oscillator</title>
<link rel="stylesheet" href="https://copplestone.pages.cba.mit.edu/styling/stylesheet.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.1.10/require.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script>
<script src="../assets/jquery.js"></script>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']]}});
</script>
<script type="text/javascript" async
src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML">
</script>
<style>
pre code {
background-color: #eee;
......@@ -8,13 +21,13 @@ pre code {
padding: 20px;
}
figure{
text-align: center
text-align: center;
}
</style>
</style>
</head>
<body>
<body id="main">
<h1>Adafruit Feather M0 Radio with LoRa Radio Module 900MHz</h1>
......@@ -28,18 +41,43 @@ figure{
<p>I used <a href="https://learn.adafruit.com/adafruit-feather-m0-radio-with-lora-radio-module/using-the-rfm-9x-radio">Adafruit's documentation</a> to get the oscillator running using the Arduino IDE.</p>
<figure>
<img src='feather_lora_setup.jpg' width=40%>
<img src='images/feather_lora_setup.jpg' width=30%>
<figcaption>Feather M0 LoRa setup</figcaption>
</figure>
<p>Code is included below. The oscilloscope output was generated by pulling a GPIO pin high while the radio sent a message and waited to verify delivery of the message. The round trip time was 127ms which equates to a frequency of 7.9Hz. This is pretty long in comparison to other modules that we've been testing however the real benefit of the LoRa Radio Module is it's capability over long ranges.</p>
<p>Code is included below. The oscilloscope output was generated by pulling a GPIO pin high while the radio sent a message and waited to verify delivery of the message. The round trip time was 127ms which equates to a frequency of 7.9Hz. This is pretty long in comparison to other modules that we've been testing however the real benefit of the LoRa Radio Module is it's capability over long ranges. Code for this measurement is included below.</p>
<figure>
<img src='images/feather_lora_scope.jpg' width=40%>
<figcaption>Feather M0 LoRa oscillscope output</figcaption>
</figure>
<p>The <a href="http://www.hoperf.com/upload/rf/RFM95_96_97_98W.pdf">data sheet for the RFM95</a> has data which can be used to determine what the minimum round trip could be. Total time for a round trip could theoretically be <b>2*TS_HOP + TS_RE + TS_TR</b> where <b>TS_TR = 5us + 1.25*PaRamp + 0.5*TBit</b>. These quantities are described below.</p>
<figure>
<img src='feather_lora_scope.png' width=60%>
<figcaption>Feather M0 LoRa ring oscillator results</figcaption>
<img src='images/data_sheet_timing.jpg' width=40%>
<img src='images/ts_re.jpg' width=40%>
<img src='images/ts_hop.jpg' width=40%>
<img src='images/ts_tr.jpg' width=40%>
<img src='images/paramp.jpg' width=40%>
<figcaption>Timing information from datasheet</figcaption>
</figure>
<p>The code below is used on both modules with two lines changed to enable the ring to start. The variable counter should be adjusted as described in the comment and the starting sequence should be uncommented, again as described in the comment in the code.</p>
<ul>
<li>TS_HOP - ~50us - frequency synthesizer hop time</li>
<li>TS_RE - ~2ms - receiver startup time, reduces as the receiver bandwidth increases</li>
<li>TS_TR - ~250us - transmitter startup time</li>
<li>PaRamp - 40us - ramp up time used to control modulation shaping to improve narrow band response of the transmitter, 40us is the default value</li>
<li>TBit - ~200us - bit time, the default bit rate is 4.8 kb/s</li>
<li><b>Total round trip time = ~2.5ms</b></li>
</ul>
<p>A potential round trip time of 2.5ms is vastly shorter than the 127ms measured in the experiment. The next step to minimise the apparent round trip time would be to pull out the functions being called from the various Arduino libraries into a single program, this would help to gain more transparency for the code that's actually being compiled and run. (To do this <code>grep "FuntionName" *.*</code> is useful command for searching through multiple files from the command line). However the most exciting feature of these chips are there capability over long distances. Therefore the next step is to determine a test setup to quantify this capability.</p>
<p>The code below is used on both modules with two lines changed to enable the ring to start. The counter variable should be adjusted as described in the comment and the starting sequence should be uncommented, again as described in the comment in the code.</p>
<pre>
<code>
......@@ -49,11 +87,7 @@ figure{
#define RFM95_CS 8
#define RFM95_RST 4
#define RFM95_INT 3
// Change to 434.0 or other frequency, must match RX's freq!
#define RF95_FREQ 915.0
#define FIRE 12
// Singleton instance of the radio driver
......@@ -134,8 +168,6 @@ void loop(){
}
}
}
}
</code>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment