A voice controlled "Dynamic Lamp" which is powered by Arduino
This was my High school project.
My Objective was to show that we can easily control hardware using speech recognition to do what we want Speech recognition as you know has wide variety of applications in military , healthcare etc.
This project combines power of .net to open source hardware(Arduino)
In my tutorial I have uploaded images that correspond to steps that i create , I have also included images of my software (front end)
Where Did I get The Inspiration from ?
Well, I always loved Led's and always wanted to somehow control them using a computer ever since i was very young, When i learned Programming appreciably (Visual Basic .net) and tried playing with speech recognition I decided its time to give it a try, I decided to make my first hardware related project I choose the easiest and most popular platform that is Arduino .
The Instructables which really inspired me for this was
Where did i Create this ?
I made this at my home , In my computer I have Visual Basic 2010 express installed which i used for programming , I used Arduino for the first time it was very easy to use and learn.
What did I learn ?
Well , to be honest I learned that a lot can be done using speech recognition and Arduino and there are still so many ideas striking my mind which i can hopefully try to implement in the near future.
1. Lamp Fading
2. Lamp Blinking
3. Change Lamp color to any RGB code
4. Random Colors
5. Change Lamp color by parameters such as
Battery Low Notification
6. Lamp LOG / Lamp History
7. Change Lamp color By your speech (Speech Recognition)
8. Computer Voice Reply
9. Change Lamp light according to pixel detection from an image file
10. Control Lamp Brightness
11. Email Lamp History Report
1. A RGB Led (common cathode or common anode)
2. A glass container
3. Gel Wax
4. 3 resistors(220 ohms are the one which i used)
5. Visual Basic 2010 express (its free to download)
6. Arduino Board (I used Arduino Leonardo)
7. Arduino Software ( free can be downloaded from their official site www.arduino.cc)
Step 1: Step 1
Take any glass container which is not so big like a big glass bottle (cause in very big bottles you dont get full effective light effect downwards )
I have tried using many containers but the small glass bottled container works best
Now Take Gel wax and prepare it
I used the following video to prepare it(its very easy)
This is the step where you can use 'your creativity' and embed decorative material inside your lamp (as you do in aquariums)
How are Bubbles formed ?
The thing that you need to keep in mind is after you melt your wax and its heated then let it cool down(the more you let it cool the more bubbles are formed )
Assuming you did that pour the wax now into the solution and let it still for some time (15 minutes maybe?)
Step 2: After Container What Else You Need ?
I bought a set of Piranha RGB led's and then got them wired So it reduced my work , So you need a single RGB LED and then you need to connect wires and the 3 resistors together , You can use Long wires but not too long (Keeping in mind your Arduino will be placed next to your Lamp)
So Once you have your Basic RGB LED , Make a Hole in the cap of the container or the bottle and then fix your led on this cap and let the wires out of this hole then connect it to your Arduino (I used Arduino Leonardo ) and Just power up your arduino by connecting it your pc via USB (you will need to download its software which includes driver from www.arduino.cc)
Thats pretty much it , You have done the Hardware part of it , For software part well I can suggest you to download basic Arduino codes to Control RGB LED via serial
Once you have downloaded the Arduino sketch , you can use visual basic .net's functionality and classes to actually integrate speech recognition with your Arduino sketch (More on this in later slide)
Update For Programming : You dont need to do programming because you can use my front end with all the functions , I have released the code for the application (Front end ) and Arduino Code
Before you download the application you need to know about some its functions (Refer next page )
Step 3: Software Front End
First of all why this green leaf background ??
Well as you might know led's are eco-friendly in comparison to normal bulbs and save a lot of energy . This project uses only a single led but you can imagine if you are creating something with multiple led's that can save a lot of power!! , so to show that i kinda picked up this background which is eco-friendly type
So in main window you see 3 buttons About , Lamp On and Lamp Off
Lamp On makes the Lamp on and sets it to default color (which is red)
and Lamp Off switches off the lamp as you would expect
After these 3 buttons on the right hand side you see Menu buttons Tools,Configure and Help
On the right hand side you also see 2 modes that it supports
1. Computer Voice Reply Mode
2. Speech Mode
Computer Voice Reply Mode is Basically Text to Speech , But it looks great when you can imagine lamp talking back to you for example when you turn in on ,off change color etc (I know its insane but its cute idea)
Speech Mode is the main feature of this project (Speech Recognition) - When enabled, It can recognize user's voice
What does it listens for ??
With Speech Recognition mode user can say <Color Name>"color"
For Example saying Red color will change the color of the lamp to red
If you say Random color it generated a random color you can keep on saying random color it will keep generating random colors
When you say Fade color it starts 1 complete cycle of color fading
Note : You can Hide this application by going to tools menu and selecting Hide or pressing Ctrl + H , This would cause an icon to appear on the system tray indication its running in the background !
->>>>>>>>> The Main advantage of speech mode comes when you are multitasking for example if speech mode is on and you are using some other application for example MS Word or maybe working on a powerpoint , the lamp is obviously on your computer table so if you wanna change color very quicky and dont want to switch to this application and then change color you can Just say
<Color name> "color" (As demonstrated earlier)
Just below that there is status information which shows current status of lamp that is
The current Color (both color preview and its name and if it has no name its rgb value)
On and Off status of the lamp (I have also added an image which glows when user clicks on lamp on and then when user clicks on lamp off button it remains normal)
I have added a screenshot of bulb glowing when user clicks on ' LAMP ON ' check it out
On the extreme bottom left you see two icons that are for Lamp History and Changing Lamp color
Lamp History - basically displays whole Lamp Log when the lamp changed color (Time and date) , when it became on or off , To what color was the lamp color changed , When lamp started fading
>>>>>>>>>> You can if you want email this Lamp History to your email
Change Lamp color : User can change the current color of lamp from the typical color dialog box (I have also added a screenshot showing that if you want)
Note: Color can also be changed from RGB Value in configure menu(which i'll explain shortly)
In configure menu you can configure your lamp for different things for example
You can configure your lamp for time (alarm) , Battery Low notification (In laptops) , Network dis connectivity (when your internet network has disconnected )
I will explain each of them one by one starting from
1. Time (alarm) , When you configure your lamp for alarm you basically want to get notified after some time(which you enter) and the way you get notified is that the lamp changes color when that time has reached
So you also select color from 4 choices when your set time occurs lamp changes color accordingly (pretty simple)
I have attached a screenshot for this step too
2. Battery Low Notifier : When you configure your Lamp for battery low (Only for Laptops obviously ) Then when your battery gets low (default value is 30% which can be changed ) lamp will change color to that color which user has choosen
3. Network Dis connectivity : It Basically Changes color of the lamp to the color user chooses when he configures this property when the Internet connectivity is dead or when you cannot get a working internet connection
In the Configure menu there is also an option for changing color by following ways
1. Color Picker
2. RGB Value
3.Color from pixel of an image (I will explain this next)
What is color of pixel from an image (Image of this window is also attached)
So Basically , a user can browse and select an image from his/her computer (The 24 Bit color map works best) Then that image will be shown in the picturebox of the window , user can then select any pixel of that image by clicking on it and the RGB coordinates of that very pixel are detected and sent to arduino and required color is applied
Note: Whenever a user changes the color the Information Status area of lamp is updated and if Computer Voice reply mode is on Computer also talks back to you (Or lamp how ever you wanna view it as )