My HelloWorld into World of Connected electronics and IOT

Then God said, “Let there be light”; and there was light ! 

I wonder did God use IOT to control lights ?

Jokes apart it had been around two weeks since i had built anything physical or that’s hardware (on other hand we at Reinventio are daily building stuff that we hope will change education as we know it today !! ). I had been working with MEANJS stack at backend for weeks now and wanted some change. So This churned out in 2.5 hours to sooth my itch.

I have been hearing a lot about IOT and connected electronics buzz, but never had my chance to try hands on it till now, due to various issues (burnt 3.3V powersupply, non functioning ethernet module list grows on! ). So today i thought of why not try something with connected electronics.Nothing fancy but something simple, something like a small “HelloWorld” into Connected electronics and IoT.Although this has no I of IoT ,yet. The project is very simple,We have a 230VAC bulb which is to be controlled using your phone over bluetooth.

Here it is in flesh and blood!

Lets get into technicalities.

I have used ubiquitous HC05 module ,Arduino(or freeduino ) UNO along with some spares like 12VDC/220VAC 7Amp relay , L293D motor driver and a bulb ofcourse!.

HC05 module is very useful module you can invest into as it can communicate with other bluetooth device,say mobile or laptop or other HC05 using Serial communication easily .Hence providing wireless ability to your projects.

Here L293D is used because the feedback currents due to magnetic activities in Solenoids, motors and relays can potentially harm your micros and also your micros wont be able to drive enough current into your motors, These chips inturn isolates your arduino inputs and your inputs to motor hence nullifying any feedback current into arduinos and they have their own powersupply hence they can drive motors efficiently,So it is always advisable to connect your motors/solenoids/relays using HALF-H DRIVERS(also known as motor drivers).Read over the datasheet to know more about pin configs.

Relay is another piece of interesting device i was always fascinated about!.They enable you to control high voltage line(like 230VAC) using low 12VDC using electromagnets and contact switches inside.

Relay

Relay
Image source wikipedia

In practical relay would look like a box with pins over it, if you are lucky you will have diagrams on it too. Relays have information about voltage they can handle on primary side( here 12-18VDC), Voltage and amperage they can handle on secondary side(here 230V AC and 7A). I used a SPDT relay with 12V/230V 7A ratings.

So here is the final product put into one!

HelloIOT_bb

Code is pretty simple, You can have a look at  my github repo

And finally you will need this opensource app called as blueterm in your mobile to communicate with arduino. Any app would do but i recommend this one for being opensource!. You can even write your own custom app for communication over bluetooth(i want to try that real soon).

You can connect multiple devices over multiple relay and transistors(instead of h bridges if you prefer to save space and money) and control your home appliances using this ! quite simple but nonetheless useful!

That’s all folks!

Happy hacking, happy making!

All the above content and code goes under Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.

Creative Commons License

HelloConnect by Rohit Shetty is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.

Advertisements