Speaking, Voice recognizing Home Automation System
xanatos
Posts: 1,120
Well, I finally put my project together. It understands whatever commands you set the Say-It module up to use, and speaks to you with various prompts, responses, etc., and, of course, it turns stuff on & off. The motivation for this was the number of times that we have gone to bed only to realize that the hoses were still on going up to the gardens, and I was wishing I had a Star-Trek style home automation system where I could say, "Computer... Outside Water Off" - and it would turn it off! Well, now I have the basic model. The PC Board making starts after the sockets for the V-Stamp arrive. This program nearly fills the entire stamp, I have about two words of space left - but it works like a charm. If there is sufficient interest, I could consider making it into a "completed project" once I can provide PC Board layouts, etc.
Here is a video of it responding to commands for time, temperature, day-of-week and turning "outside water" on and off: http://www.youtube.com/watch?v=CB62tH4OHE8
It also responds to (currently) 15 other commands such as "Outside Water On". "Outside Water Off", "Security Lighting On", "Security Lighting Off", etc. I included a photocell to sense light levels so it can ask me if I want a light on when I come home and it's dark, and other oddities like that... At this point, the base hardware and program are all set and everything works happily together, just needs adjusting as the system evolves.
It uses:
1 - BS2sx
1 - Say-It module
1 - V-Stamp (http://www.rcsys.com/)
1 - ADC0831
1 - DS1302 & crystal
1 - Photocell, any type that will work with RCTIME
2 - 74HC595 Shift Register to control 16 outputs
2 - ULN2308 Darlington drivers (or any transistor/optoisolator you like)
8 - Crydom D2440 (or whatever you like) Solid State Relays
Misc small resistors, caps, etc.
A few stills here as well as the above linked video. This was a lot of fun, and only took about three days worth of playing to put together and test. The hardest part was merging and de-duplicating code from the Say-It GUI with the code I developed for the rest of the system.
I love Basic Stamps!!!
Dave
Here is a video of it responding to commands for time, temperature, day-of-week and turning "outside water" on and off: http://www.youtube.com/watch?v=CB62tH4OHE8
It also responds to (currently) 15 other commands such as "Outside Water On". "Outside Water Off", "Security Lighting On", "Security Lighting Off", etc. I included a photocell to sense light levels so it can ask me if I want a light on when I come home and it's dark, and other oddities like that... At this point, the base hardware and program are all set and everything works happily together, just needs adjusting as the system evolves.
It uses:
1 - BS2sx
1 - Say-It module
1 - V-Stamp (http://www.rcsys.com/)
1 - ADC0831
1 - DS1302 & crystal
1 - Photocell, any type that will work with RCTIME
2 - 74HC595 Shift Register to control 16 outputs
2 - ULN2308 Darlington drivers (or any transistor/optoisolator you like)
8 - Crydom D2440 (or whatever you like) Solid State Relays
Misc small resistors, caps, etc.
A few stills here as well as the above linked video. This was a lot of fun, and only took about three days worth of playing to put together and test. The hardest part was merging and de-duplicating code from the Say-It GUI with the code I developed for the rest of the system.
I love Basic Stamps!!!
Dave
Comments
Just out of curiosity, are you looking to go commercial with this? I know Home Automation is very hot right now, especially when integrated with security systems.
--Rich
I'm tweaking program code today to make some more space as I'd like to use the PINK servers I have hanging around to interface the system to the web so I can control stuff while I'm away through my iPod Touch or laptop, and I want to add some RF remote capabilities via XBee Pro XSCs to allow my wife to switch different hoses on/off while she works in the gardens. So I'm really going to see just how much control can be squeezed out of a single BS2sx before I have to go to a dual-stamp system. I'm really grateful for shift registers and bidirectional i/o on the stamp because I have used EVERY pin on the stamp, and yet I can control many, many things with those 74HC595s and 74HC195s to read back the status of stuff.
I have already made a lot of changes to the code I uploaded yesterday... this is addictive beyond all reason! :-) New video: http://www.youtube.com/watch?v=CB62tH4OHE8
Dave
May I suggest posting this in a blog? Then you could show us the "bits & pieces" without worrying about the requirements of the Completed Projects area.
I'd love to see more about this.
Regards,
DJ
...wait a minute! You did all of that in just 3 days?!?!?!?!?!? I am such a SLUG!!!
Dave
Thanks!
Dave
This version also speaks a command complete confirmation for the various tasks, such as "Command complete, water off."
Still only occupying a single slot on the BS2sx. Working with external EEPROM and multiple slots next.
I also hooked it to a good quality wireless stereo speaker system instead of the onboard speaker I've been using - voice quality even better, booms out quite clearly.
Also adding a number of security functions including voice authorization required routines, and setting the time & date by voice routines.
There are so many other things I should be doing now... :-)
Dave
I looked at the schematic for the PRB and it's nice... My circuit & program would certainly work well with it.
Dave
Maybe via PM or another thread, but I'd like to know more about this.
I have redistributed the program into three slots. The main slot runs the Speech Recognition and most of the administrative functions of the program. Slot 1 runs the Speech Generation routines. Having this in its own slot gave me a HUGE amount more EEPROM in which to store canned phrases. Currently I have 40 in there and only use about 20... Slot 2 runs the output control. It is the smallest routine going - prints on a single page - but controls 32 output lines.
Slot 0 listens for the Wake Up keyphrase "Computer", and after playing the sound effect with FREQOUT (reverse engineered from the actual Star Trek sound in mp3), listens for commands and sets various SCRAM locations, then handing control off to either slot 1 for speech-only responses, or slot 2 for relay wiggling, which then hands control to slot 1 for speaking responses related to the status of the relay and command completed messages, etc., then it returns control to slot 0 to keep listening.
It works fantastically... video forthcoming.
I will be at the MIT Technology Flea Market in Cambridge, MA tomorrow (Sunday, 5/15) getting some hardware for this project, and will be starting the PC Board design and fabrication this coming week. I hope to have this on a board by this time next week!
Anyone else know about the MIT Flea? You would not BELIEVE the incredible electronics goodies and oddities you can get there. Every kind of part known to man, and several that seem to remain unknown to all - even the sellers! More info: http://www.mitflea.com/
More soon!
Dave
I received my Asco 8210 Solenoid Valve today from Grainger. First - I was amazed at how fast I got it - I did not order overnight shipping, but I got it LESS THAN 24 HOURS from the time I ordered it!
Anyway - four pictures attached showing the solenoid valve and the connections I am making for master shutoff and bypass.
This is the item that will be operated by the "Outside Water On/Off" command. It runs on 24 VAC (options included 12vdc, 12vac, 24vac, 120vac...). It looks like a very high quality item, and the folks at my local water department (who just happened to spend the day in front of my house yesterday when the street water main ruptured!) say Asco valves are fantastic.
The valve cost $136.00.
The project is nearing completion!
Dave
DJ
Dave
More soon!
Actually I checked those out at my local Home Despot (thought I was the only one who called them that :-) ) but since this item is for actual installation in my interior home plumbing, I wanted something truly solid and reliable. When I do the exterior garden hose selector, I can use the sprinkler valves, but this master shutoff needed the Asco in order for me to feel it was a quality job :-)
Pouring here today, so maybe I can get the PC Board exposed/etched today!
Dave
You and yours ok?
More photos later, and hopefully soon, the automation system will finally get a PC board and get wired up, followed by videos.
I hope this message finds you all well and safe out there!
Dave
At the moment, I have no words other than I'm very glad you and yours are safe.
Dave
Items to note:
The BS2sx is sandwiched UNDERNEATH the V-Stamp to conserve board space. The top of the components on the BS2sx clears the bottom of the components on the V-Stamp by 1mm!
There is a long breakout header that allows access to most all pins on both the V and B stamps; but I have also included a small header specifically for the Say-It module to reside for local testing/demo.
The output from this board are the three lines that drive the 74LS595 shift registers. That will be a separate board.
The white 4-pin header immediately below the 5V regulator is the programming header (I rolled my own to conserve space - no need for big 9-pin D connectors...)
More to follow soon. Tornado cleanup is running well, and ahead of schedule - mainly because we didn't rely on FEMA or MEMA and just did most everything ourselves, rather than waiting for the slow wheels of government to creak our way! :-) They mean well, but they just aren't as nimble as a small town with determination and spirit is!
Dave
Did you layout & etch the board yourself?
Etched & drilled myself.... Fun. More later today.
Thanks for the compliment!
Dave
http://www.youtube.com/watch?v=_QjyA20mHbI&feature=youtube_gdata_player
More soon,
Dave
Schematic soon...
Dave
I'm now setting up a new program for the SayIt modules. I'm amazed at the versatility of these things, even with their limitations (speaker dependent on the user-programmed commands; very susceptible to ambient noise - the TV is always "waking up" the module and occasionally turning something on...) but by the same token, it can be programmed to switch command banks via voice commands, and even to have two different users by programming it with the default "Wake Up" command and a second one in a different user's voice that switches to command banks programmed in that user's voice, but with identical command sets to the regular user's voice. My only wish for these would be a way to make the user programmed commands to be Speaker Independent.
Anyway, here's the code as of a few days ago. Note that the initialization routine for the V-Stamp now makes the unit sound like Majel Barret (the voice of the computer system in Star Trek!) I'm such a geek...
Dave