As a motorcycle rider, it tends to tick me off when I park my bike outside and it suddenly starts raining and wished I could’ve moved it in a covered parking space or garage on time. I’m sure no rider wants to see their beloved motorcycle gets soaked in the rain.
What if you can embed a sensor in your motorcycle to notify you via a text message when it starts raining? This way, you can decide to move your motorcycle into a covered parking space before it gets really soaked.
In this series, we will build an IoT device that we can embed in any type of motorcycle. In this first post, I will discuss the components that you need to get started.
What You’ll Need
To start working on your own IoT project, you will need the following components.
The one that I have is from Sunfounder. You will only need the raindrop sensor but this product consists of assortment of other sensors that you can play with or use for future projects. It also comes with an Arduino Uno R3 board for prototyping and instruction booklet or you can go to Sunfounder website for online instructions.
There are many DIY microcontrollers out there. Raspberry PI, NodeMCU, Teensy and Arduino to name a few. Please note that I am using the term microcontroller here but it is not exactly correct. For the sake of simplicity, let’s call them as such for now. I will also sometimes refer to them as “boards”. For this project, I am using Arduino. More likely, this is probably what I will be using for other future projects as well. If you are not familiar with Arduino and would like to learn more; visit their website at https://www.arduino.cc/ . I will also post a quick tutorial article on how to get started with Arduino soon.
Arduino MKR GSM 1400 is what I am using specifically for this project because it has a builtin GSM capability. The link below does not come with a DIPOLE antenna but you should buy one as well to avoid any issues.
If you check the Arduino MKR GSM 1400 documentation, there is a warning about power supply for this microcontroller. Link
During cellular transmissions, the peak current required by the board will exceed 500mA. This is in excess of what can be sourced by a standard USB port, so it is MANDATORY to have a 1500 mAh or higher LiPo battery plugged all the time, the current provided by the USB port will be supplemented by the battery. When powering the board using Vin, a 5V power supply that can supply at least 2A is required.
I recommend getting the Adafruit 328 Battery, Lithium Ion Polymer, 3.7V, 2500mAh, 2" x 2.55" x 0.30" Size. Having a current of 2500mAh should meet the requirements for this board.
Micro USB Cable
You will need a micro USB cable to connection your board to your computer in order for you to upload the code into the board. Amazon has some pretty cheap usb cable
You need a charger for your Lithium Ion battery. I found one from Adafruit which has a load connection that will eliminate the need to disconnect the battery from the device. It also has support for a 10K thermistor if you want to monitor the temperature.
USB Mini-B for Lithium Ion Battery Charger
Unfortunately, the charger is not compatible with Micro-B USB so you will need to buy a different USB cable. They are about $4 at Amazon.
IoT Sim Card
You need a sim card for your MKR GSM 1400 for communication. There are plenty IoT sim card providers out there and Arduino just recently released their own version. For this project, I am using Hologram which I am not going to dive in too deep in this article since it has a lot of features that I will talk about in a separate article. For now, just note that the first sim card you activate comes with free 100 MB data. It may sound little but sending a text message only takes about 2 to 3 KB. So this should be enough for prototyping and testing your IoT device.
I covered all of the components that you will need for this project. Go ahead and get them all and tune in for Part 2 of our Rain Sensor project series.