YouTube2Text

IoT Viva Theory from Scratch | Complete Internet of Things in 42 Min | SPPU TE AI&DS 2024 Pattern — Transcript

by Pranav Malshikhare · 5,640 words · 971 segments · language en · Watch on YouTube

Full transcript

  1. 0:01Hello Pranav [music] and welcome to your
  2. 0:03complete internet of things viva
  3. 0:04revision. This video follows [music]
  4. 0:06your SPU syllabus for third year AI and
  5. 0:10data science 2024 [music]
  6. 0:11pattern course MDM331.
  7. 0:14We will cover every [music] theory
  8. 0:16topic, every sensor, all 12 lab
  9. 0:18assignments and the questions your
  10. 0:20[music] examiner is most likely to ask
  11. 0:22with crisp answers. Watch it once end to
  12. 0:25end with full attention and [music] you
  13. 0:27will walk into your orals confident.
  14. 0:29Let's begin.
  15. 0:32[music]
  16. 0:32Chapter one, the fundamentals of the
  17. 0:34internet of things.
  18. 0:37So what [music] exactly is IoT? Remember
  19. 0:40this one line definition for your Viva.
  20. 0:43The internet of things is a network
  21. 0:45[music] of physical objects fitted with
  22. 0:47sensors, software, and connectivity. So
  23. 0:49they can collect and [music] exchange
  24. 0:51data. These things sense their
  25. 0:54environment, communicate over a network,
  26. 0:56take decisions, and even [music] act
  27. 0:58with minimal human intervention. Each
  28. 1:01device has a unique identity [music]
  29. 1:03such as an IP address or a device ID, so
  30. 1:07it can be addressed on the network.
  31. 1:09Think of a smart electricity meter,
  32. 1:11[music] a fitness band, or a smart
  33. 1:13irrigation system that waters the field
  34. 1:16only when the soil is dry.
  35. 1:19Every IoT system is built from six
  36. 1:22[music] components. Learn them in order
  37. 1:24from the physical world to the user.
  38. 1:27First, sensors. [music]
  39. 1:28They measure physical quantities like
  40. 1:30temperature, light or gas and convert
  41. 1:32them into electrical signals. They are
  42. 1:34[music] the input side. Second,
  43. 1:37actuators. They do the opposite. They
  44. 1:39convert an electrical [music] signal
  45. 1:41into physical action like an LED
  46. 1:44glowing, a motor rotating or a [music]
  47. 1:46relay switching. Third, the processing
  48. 1:48unit such as Arduino Uno, Raspberry
  49. 1:51[music] Pi or ESP32 which reads sensors
  50. 1:55and runs our logic. [music] Fourth,
  51. 1:57connectivity, Wi-Fi, Bluetooth, low
  52. 2:00energy, Laura [music] or cellular
  53. 2:02networks carry the data. Fifth, the
  54. 2:04cloud or server where data [music] is
  55. 2:06stored and analyzed. And sixth, the
  56. 2:09application, a dashboard or mobile app
  57. 2:12where the [music] user finally sees the
  58. 2:14information and controls devices.
  59. 2:18A [music] very common Viva question.
  60. 2:20What is the difference between physical
  61. 2:22design and logical design of IoT?
  62. 2:26Physical [music] design talks about the
  63. 2:28actual things and the protocols they
  64. 2:30use. Logical design is an abstract view
  65. 2:33of functions [music] without going into
  66. 2:35hardware details. Physical design
  67. 2:37includes devices, [music]
  68. 2:39sensors, interfaces and protocols.
  69. 2:42Logical design includes [music]
  70. 2:43functional blocks, communication models
  71. 2:46and communication a PIS [music]
  72. 2:48like rest and websocket. For example, a
  73. 2:51Raspberry Pi with a DHT11 over Wi-Fi is
  74. 2:55a physical design. [music] The chain of
  75. 2:57device communication services management
  76. 3:00security [music] and application is the
  77. 3:02logical design. In short, physical
  78. 3:05design answers what is used. Logical
  79. 3:08design answers how [music] does it work?
  80. 3:11Why do we need the cloud in IoT? Because
  81. 3:14small devices have very [music] limited
  82. 3:17memory and processing power. The cloud
  83. 3:20gives almost unlimited storage for
  84. 3:22sensor data [music] that keeps coming 24
  85. 3:24by7. It provides scalable computing so
  86. 3:28we can run analytics [music] and machine
  87. 3:30learning on huge data sets. It gives
  88. 3:33remote access so a user can monitor the
  89. 3:36home or the factory from anywhere
  90. 3:38[music] in the world. It also handles
  91. 3:40device management overthe-air [music]
  92. 3:42firmware updates and rules that trigger
  93. 3:45alerts. Popular platforms are a [music]
  94. 3:48WSOT core, Microsoft Azure IoT hub and
  95. 3:52things speak for students.
  96. 3:55Always [music] be ready with a few
  97. 3:57applications and connect them to a
  98. 3:59sensor. Smart homes [music] with
  99. 4:01automatic lights, smart locks and energy
  100. 4:04monitoring. Smart agriculture where soil
  101. 4:07moisture sensors switch irrigation pumps
  102. 4:10automatically.
  103. 4:12Healthcare [music] with wearables and
  104. 4:13remote patient monitoring of heart rate
  105. 4:16and oxygen level. [music] Industrial IoT
  106. 4:20where vibration and temperature sensors
  107. 4:22predict [music] machine failure before
  108. 4:23it happens. This is called predictive
  109. 4:26maintenance.
  110. 4:27Smart [music] cities with smart parking,
  111. 4:29adaptive traffic signals and smart
  112. 4:31street lights and environmental
  113. 4:34monitoring [music] like air quality
  114. 4:36indexes and flood warning systems.
  115. 4:40[music]
  116. 4:41Chapter 2, IoT architecture.
  117. 4:45Let's start [music] with M2M which means
  118. 4:47machine to machine communication.
  119. 4:50M2M [music]
  120. 4:51is direct communication between two
  121. 4:53machines without any human involvement.
  122. 4:57It is usually pointto-point [music]
  123. 4:59often over a cellular or wired link. M2M
  124. 5:03solutions are generally proprietary and
  125. 5:05closed built for one specific purpose.
  126. 5:08Classic examples are in a [music] TM
  127. 5:11talking to the bank server or a vending
  128. 5:13machine reporting low stock to the
  129. 5:15supplier.
  130. 5:18Now [music] compare M2M with IoT. This
  131. 5:21table is a favorite of examiners.
  132. 5:23[music] Communication. M2M is
  133. 5:26pointtooint. IoT is many [music] to many
  134. 5:28over the internet using IP protocols.
  135. 5:32M2M [music] often uses proprietary nonIP
  136. 5:35protocols. IoT uses open IP based
  137. 5:39protocols like MQTT, co-op and [music]
  138. 5:41HTTP.
  139. 5:43Focus M2M focuses on hardware. [music]
  140. 5:46IoT focuses on software data and cloud
  141. 5:49analytics.
  142. 5:51Scale [music] M2M is limited. IoT is
  143. 5:54massive and scalable. Billions of
  144. 5:56devices [music] and data. In M2M, it
  145. 5:59stays local. In IoT, it goes to [music]
  146. 6:02the cloud. One line to remember, M2M is
  147. 6:05a subset of IoT.
  148. 6:08The simplified IoT [music] architecture
  149. 6:11is explained in layers. Three layer and
  150. 6:13five layer models are [music] both
  151. 6:15popular. Let's do the five layer one,
  152. 6:17which includes the three layer one. At
  153. 6:20the bottom [music] is the perception
  154. 6:22layer. the sensors and actuators that
  155. 6:24touch the physical world. [music] Above
  156. 6:26it, the network layer which transmits
  157. 6:28data using Wi-Fi, Laura, cellular
  158. 6:31networks and gateways. Then the
  159. 6:34processing or middleware layer where
  160. 6:36data [music] is stored and processed in
  161. 6:38the cloud at the edge and in databases.
  162. 6:41Then the application layer which
  163. 6:43delivers services to [music] the user
  164. 6:45like a smartarthome dashboard. And at
  165. 6:48the top the business layer which manages
  166. 6:50the whole system business models and
  167. 6:52decisions. For the three layer model
  168. 6:55simply say perception, [music] network
  169. 6:57and application.
  170. 6:59The IoT protocol stack maps protocols to
  171. 7:03[music] layers. Remember it from top to
  172. 7:05bottom. Application layer MQTT co-op
  173. 7:09HTTP [music]
  174. 7:10a MQP XMPPP and websocket.
  175. 7:14Transport [music] layer TCP and UDP.
  176. 7:17Security sits here too. TLS [music] runs
  177. 7:20over TCP and DTLS runs over UDP. [music]
  178. 7:25Network layer IP version 4 IP version 6
  179. 7:29low WPNEN and [music] RPL the routing
  180. 7:32protocol for low power networks. Link
  181. 7:35and physical layer [music] Wi-Fi
  182. 7:37Ethernet Bluetooth low energy ziggb on
  183. 7:40802.15.4 [music]
  184. 7:42Four, Lara and NB IoT.
  185. 7:47[music] Chapter 3, how IoT devices
  186. 7:49communicate.
  187. 7:51There are four communication models in
  188. 7:54[music] IoT. This is a guaranteed
  189. 7:56question. One, request response. The
  190. 7:59client sends a request. The server sends
  191. 8:01a response. [music] It is stateless.
  192. 8:04HTTP is the best example. Two, [music]
  193. 8:07publish subscribe. Publishers send data
  194. 8:09to a topic on a broker and the broker
  195. 8:11[music] forwards it to all subscribers
  196. 8:13of that topic. Publishers and
  197. 8:15subscribers do not know each other.
  198. 8:17[music] MQTT is the best example. Three,
  199. 8:21pushpull data producers push data into a
  200. 8:24queue and consumers pull data from
  201. 8:26[music] it. The queue acts as a buffer
  202. 8:28so producers and consumers can work at
  203. 8:30different speeds. Four, exclusive
  204. 8:32[music] pair. A full duplex birectional
  205. 8:35connection that stays open between
  206. 8:37client and server. [music] Web socket is
  207. 8:39the example.
  208. 8:42Next, the communication patterns [music]
  209. 8:44named by who talks to whom. Device to
  210. 8:48device, two devices communicate [music]
  211. 8:50directly, usually over short range
  212. 8:52protocols like Bluetooth or Ziggb, a
  213. 8:55smart bulb and a smart [music] switch,
  214. 8:57for example. Device to cloud. The device
  215. 9:00connects directly to a cloud service
  216. 9:02over Wi-Fi [music]
  217. 9:03or Ethernet like a smart thermostat
  218. 9:06sending readings to its cloud. [music]
  219. 9:08Device to gateway. Devices connect to a
  220. 9:11local gateway like a smartphone or a
  221. 9:13Raspberry [music] Pi hub which
  222. 9:15translates protocols and forwards data
  223. 9:17to the cloud. Useful when devices cannot
  224. 9:20[music] speak IP. Back-end data sharing.
  225. 9:23Data from one cloud is [music] shared
  226. 9:25with other cloud services or third
  227. 9:27parties through a PIS. So it can be
  228. 9:29combined and analyzed. [music]
  229. 9:33Chapter four, networks and connectivity
  230. 9:36protocols.
  231. 9:38The TCP IP model [music] has four
  232. 9:41layers. Application layer which gives
  233. 9:44services to the user like HTTP, MQTT and
  234. 9:48DNS.
  235. 9:49Transport [music] layer which gives end
  236. 9:51toend delivery between processes using
  237. 9:54port numbers [music] TCP and UDP live.
  238. 9:57here internet layer which handles
  239. 10:00logical addressing and routing [music]
  240. 10:02of packets that is IP and the network
  241. 10:05access layer which physically sends bits
  242. 10:08over Ethernet or Wi-Fi.
  243. 10:11TCP versus UDP. [music]
  244. 10:14TCP is connection oriented. It first
  245. 10:17sets up a connection with a three-way
  246. 10:19[music] handshake. SIN sin arc UDP is
  247. 10:23connectionless.
  248. 10:24TCP is reliable. It uses sequence
  249. 10:27numbers, acknowledgements [music] and
  250. 10:29retransmission. UDP gives no guarantee
  251. 10:32of delivery. Because of this, TCP is
  252. 10:35slower with more overhead while UDP is
  253. 10:38fast and lightweight. [music]
  254. 10:40In IoT, MQTT and HTTP run on TCP while
  255. 10:45co-op runs on UDP.
  256. 10:49Why does IoT need [music] IP version 6?
  257. 10:52Look at this table. IP version 4 uses
  258. 10:5532bit [music]
  259. 10:56addresses about 4.3 billion. That is not
  260. 10:59enough for billions of IoT [music]
  261. 11:01devices. IP version 6 uses 128 bit
  262. 11:05addresses [music] practically unlimited.
  263. 11:08IP version 4 is written in dotted
  264. 11:11decimal. IP version 6 is written in
  265. 11:13hexadimal separated by [music] colons.
  266. 11:16IP version 6 supports stateless address
  267. 11:19auto configuration so devices configure
  268. 11:22[music] themselves.
  269. 11:24IP6 security is optional in version 4
  270. 11:27and was [music] designed into version 6
  271. 11:30and version 6 removes the need for n so
  272. 11:33every device can have its own global
  273. 11:35address that is exactly what IoT needs.
  274. 11:40Six low W pan is an important topic. It
  275. 11:44stands [music] for IP version 6 over low
  276. 11:47power wireless personal area networks.
  277. 11:49[music]
  278. 11:50It allows IP version 6 packets to travel
  279. 11:53over it E82.15.4
  280. 11:57radios [music]
  281. 11:57whose frame size is only 127 bytes while
  282. 12:01[music] an IP version 6 packet can be
  283. 12:041280 bytes. So six low W pen adds an
  284. 12:08adaptation layer that compresses [music]
  285. 12:10the large IP version 6 header and
  286. 12:13fragments packets into smaller pieces.
  287. 12:16This gives [music] even tiny battery
  288. 12:18powered sensors a real IP address. It is
  289. 12:21used in the thread smarthome protocol.
  290. 12:25Communication protocols [music] are
  291. 12:27divided by range. RFID and NFC work at a
  292. 12:32few centimeters [music]
  293. 12:33used for identification and payments.
  294. 12:36Bluetooth low energy works up to [music]
  295. 12:39about 10 m for wearables. ZigGB works
  296. 12:42from 10 to 100 m in a mesh used for home
  297. 12:46automation.
  298. 12:47Wi-Fi [music] covers 50 to 100 meters
  299. 12:50with high data rate and long range low
  300. 12:54power wide area networks [music] called
  301. 12:56LPWN like Laura WAN and NBOT cover
  302. 13:00several kilometers with very [music] low
  303. 13:02power. Remember the trade-off longer
  304. 13:04range and lower power means lower data
  305. 13:06rate.
  306. 13:09RFID [music]
  307. 13:10radio frequency identification
  308. 13:12identifies objects using radio [music]
  309. 13:14waves without contact or line of sight.
  310. 13:18An RFID system [music] has three parts.
  311. 13:21The tag which is a chip with an antenna,
  312. 13:23the reader and [music] the host system
  313. 13:25with a database. Passive tags have no
  314. 13:28battery. They get energy from the
  315. 13:30reader's electromagnetic [music]
  316. 13:31field by induction and reply with their
  317. 13:34ID. Active tags have their own battery
  318. 13:37and can transmit over much longer
  319. 13:39distances [music] like vehicle tracking.
  320. 13:42Frequency bands are low frequency 125
  321. 13:45kohertz [music]
  322. 13:46high frequency 13.56 MHz which is what
  323. 13:50[music] our MFRC522
  324. 13:52uses and ultra high frequency [music]
  325. 13:55860 to 960 MGHertz.
  326. 13:59Laura [music] and Laura WAN. Students
  327. 14:01often confuse these two so be clear.
  328. 14:04Laura meaning long range is [music] the
  329. 14:06physical layer. It uses chirp spread
  330. 14:08spectrum modulation which makes signals
  331. 14:11robust over long [music] distances.
  332. 14:13Laura one is the protocol on top of it.
  333. 14:16It defines the [music] M a C layer and
  334. 14:18the network architecture. The topology
  335. 14:22is a star of stars. [music] Nodes talk
  336. 14:24the gateways and gateways forward to a
  337. 14:26network server over the internet. It
  338. 14:29reaches 2 [music] to 5 km in cities and
  339. 14:32over 15 in open areas and a sensor can
  340. 14:34run for years on a battery. [music] The
  341. 14:36trade-off is a very low data rate.
  342. 14:39Loroan devices have three classes.
  343. 14:41[music] Class A has the lowest power and
  344. 14:44listens only briefly after it transmits.
  345. 14:46Class B adds scheduled receive windows.
  346. 14:48[music] Class C listens almost all the
  347. 14:51time and uses the most power. In India,
  348. 14:54Laura uses the unlicensed [music]
  349. 14:56865 to 867 megahertz band.
  350. 15:02Now, cellular [music] IoT, which uses
  351. 15:04licensed mobile networks, NB IoT,
  352. 15:08narrowband IoT, [music] uses very little
  353. 15:10bandwidth, penetrates deep indoors, and
  354. 15:13uses very low power. Perfect for smart
  355. 15:16water and gas meters. LTEM [music]
  356. 15:19also called CATM M1 supports mobility
  357. 15:22and even voice. So it suits [music]
  358. 15:24vehicle trackers and wearables and 5G
  359. 15:27brings massive machine type
  360. 15:29communication supporting [music] up to a
  361. 15:31million devices per square kilometer.
  362. 15:34Wi-Fi defined by Ile E2.11 [music]
  363. 15:38has variants B, G, and N work at 2.4
  364. 15:42GHz. A C works at 5 GHz. [music]
  365. 15:45A X is Wi-Fi 6 which handles many
  366. 15:48devices efficiently. An 802.11H [music]
  367. 15:52called Wi-Fi hollow works below 1 GHz,
  368. 15:55[music] reaches about a kilometer and
  369. 15:57was designed specially for IoT.
  370. 16:01Your syllabus [music] also mentions a I
  371. 16:04enabled networking. It means using
  372. 16:06machine learning to [music] manage the
  373. 16:08network itself. A I can predict traffic
  374. 16:11patterns and allocate bandwidth
  375. 16:13dynamically. [music]
  376. 16:14It enables self-healing networks that
  377. 16:17detect faults and reroute automatically.
  378. 16:20It detects [music] intrusions and
  379. 16:21anomalies in network traffic, improving
  380. 16:24security. And it does energy [music]
  381. 16:26aware routing so battery powered nodes
  382. 16:29last longer.
  383. 16:32Chapter [music] 5, the hardware and how
  384. 16:35data is acquired.
  385. 16:37Let's look [music] at the two boards in
  386. 16:39your lab. First, the Arduino Uno.
  387. 16:42Arduino [music]
  388. 16:43Uno is a microcontroller board based on
  389. 16:46the AT mega 328P running at 16 MGHertz.
  390. 16:50[music] It has 14 digital input output
  391. 16:53pins, six of which support PWM and six
  392. 16:57analog input [music] pins, a 0 to a 5.
  393. 17:00Its analog to digital converter is 10
  394. 17:03bit. [music] So analog readings range
  395. 17:05from 0 to 1,023.
  396. 17:07It works at 5 Vs. It has 32 [music]
  397. 17:11kilobytes of flash and only 2 kilobytes
  398. 17:13of SRM and it runs no operating system.
  399. 17:16[music] It runs one program forever. It
  400. 17:19is programmed in C and C++ using the
  401. 17:22Arduino IDE. [music] Every sketch has
  402. 17:25two functions. Setup runs once and loop
  403. 17:28runs again and again.
  404. 17:31Next, the Raspberry [music] Pi.
  405. 17:33Raspberry Pi is a full single board
  406. 17:36computer with [music] a quad core RM
  407. 17:38processor running Raspberry Pi OS which
  408. 17:41is Linux. It has a [music] 40pin GPIO
  409. 17:44header. Very important. Its pins work at
  410. 17:473.3 [music] volts and are not 5V
  411. 17:50tolerant. Connecting 5 volts directly
  412. 17:53can damage the Pi. It has built-in
  413. 17:55[music] Wi-Fi, Bluetooth, Ethernet, USB
  414. 17:58and HDMI. So, it [music] is perfect as
  415. 18:01an IoT gateway or edge device. A classic
  416. 18:05[music] Viva trap. The Raspberry Pi has
  417. 18:07no built-in analog to digital converter.
  418. 18:10To read an [music] analog sensor like
  419. 18:11MQ2, we use an external ADC chip such as
  420. 18:15the MCP 3008 connected [music] over SPI.
  421. 18:20We program it in Python using libraries
  422. 18:22like [music] RPI.GPIO
  423. 18:25or GPIO.
  424. 18:28Arduino versus Raspberry Pi. [music]
  425. 18:31Expect this one. Arduino is a
  426. 18:34microcontroller. Raspberry Pi is a
  427. 18:36microprocessor based [music] single
  428. 18:38board computer. Arduino has no operating
  429. 18:42system. [music] Raspberry Pi runs Linux.
  430. 18:45Arduino works at 5V [music] logic.
  431. 18:47Raspberry Pi at 3.3 volts. Arduino has
  432. 18:52analog [music] inputs with a 10 bit ADC.
  433. 18:54Raspberry Pi has none. So Arduino is
  434. 18:58best for simple realtime control of
  435. 19:00sensors and actuators [music] while
  436. 19:02Raspberry Pi is best for edge computing,
  437. 19:04machine learning, cameras and
  438. 19:06networking. In many projects both are
  439. 19:08used together.
  440. 19:11Now the hardware interfaces in your
  441. 19:13syllabus [music]
  442. 19:14start with GPIO a DC and DSC. [music]
  443. 19:18GPIO generalpurpose input output is a
  444. 19:21pin you can program as input [music] to
  445. 19:23read a sensor or as output to drive an
  446. 19:26LED. It has only two states high and low
  447. 19:30[music] and a DC analog to digital
  448. 19:32converter converts a continuously
  449. 19:35varying voltage [music] into a digital
  450. 19:37number that the processor can
  451. 19:38understand. The resolution decides the
  452. 19:42number of levels and n bit [music] a DC
  453. 19:44gives 2 to the power n levels. Arduino's
  454. 19:4710 bit a DC [music] gives 1,024 levels.
  455. 19:51So each step is 5 volts divided by 1,024
  456. 19:56about 4.9 m volts. If [music] the
  457. 19:58reading is 512 the voltage is about 2.5
  458. 20:02volt. A DSC digital to [music] analog
  459. 20:05converter does the reverse. Arduino Uno
  460. 20:08has no true DSC. So it uses [music] PWM
  461. 20:11pulse width modulation to imitate an
  462. 20:14analog output like dimming and LED.
  463. 20:19The three serial protocols UR, SPI and I
  464. 20:23squared C [music] are very important.
  465. 20:25Learn this table well. Wires URes
  466. 20:28[music] two wires transmit and receive.
  467. 20:30SPI uses four M OSI MISO [music]
  468. 20:34the clock seck and slave select. I
  469. 20:37squared C uses only two. The data line
  470. 20:40SD [music] and the clock line Sccl
  471. 20:43clock UR is a synchronous. There is no
  472. 20:46clock wire. So both sides must agree on
  473. 20:48a B rate like 9,600. [music] SPI and I
  474. 20:52squared C are synchronous with a shared
  475. 20:54clock devices. U RT is pointtooint.
  476. 20:57[music]
  477. 20:58SPI has one master and many slaves each
  478. 21:01needing its own slave select line.
  479. 21:03[music] I squared C connects many
  480. 21:05devices on the same two wires using
  481. 21:08seven bit addresses. Speed [music] SPI
  482. 21:11is the fastest in megahertz. I squared C
  483. 21:14is medium 100 or 400 kilohertz. [music]
  484. 21:17UR is typically slow. Examples. The
  485. 21:21serial monitor uses UR. [music] Our RFID
  486. 21:24reader MFRC522
  487. 21:27uses SPI. OLED displays often use I
  488. 21:31squared C.
  489. 21:32>> [music]
  490. 21:33>> Data acquisition does not end at reading
  491. 21:36a sensor. Realtime [music] streaming
  492. 21:39means sensor readings flow continuously
  493. 21:42each with a time stamp. A buffer or Q
  494. 21:45[music] temporarily stores data when the
  495. 21:47network is slow or down. So readings are
  496. 21:50not lost. That is exactly the pushpull
  497. 21:52idea. Sampling rate [music] matters.
  498. 21:55According to the Nyquis theorem, we must
  499. 21:57sample at least twice the highest
  500. 21:59frequency in the signal. The [music]
  501. 22:01challenges in IoT data acquisition are
  502. 22:04noise, missing values, sensor drift
  503. 22:07[music] over time, and the need for
  504. 22:08calibration,
  505. 22:10plus limited battery power, [music]
  506. 22:12limited bandwidth, latency, and
  507. 22:14heterogeneous data coming in different
  508. 22:16formats from different sensors.
  509. 22:20[music]
  510. 22:20Chapter 6, a gallery of every sensor and
  511. 22:23actuator you used in the lab.
  512. 22:27The [music] DHT11
  513. 22:28measures temperature and humidity.
  514. 22:31Inside it has a capacitive humidity
  515. 22:34sensor [music] and an NTC thermister
  516. 22:36whose resistance falls as temperature
  517. 22:38rises. An internal chip converts both
  518. 22:41[music] readings into a digital signal
  519. 22:43sent on a single data wire. Each reading
  520. 22:46is 40 bits. 16 bits of humidity, 16
  521. 22:50[music] bits of temperature and an 8 bit
  522. 22:52checksum to detect errors. It measures 0
  523. 22:55to 50° C, [music] accurate to plus -2°
  524. 22:59and 20 to 90% relative humidity. It
  525. 23:03should be read at most once every
  526. 23:05second. [music] Its big brother, the
  527. 23:07DHT22,
  528. 23:08is more accurate and has a wider range.
  529. 23:12The IR obstacle sensor detects [music]
  530. 23:15whether an object is present in front of
  531. 23:17it. It has an infrared LED [music] that
  532. 23:21transmits and a photo diode that
  533. 23:23receives. When an object is present,
  534. 23:25[music] infrared light reflects off it
  535. 23:28and reaches the photo diode. [music] An
  536. 23:30LM393
  537. 23:32comparator compares the received signal
  538. 23:34with a reference [music] set by the
  539. 23:36potentiometer. Turning the potentiometer
  540. 23:38changes the detection distance. The
  541. 23:41output is digital and usually active
  542. 23:43low. [music] LOW means obstacle
  543. 23:46detected. High means no obstacle. Always
  544. 23:48mention that it depends on the module.
  545. 23:51Its range is about 2 to [music] 30 cm.
  546. 23:54It can be fooled by sunlight and black
  547. 23:56surfaces absorb [music] infrared so they
  548. 23:59are harder to detect.
  549. 24:02The [music] MQ2 gas sensor is used for
  550. 24:04gas leakage detection. It detects LPG,
  551. 24:08methane, propane, smoke, and hydrogen.
  552. 24:12It contains a [music] thin dioxide
  553. 24:14semiconductor layer heated by an
  554. 24:16internal heater. [music] In clean air,
  555. 24:18its conductivity is low. When
  556. 24:20combustible gas is present, conductivity
  557. 24:23increases. So, resistance falls and the
  558. 24:26output [music] voltage rises. It has two
  559. 24:29outputs. A O the analog [music] output
  560. 24:31gives the gas concentration. Read by
  561. 24:34analog read from 0 to 1,023. [music] Do
  562. 24:38the digital output switches when the
  563. 24:40onboard threshold is crossed. It must be
  564. 24:42[music] preheated before readings are
  565. 24:44reliable and calibrated in clean air to
  566. 24:47[music] avoid false alarms.
  567. 24:50A few more sensors you may be asked
  568. 24:52[music] about. An LDR light dependent
  569. 24:56resistor has a resistance that falls as
  570. 24:58light increases. High resistance in
  571. 25:01darkness, [music]
  572. 25:01low resistance in bright light. We put
  573. 25:04it in a voltage divider with a 10 kilo
  574. 25:07ohm resistor and read the middle point
  575. 25:09[music] on pin as zero. LM35 is an
  576. 25:13analog temperature sensor. It gives 10
  577. 25:16molts per degree [music] C. So 300 m
  578. 25:19volts means 30°.
  579. 25:21The ultrasonic sensor [music] HCSR04
  580. 25:25sends a 40 kohertz sound pulse [music]
  581. 25:27and measures the time until the echo
  582. 25:30returns. Distance equals speed of sound
  583. 25:33multiplied by time divided by 2 because
  584. 25:36the sound travels to the object and
  585. 25:38back. In code it is time in microsconds
  586. 25:41[music] time 0.0343
  587. 25:44divided by 2 giving cm.
  588. 25:48Now [music] actuators an actuator
  589. 25:50converts an electrical control signal
  590. 25:52into [music] a physical action. An LE
  591. 25:56needs a resistor in series to limit
  592. 25:58current with a 5V supply. an LED drop of
  593. 26:01about 2 volts and 20 milliamps of
  594. 26:03current. [music] R is 3 volt divided by
  595. 26:06002 which is 150 ohms. So we use the
  596. 26:10next [music] safe value 220 ohms. A
  597. 26:14buzzer gives an audible alert and an LE
  598. 26:16[music]
  599. 26:17gives a visual alert. Using both is
  600. 26:19redundancy. So the alert is noticed
  601. 26:21either [music] way. A relay lets a small
  602. 26:245V pin safely switch a high voltage load
  603. 26:27[music] like a fan, a pump or a gas
  604. 26:30solenoid valve and servos, [music]
  605. 26:32DC motors and solenoid valves produce
  606. 26:35movement.
  607. 26:38[music] Chapter 7, cloud platforms and
  608. 26:41edge computing.
  609. 26:43Let's look [music] at the big IoT cloud
  610. 26:46platforms. A WSOT core from Amazon
  611. 26:50provides a managed MQTT [music] broker,
  612. 26:53device shadows that store the last known
  613. 26:55state of a device, and a rules engine
  614. 26:58that routes data to other AWS services.
  615. 27:01Microsoft [music] Azure IoT hub provides
  616. 27:04device twins, device to cloud and cloud
  617. 27:07to device messaging and the device
  618. 27:09provisioning service. Google Cloud IoT
  619. 27:12[music] core was retired in August 2023.
  620. 27:16That is a great point to impress your
  621. 27:18examiner. Google now relies on PubSub
  622. 27:20and partner platforms for [music] IoT.
  623. 27:23For student projects, things speak,
  624. 27:26Blink and Adafruit IO are simple and
  625. 27:28free to start. Common cloud [music]
  626. 27:30services include storage, analytics,
  627. 27:33machine learning, visualization, and
  628. 27:35alert [music] rules.
  629. 27:38Now, the compute stack from devices to
  630. 27:40the cloud. At the bottom, devices and
  631. 27:44sensors generate [music] data. Edge
  632. 27:46computing processes data right on the
  633. 27:49device or the gateway [music]
  634. 27:50where it is generated, giving responses
  635. 27:53in milliseconds. Our Raspberry Pi acts
  636. 27:55as the edge device. Vog computing is the
  637. 27:59layer in between. It uses local nodes,
  638. 28:02routers, and [music] servers in the
  639. 28:03local network to process data from many
  640. 28:06edge devices. The term was coined by
  641. 28:08Cisco. The cloud sits at the top with
  642. 28:11[music] massive storage and computing
  643. 28:13used for training models and long-term
  644. 28:15analysis. One line, edge is on the
  645. 28:17device, fog is near the device, cloud
  646. 28:20[music] is far away.
  647. 28:23Edge versus cloud, five points.
  648. 28:26Location, [music] edge is near the
  649. 28:28device. Cloud is in a remote data
  650. 28:30center. Latency edge is very low in
  651. 28:34[music] milliseconds because there is no
  652. 28:35round trip. Cloud is higher. Bandwidth
  653. 28:39edge sends only useful or summarized
  654. 28:41data. [music] Cloud receives all raw
  655. 28:43data. This is bandwidth optimization.
  656. 28:46Offline edge [music] keeps working even
  657. 28:49when the internet is down. Cloud needs
  658. 28:51connectivity.
  659. 28:52Privacy. With edge, raw data stays
  660. 28:55local, which enhances privacy. [music]
  661. 28:57These four benefits: latency, bandwidth,
  662. 29:00reliability, and privacy are exactly
  663. 29:02what your syllabus lists.
  664. 29:06>> [music]
  665. 29:06>> Chapter 8. Intelligent IoT or IoT.
  666. 29:11A IoT [music]
  667. 29:13means combining artificial intelligence
  668. 29:15with the internet of things. IoT [music]
  669. 29:18gives the senses. It collects data. I
  670. 29:21gives the brain. It learns from data and
  671. 29:23takes decisions. Why do we need
  672. 29:25intelligent [music] analytics? Because
  673. 29:27IoT generates data that is too large and
  674. 29:30too fast for humans to analyze manually.
  675. 29:34A I is used for [music] three main
  676. 29:35tasks. Prediction like future
  677. 29:38temperature. Classification like
  678. 29:40recognizing an activity [music] and
  679. 29:41anomaly detection like spotting a faulty
  680. 29:44machine. Examples include predictive
  681. 29:47[music] maintenance, smart traffic
  682. 29:49control and health alerts from
  683. 29:50wearables. And tiny [music] ML is the
  684. 29:54trend of running small machine learning
  685. 29:56models directly on microcontrollers.
  686. 29:58[music] The ultimate edgeri.
  687. 30:02The syllabus specifically lists three
  688. 30:04challenges of IoT [music] data. Noisy,
  689. 30:06incomplete and heterogeneous.
  690. 30:09Noisy data has random fluctuations
  691. 30:11[music] caused by electrical
  692. 30:13interference or cheap sensors. We handle
  693. 30:16it with smoothing [music] like a moving
  694. 30:17average filter. Incomplete data has
  695. 30:20missing values. When a sensor [music] or
  696. 30:22network drops out, we handle it by
  697. 30:24imputation like mean, median, [music]
  698. 30:27forward fill or interpolation.
  699. 30:30Heterogeneous data comes from different
  700. 30:32sensors in different formats, units
  701. 30:34[music] and sampling rates. We handle it
  702. 30:36by standardizing formats, converting
  703. 30:39units and aligning timestamps. [music]
  704. 30:41We also deal with outliers, duplicate
  705. 30:44records and misaligned timestamps.
  706. 30:48Predictive [music] analytics using
  707. 30:50machine learning follows a clear
  708. 30:52pipeline. Collect sensor data with
  709. 30:55timestamps. [music]
  710. 30:56Clean it by handling missing values,
  711. 30:59duplicates, and outliers.
  712. 31:01Engineer [music] features like previous
  713. 31:03values called lags, rolling averages,
  714. 31:06and time of day. Train a [music] model
  715. 31:08like linear regression, random forest,
  716. 31:11or an LSTM for time series. Evaluate it
  717. 31:15with metrics like [music] ME, RMS, and R
  718. 31:18squar, and deploy it [music] to make
  719. 31:21predictions and trigger alerts in real
  720. 31:23time.
  721. 31:26Chapter nine, [music]
  722. 31:27security in the internet of things.
  723. 31:31Security is a major part of part B.
  724. 31:33First three [music] terms, a threat is a
  725. 31:36possible attack. A vulnerability is a
  726. 31:39weakness [music] that the attack can
  727. 31:40exploit. And risk combines them. Risk
  728. 31:44equals [music] threat time vulnerability
  729. 31:46time impact. If any one of these is
  730. 31:48zero, risk is low. The most common
  731. 31:51vulnerability is [music] weak or default
  732. 31:53passwords. In 2016, the Marai botnet
  733. 31:57infected [music] hundreds of thousands
  734. 31:58of cameras and routers using default
  735. 32:01passwords and used them to take down
  736. 32:03major websites. Unencrypted [music]
  737. 32:05traffic allows sniffing and
  738. 32:07maninthe-middle attacks where the
  739. 32:09attacker secretly [music] sits between
  740. 32:11device and server. Other threats include
  741. 32:14denial of service, device spoofing,
  742. 32:17firmware [music] tampering, and physical
  743. 32:18attacks on devices and vulnerabilities
  744. 32:22like missing updates, [music]
  745. 32:23insecure a PIS and badly configured
  746. 32:26cloud storage.
  747. 32:29Security goals [music] are summarized by
  748. 32:31the CIA triad. Confidentiality only
  749. 32:35authorized parties can read the data
  750. 32:37achieved by encryption. Integrity data
  751. 32:41is not altered in transit. achieved by
  752. 32:43hashes and [music] message
  753. 32:44authentication codes. Availability. The
  754. 32:48system works when needed, [music]
  755. 32:49protected against denial of service.
  756. 32:52Now, a classic question. [music]
  757. 32:54Authentication answers, who are you? It
  758. 32:56verifies identity using a password,
  759. 32:59token or [music] certificate.
  760. 33:01Authorization answers, what are you
  761. 33:03allowed to do? [music] It happens after
  762. 33:05authentication using access control
  763. 33:08lists. For example, a sensor may publish
  764. 33:10to its own [music] topic but not to
  765. 33:12others. Authentication first, then
  766. 33:14authorization.
  767. 33:17Encryption converts readable [music]
  768. 33:19plain text into unreadable cipher text.
  769. 33:22There are four categories to know.
  770. 33:24Symmetric encryption uses [music] the
  771. 33:26same secret key to encrypt and decrypt.
  772. 33:29A ES is the standard. [music] It is
  773. 33:31fast, so it encrypts the actual data.
  774. 33:34Asymmetric encryption uses a key pair.
  775. 33:37Data encrypted with the public key can
  776. 33:39only be decrypted with the [music]
  777. 33:40private key. RS and elliptic curve
  778. 33:43cryptography are examples. ECC is
  779. 33:46preferred in IoT [music] because it
  780. 33:48gives the same security with much
  781. 33:50smaller keys. Hashing is one way. It
  782. 33:53produces [music] a fixed size digest
  783. 33:55like SH at 256. You cannot reverse it.
  784. 33:59[music] It is used for integrity checks
  785. 34:00and storing passwords. and lightweight
  786. 34:03cryptography like ASCAN [music]
  787. 34:05chosen by NIST in 2023 is designed for
  788. 34:09very constrained [music]
  789. 34:10devices.
  790. 34:13How does TLS transport layer security
  791. 34:16actually secure connection [music]
  792. 34:18through the handshake? The client sends
  793. 34:20a client hello with the cipher [music]
  794. 34:22suites it supports and a random number.
  795. 34:25The server replies with a server hello
  796. 34:28and its [music] digital certificate
  797. 34:29signed by a certificate authority. The
  798. 34:32client verifies it. This is server
  799. 34:34authentication. [music] Then both sides
  800. 34:37perform a key exchange, usually elliptic
  801. 34:39curve defy helman to agree on a shared
  802. 34:42secret without ever sending it on
  803. 34:44[music] the network. Both derive session
  804. 34:47keys and send finished messages. From
  805. 34:50now on, all data is encrypted with a
  806. 34:52[music] fast symmetric cipher like a ES.
  807. 34:55TLS thus gives confidentiality, [music]
  808. 34:58integrity, and authentication. In mutual
  809. 35:00TLS, the client also presents a
  810. 35:03certificate.
  811. 35:05What about UDP? TLS [music] needs the
  812. 35:08reliability of TCP. So for UDP, we use
  813. 35:12DTLS.
  814. 35:14DTLS [music]
  815. 35:15datagramgram transport layer security
  816. 35:18gives the same security as TLS but over
  817. 35:21UDP.
  818. 35:22It [music] adds its own sequence numbers
  819. 35:24and retransmission of handshake messages
  820. 35:27because UDP can lose or reorder [music]
  821. 35:30packets. It is used to secure co-ap.
  822. 35:33Secure co-ap runs on port [music] 5684.
  823. 35:37Memorize the ports. MQTT is 1883. Secure
  824. 35:41MQTT is 8883. [music]
  825. 35:44HTTP is 80. HTTPS is 443. And remember
  826. 35:49SSL [music] is the old insecure
  827. 35:52predecessor of TLS. Today we use TLS
  828. 35:55version 1.3.
  829. 35:58[music]
  830. 35:59Chapter 10. The application layer
  831. 36:02protocols.
  832. 36:04HTTP [music]
  833. 36:05is the protocol of the web and also used
  834. 36:08in IoT. It follows [music] the request
  835. 36:11response model over TCP. Its headers are
  836. 36:14text based which makes it heavy for tiny
  837. 36:17devices.
  838. 36:18>> [music]
  839. 36:19>> HTTPS is simply HTTP over TLS on port
  840. 36:24443.
  841. 36:25REST representational state transfer
  842. 36:27[music] is an architectural style. Every
  843. 36:30resource like a sensor has a URI and
  844. 36:33each request is stateless [music]
  845. 36:35carrying all the information needed.
  846. 36:37Rest uses HTTP methods. Get to read,
  847. 36:41post to create, put [music] to update,
  848. 36:43delete to delete. For example, get /
  849. 36:45sensors/ temperature and status codes.
  850. 36:49200 is okay, [music] 201 is created, 404
  851. 36:53is not found, 500 is server error.
  852. 36:58MQTT is the most [music] important
  853. 37:01protocol for your orals. It stands for
  854. 37:03message queuing telemetry transport
  855. 37:05[music] created by IBM in 1999.
  856. 37:09It follows publish subscribe [music]
  857. 37:11through a broker like MSquido, Hive MQ
  858. 37:14or EMQX.
  859. 37:16It runs on TCP [music] port 1883 or 8883
  860. 37:20with TLS. Its fixed header is just two
  861. 37:23bytes which is why it is so lightweight.
  862. 37:25[music]
  863. 37:26Topics are hierarchical strings
  864. 37:28separated by slashes like home/ room
  865. 37:311/mp. A [music] subscriber can use wild
  866. 37:34cards. Plus matches exactly one level
  867. 37:36and hash [music] matches all remaining
  868. 37:38levels. Quality of service has three
  869. 37:41levels. CO0 at most once, fire [music]
  870. 37:44and forget. Go S1 at least once
  871. 37:46acknowledge, but duplicates are
  872. 37:48possible. Go S2 exactly once using a
  873. 37:51four-step handshake. [music] The safest
  874. 37:53but slowest. A retained message is
  875. 37:56stored by the broker and given
  876. 37:57immediately to new [music] subscribers.
  877. 37:59The last will and testament is a message
  878. 38:02the broker publishes if a client
  879. 38:04disconnects unexpectedly and keep alive
  880. 38:06pings tell the broker the client is
  881. 38:08still alive. [music]
  882. 38:10Finally, a persistent session lets the
  883. 38:12broker remember subscriptions [music]
  884. 38:14and cued messages for a client that
  885. 38:16reconnects.
  886. 38:19Three [music] more protocols.
  887. 38:21Co-op the constrained application
  888. 38:23protocol is like rest for tiny devices.
  889. 38:26It runs on UDP port [music] 5683 with a
  890. 38:30four byte header and supports get, post,
  891. 38:32put, and delete. Co-op messages [music]
  892. 38:35can be confirmable, non-confirmable,
  893. 38:38acknowledgement, or reset. Its observe
  894. 38:40option lets [music] a client subscribe
  895. 38:42to changes of a resource. A MQP,
  896. 38:46advanced message queuing protocol, is
  897. 38:48for [music] enterprise messaging.
  898. 38:50producers send to exchanges which route
  899. 38:52messages into cues based on rules
  900. 38:54[music] port 5672.
  901. 38:57It is very reliable with routing and
  902. 38:59transactions. Rabbit MQ is the famous
  903. 39:02broker. XMPP [music]
  904. 39:05the extensible messaging and presence
  905. 39:07protocol is XMLbased. It was built for
  906. 39:10realtime chat and presence like whether
  907. 39:12a user is online. [music] It is heavier
  908. 39:14due to XML on port 5222.
  909. 39:19Let's compare all five in one table. A
  910. 39:22[music] screenshot of this in your mind
  911. 39:24is worth many marks. Transport only
  912. 39:27co-op uses UDP. All others use TCP.
  913. 39:31[music] Model MQTT is publish subscribe.
  914. 39:34Co-op and HTTP are request response.
  915. 39:38Co-op with observe. A MQP uses Q's.
  916. 39:40[music] XMPPP supports both publish
  917. 39:43subscribe and pointtooint.
  918. 39:46Wait. [music] MQTT and co-op are very
  919. 39:48lightweight. HTTP, A MQP and XMPPP are
  920. 39:52heavier. Security [music] co-op uses
  921. 39:55DTLS. The others use TLS with SSL for
  922. 40:00authentication in a MQP and [music]
  923. 40:02XMPP.
  924. 40:04and best use. MQTT for telemetry, co-op
  925. 40:08for highly constrained nodes, HTTP
  926. 40:10[music] for web, a PIS, a MQP for
  927. 40:13enterprise, XMPP for chat and presence.
  928. 40:18[music] Chapter 11. Privacy in IoT
  929. 40:21systems.
  930. 40:24Privacy [music] is different from
  931. 40:25security. Security protects data from
  932. 40:27attackers. Privacy protects people from
  933. 40:30misuse of their data even [music] by
  934. 40:32authorized parties.
  935. 40:34IoT devices collect identity, location,
  936. 40:37health data, behavior patterns, and even
  937. 40:40audio and video. The risks [music] are
  938. 40:43profiling, tracking, inference attacks,
  939. 40:45surveillance, and data leaks. For
  940. 40:47example, a smart meter's power pattern
  941. 40:49[music] can reveal when you are at home
  942. 40:51and even when you are sleeping. The
  943. 40:54challenges are that sensing is always on
  944. 40:56and many devices have no screen [music]
  945. 40:59to ask for consent. Laws protect us. The
  946. 41:02GDPR in Europe and in India. The digital
  947. 41:06personal data [music] protection act
  948. 41:072023.
  949. 41:10How do we preserve privacy? [music]
  950. 41:12Seven techniques. Data minimization.
  951. 41:15Collect only the data truly needed for
  952. 41:18the purpose. This is your assignment.
  953. 41:20Five. Anonymization removes identity
  954. 41:23completely. Pseudonymization replaces
  955. 41:26identity with a code [music] which can
  956. 41:28be reversed only with a separate key.
  957. 41:31Encryption both at rest in storage and
  958. 41:33in transit over the network. [music]
  959. 41:36Edge processing so raw data never leaves
  960. 41:38the device. Only results are sent.
  961. 41:41Differential [music] privacy adds
  962. 41:43carefully calibrated noise to data or
  963. 41:46results. So no individual can be
  964. 41:48identified [music]
  965. 41:49while overall patterns remain accurate.
  966. 41:52Federated learning trains a shared
  967. 41:53[music] model by sending model updates
  968. 41:56not raw data to the server. And finally,
  969. 41:59[music] consent, strict access control,
  970. 42:02and limited data retention. All of these
  971. 42:04together form privacy by design.

About this transcript

This page contains the full transcript of IoT Viva Theory from Scratch | Complete Internet of Things in 42 Min | SPPU TE AI&DS 2024 Pattern by Pranav Malshikhare, generated from the public captions YouTube serves with the video. The transcript has 5,640 words across 971 segments, with the original timestamps preserved so you can click any line to jump to that moment in the embedded player.

What you can do with it

Use the transcript to take notes, quote the speaker, build a study guide, generate a summary with ChatGPT or Claude via the YouTube Summary tool, or export it as a timed subtitle file with YouTube to SRT. You can also re-open it in the transcriber to translate the transcript into 100+ languages.

Free YouTube transcript tool

YouTube2Text is a free YouTube transcript generator — no signup, no daily limit. Paste any YouTube link and get the full transcript instantly, with timestamps, click-to-jump, translation to 100+ languages, AI prompts for ChatGPT, Claude, and Gemini, and exports to TXT, SRT, VTT, or Markdown.