Fill out hardware tutorial

This commit is contained in:
Starbeamrainbowlabs 2019-08-05 16:28:32 +01:00
parent bb6aa23503
commit fafa2470e5

View file

@ -1,8 +1,18 @@
# Hardware
TODO: Fill this out with a tutorial
Constructing the hardware for the LoRaWAN Signal Mapper is a 2-step process:
## Parts list
1. Construct the circuit
2. 3d-print the box
## Prerequisites
You'll need a number of items ready and at hand before you start. A full parts list is given below. In addition, having the following items to hand would probably be helpful:
- A multimeter, to test the parts of the circuit are connected properly and functioning as intended should you run into difficulties
- 4 x AA Batteries, if you've used a battery box
### Parts list
- [RFM95 w/ breakout](https://onecall.farnell.com/seeed-studio/114990615/868mhz-dragino-lora-shield-for/dp/SC14518) (alternatively [this](https://shop.pimoroni.com/products/adafruit-rfm95w-lora-radio-transceiver-breakout?variant=19595325639))
- [GPS](https://www.hobbytronics.co.uk/ublox-gps-neo6m) (or [this](https://thepihut.com/products/gps-module-with-enclosure?variant=27741075537))
- [microSD breakout](https://www.hobbytronics.co.uk/microsd-card-regulated-v2)
@ -11,6 +21,34 @@ TODO: Fill this out with a tutorial
- [Arduino Uno](https://smile.amazon.co.uk/Elegoo-Board-ATmega328P-ATMEGA16U2-Arduino/dp/B01EWOE0UU/)
- [Breadboard](https://shop.pimoroni.com/products/solderless-breadboard-400-point)
- Jumper cables (e.g. [a](https://thepihut.com/products/adafruit-premium-female-male-extension-jumper-wires-20-x-3), [b](https://thepihut.com/products/adafruit-premium-male-male-jumper-wires-20-x-6-150mm), and [c](https://thepihut.com/products/adafruit-premium-female-female-jumper-wires-20-x-6-150mm))
- [Battery](https://smile.amazon.co.uk/Anker-PowerCore-Aluminum-Portable-Lipstick-Sized-Black/dp/B005QI1A8C/) - Size currently unknown - I'll need to run some tests to see how much power it uses to figure out the right battery size.
- Power supply:
- Either a [Battery](https://smile.amazon.co.uk/Anker-PowerCore-Aluminum-Portable-Lipstick-Sized-Black/dp/B005QI1A8C/) and a [breakout](https://shop.pimoroni.com/products/adafruit-usb-micro-b-breakout-board)
- ....or [a battery holder](https://shop.pimoroni.com/products/4-x-aa-battery-holder-with-on-off-switch) and a [regulator](https://www.aliexpress.com/item/32611355118.html?spm=a2g0o.productlist.0.0.723315eeT9I9b0&algo_pvid=03d2d682-5a95-4f1d-888e-d815944067cf&algo_expid=03d2d682-5a95-4f1d-888e-d815944067cf-1&btsid=3d180c0c-4a99-4d18-8d3d-afcacb991b44&ws_ab_test=searchweb0_0,searchweb201602_8,searchweb201603_53)
- [Project box](https://smile.amazon.co.uk/waterproof-plastic-Enclosure-Power-junction-Grey/dp/B01JHBHNMA/) - if we can't 3D print one
- [TPL-5111](https://www.adafruit.com/product/3573) - also available from Pimoroni
- [TPL-5110](https://www.adafruit.com/product/3435) - also available from Pimoroni
## Constructing the circuit
Constructing the circuit itself is best done with the aid of a diagram:
![](images/Circuit-Diagram.png)
The above assumes that you've got a battery box and a regulator. A few things to note:
- We power the whole thing directly on the 5V power rail. This is because of the TPL5110, which turns the device on and off automatically.
- Because of the TPL5110, we have a 'timed power rail' and an 'untimed power rail', along with a shared ground.
- Note that the GPS module is connected to the _untimed_ rail, as we really don't want to lose our GPS fix (as this would significantly delay us every time we take reading).
When you've constructed the circuit, insert the microSD card into the microSD card breakout board.
Also, make sure to turn the potentiometer on the TPL5110 most of the way to the left, to reduce the time between readings to ~1m30s. It may take a few goes to adjust this to the right value - I recommend doing this after programming and watching the time between the readings coming in.
**Note:** The TPL5110 only reads the potentiometer when it first starts up! When you turn the potentiometer, you _also_ need to remove and re-apply the power in order for it to recognise the change.
## 3d-printing the box
Once you've got the circuit built and tested, you'll want a box to put it in. Just such a box is available in this repository, as a pair of [OpenSCAD](https://www.openscad.org/) files in `iot/`:
- `Housing.scad`, containing the box itself
- `Lid.scad`, containing the lid
It's supplied in 2 parts, to make 3D printing easier. Yur 3D printer probably takes a .STL file though, so you'll need to [export them](https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/STL_Export) in the correct format for printing.