Home automation project

Atmega8 is an inexpensive microcontroler with many functions .
In the picture above are the components that you may need for this sample project:
For low voltage (non dangerous!):
1.Power adapter 220v to 5v
2.Serial adapter module - of the cheapest in the world !!!
3.bluetooth module -  of the cheapest in the world !!!
4.An small breadboard
6.My love !!! Atmega8 microcontroller- of the cheapest in the world !!!
7.White Led

9.Bluetooth adapter for PC... only if needed !!!!

For high voltage 220v (bee carefully !!!!):
1.Photo resistor
2.Triac BT136 .Capable of supplying a consumer to 4Ampers (880w for 220v)

Realize Project :


From this project use only TX,GND and 3,3V pins  Bluetooth module.
See how prepare this module for working...here

Second step is load program in atmega8.

When finished to prepare these you can build project.
I created an small schematic,I hope it will be helpful.
This is for standard project...if you want create a project same as mine in my video ...
You need to change slightly electrical installation,see how:
Principle is sample:
When switch is on...module working and for first time lamp is on ,lamp is drive by module .
When switch is off ,module is off ( not working ! ) and of course...lamp is off.
In this mode lamp can be drived by module and switch.

Of course you can command more consumers with principle of led and photoresistor,with galvanic isolated security.
Atmega 8 have 23 inputs/outputs,you use one pin for receive data,this means that remain 22 outputs for command various consumers.
Like this:
And do not forget that atmega8 have 23 input/outputs ,this means that is capable for read various temperatre sensors,light sensors,etc... and command consumers depending on the read data...