{"id":390,"date":"2018-02-28T12:27:44","date_gmt":"2018-02-28T12:27:44","guid":{"rendered":"https:\/\/www.nottsiot.co.uk\/?p=390"},"modified":"2018-03-02T09:42:30","modified_gmt":"2018-03-02T09:42:30","slug":"iot-hubs-raspberry-pi-circuit","status":"publish","type":"post","link":"https:\/\/www.pjgcreations.co.uk\/iot-hubs-raspberry-pi-circuit\/","title":{"rendered":"Azure IoT Hubs with Raspberry Pi and Node.js – Circuit"},"content":{"rendered":"\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t

Azure IoT Hubs with Raspberry Pi and Node.js - Circuit<\/h2>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t\t\t

This post will walk you through building the circuit necessary to follow along with the Azure IoT Hubs with Raspberry Pi and Node.js talk.<\/p>

You can find more information on the talk itself right here:<\/p>

Azure IoT Hubs with Raspberry Pi and Node.js<\/a><\/p>

The completed circuit is shown here;<\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t

\n\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"\"\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t

Parts Required<\/h2>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t\t\t\n\n\n\n\n\n\n\n\n\n
Part<\/b><\/td>\nQty<\/b><\/td>\n<\/tr>\n
Breadboard<\/b><\/td>\n1<\/td>\n<\/tr>\n
Red LED<\/b><\/td>\n1<\/td>\n<\/tr>\n
Green LED<\/b><\/td>\n1<\/td>\n<\/tr>\n
220<\/b>\u03a9<\/b> Resistor<\/b><\/td>\n2<\/td>\n<\/tr>\n
Push Button<\/b><\/td>\n1<\/td>\n<\/tr>\n
BME280<\/b><\/td>\n1<\/td>\n<\/tr>\n
Jumper Wires<\/b><\/td>\n11<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t

Building the Circuit...<\/h2>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t
\n\t
\n\n \"\"\n \n \n \n <\/div>\n
\n

#1 - Your Raspberry Pi<\/h2>\n

This is where we'll start, with the brain of the circuit.\n\nThe Raspberry pi will connect to all of the components we'll be using, controlling LED's and reading Buttons and Temperature Sensors.<\/p> <\/div>\n <\/div>\n\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t

\n\t\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t
\n\t
\n\n \"\"\n \n \n \n <\/div>\n
\n

#2 - Add a BreadBoard<\/h2>\n

The BreadBoard will allow us to connect all of the components together, making a circuit.<\/p> <\/div>\n <\/div>\n\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t

\n\t\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t
\n\t
\n\n \"\"\n \n \n \n <\/div>\n
\n

#3 - Add a Red LED<\/h2>\n

Connect a Red LED to the two far left adjacent pins as shown. \n\nInsert the shortest leg to the outside of the board.<\/p> <\/div>\n <\/div>\n\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t

\n\t\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t
\n\t
\n\n \"\"\n \n \n \n <\/div>\n
\n

#4 - Connect Red LED Ground<\/h2>\n

Add a Purple Wire from the Red LED short Leg to Pin 9 (Ground \/ 0v) \n\nThis is one side of the circuit to light the Red LED<\/p> <\/div>\n <\/div>\n\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t

\n\t\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t
\n\t
\n\n \"\"\n \n \n \n <\/div>\n
\n

#5 - Add a 220\u03a9 Resistor<\/h2>\n

Connect a resistor between the Red LED Long Leg hole and the adjacent hole.\n\nThis limits the current to the LED, preventing the Pi Pin from burning out.\n<\/p> <\/div>\n <\/div>\n\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t

\n\t\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t
\n\t
\n\n \"\"\n \n \n \n <\/div>\n
\n

#6 - Connect Red LED Control<\/h2>\n

Connect an Orange Wire to the hole on the empty side of the Red LED Resistor to Pin 10 (Wiring Pi Pin 16).\n\nThis is the control to turn our Red LED On and Off.\n<\/p> <\/div>\n <\/div>\n\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t

\n\t\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t
\n\t
\n\n \"\"\n \n \n \n <\/div>\n
\n

#7 - Add Green LED<\/h2>\n

Insert the Green LED with it\u2019s shortest leg to the outside of the breadboard.\n\nIt\u2019s the same column as the Red LED.\n\nInsert it\u2019s longest leg into the hole next to the Red LED Resistor.\n\n<\/p> <\/div>\n <\/div>\n\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t

\n\t\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t
\n\t
\n\n \"\"\n \n \n \n <\/div>\n
\n

#8 - Add another 220\u03a9 Resistor<\/h2>\n

Connect a resistor between the Green LED Long Leg hole and the adjacent hole.\n\nThis limits the current to the LED, preventing the Pi Pin from burning out.\n<\/p> <\/div>\n <\/div>\n\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t

\n\t\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t
\n\t
\n\n \"\"\n \n \n \n <\/div>\n
\n

#9 - Connect Green LED Control<\/h2>\n

Connect a Grey Wire to the hole on the empty side of the Green LED Resistor to Pin 11 (Wiring Pi Pin 0).\n\nThis is the Control to turn our Green LED On and Off.<\/p> <\/div>\n <\/div>\n\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t

\n\t\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t
\n\t
\n\n \"\"\n \n \n \n <\/div>\n
\n

#10 - Add a Button<\/h2>\n

Connect the Button between the two sides of the Breadboard.\n\nIt will only fit in one orientation!\n\n\nDon\u2019t force it!<\/p> <\/div>\n <\/div>\n\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t

\n\t\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t
\n\t
\n\n \"\"\n \n \n \n <\/div>\n
\n

#11 - Add Button Control<\/h2>\n

Connect a White Wire from the Right Hand Button Leg Hole to Pin 26 (Wiring Pi Pin 11).\n\nThis is one side of our Button Circuit, and how we\u2019re going to sense if the Button has been pressed.<\/p> <\/div>\n <\/div>\n\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t

\n\t\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t
\n\t
\n\n \"\"\n \n \n \n <\/div>\n
\n

#12 - Add Button Ground<\/h2>\n

Connect a Black wire from the Left Hand Button Leg Hole to Pin 25 (Ground \/ 0v).\n\nThis is the other side of our Button Circuit.<\/p> <\/div>\n <\/div>\n\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t

\n\t\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t

Optionally Add a BME 280<\/h1>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t\t\t

You can now add an optional BME 280 Temperature \/ Humidity Sensor.<\/p>

We don’t strictly need this, as the code can simulate one for demo purposes…<\/p>

But, if you have one… Then feel free to continue on!<\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t

\n\t\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t
\n\t
\n\n \"\"\n \n \n \n <\/div>\n
\n

#13 - Add the BME280<\/h2>\n

This is our Temperature \/ Humidity \/ Pressure Sensor.\n\nInsert the BME with the body overlapping the gap, and the pins in the bottom half of the breadboard.<\/p> <\/div>\n <\/div>\n\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t

\n\t\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t
\n\t
\n\n \"\"\n \n \n \n <\/div>\n
\n

#14 - Add BME280 Power<\/h2>\n

Connect a Red Wire from the left most BME280 Pin Hole to Pin 1 (3v).\n\nThis supplies the power for the Sensor.<\/p> <\/div>\n <\/div>\n\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t

\n\t\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t
\n\t
\n\n \"\"\n \n \n \n <\/div>\n
\n

#15 - Add BME280 Ground<\/h2>\n

Connect a Brown Wire from the Pin Hole to the right of the Red Wire to Pin 6 (Ground \/ 0V).\n\nThis is our 0v and part of the power to the BME280.<\/p> <\/div>\n <\/div>\n\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t

\n\t\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t
\n\t
\n\n \"\"\n \n \n \n <\/div>\n
\n

#16 - Add BME280 Clock<\/h2>\n

Connect a Yellow Wire from the Pin Hole to the right of the Brown Wire to Pin 23 (Wiring Pin 14 \/ SCLK).\n\nThis is the clock for the SPI (Serial Peripheral Interface).<\/p> <\/div>\n <\/div>\n\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t

\n\t\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t
\n\t
\n\n \"\"\n \n \n \n <\/div>\n
\n

#17 - Add BME280 Serial In<\/h2>\n

Connect a Grey Wire from the Pin Hole to the right of the Yellow Wire to Pin 19 (Wiring Pi Pin 12 \/ MOSI).\n\nThis is the Serial Data from the BME280 to the Raspberry Pi.<\/p> <\/div>\n <\/div>\n\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t

\n\t\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t
\n\t
\n\n \"\"\n \n \n \n <\/div>\n
\n

#18 - Add BME Chip Enable<\/h2>\n

Connect a Green Wire from the Pin Hole to the right of the Grey Wire to Pin 24 (Wiring Pi Pin 10 \/ CE0).\n\nThis allows the Raspberry Pi to Enable the BME280 in case there are multiple SPI devices connected.<\/p> <\/div>\n <\/div>\n\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t

\n\t\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t
\n\t
\n\n \"\"\n \n \n \n <\/div>\n
\n

#19 - Add BME280 Serial Out<\/h2>\n

Connect a Blue Wire from the far right Pin Hole to the right of the Yellow Wire to Pin 21 (Wiring Pi Pin 13 \/ MISO).\n\nThis is the Serial Data from the Raspberry Pi to the BME280.<\/p> <\/div>\n <\/div>\n\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t

\n\t\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t

Your Circuit is Now Complete!<\/h1>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t\t\t

You can now go ahead and setup your Raspberry Pi in the next Post<\/a><\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"

Azure IoT Hubs with Raspberry Pi and Node.js – Circuit This post will walk you through building the circuit necessary to follow along with the Azure IoT Hubs with Raspberry Pi and Node.js talk. You can find more information on the talk itself right here: Azure IoT Hubs with Raspberry Pi and Node.js The completed […]<\/p>\n","protected":false},"author":2,"featured_media":4314,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[152,185,9,135,151,93,184,142,85],"tags":[],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/www.pjgcreations.co.uk\/wp-json\/wp\/v2\/posts\/390"}],"collection":[{"href":"https:\/\/www.pjgcreations.co.uk\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.pjgcreations.co.uk\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.pjgcreations.co.uk\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.pjgcreations.co.uk\/wp-json\/wp\/v2\/comments?post=390"}],"version-history":[{"count":0,"href":"https:\/\/www.pjgcreations.co.uk\/wp-json\/wp\/v2\/posts\/390\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.pjgcreations.co.uk\/wp-json\/wp\/v2\/media\/4314"}],"wp:attachment":[{"href":"https:\/\/www.pjgcreations.co.uk\/wp-json\/wp\/v2\/media?parent=390"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.pjgcreations.co.uk\/wp-json\/wp\/v2\/categories?post=390"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.pjgcreations.co.uk\/wp-json\/wp\/v2\/tags?post=390"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}