EMIC Sound/DS1620 Digital Thermometer Help!
Gerald
Posts: 10
I'm a newbie, so apologies up front for asking questions with obvious (to everyone but me) answers.
I have an EMIC text to sound module and a DS1620 IC.· I also have a Homework Board and a Boad of Education along with some experimenter breadboards.·
I've assembled both modules separately up till now but would like to combine the modules on a single breadboard with the ultimate goal of having the EMIC module announce the temperature.
My first task is to combine the circuitry on one board.· Is this a simple matter of combining the two modules using the attached diagrams on one board?· I notice that both share pin P0.· Is this a problem?· My goal, of course, is to combine the two on one board safely so I don't zap any components.
I'll then try to tackle the programming issues which I will obviously need some help with here.·
Is there any documentation that has already been developed to accomplish this project? I'm aware of the "DS1302 Real Time Clock with SX Video module display modification"·project in the project forum, but it's a bit too daunting for me to make the translation.
Any help would be greatly appreciated.
Thanks in advance,
Gerald
Amateur Radio Operator KD4EQZ
I have an EMIC text to sound module and a DS1620 IC.· I also have a Homework Board and a Boad of Education along with some experimenter breadboards.·
I've assembled both modules separately up till now but would like to combine the modules on a single breadboard with the ultimate goal of having the EMIC module announce the temperature.
My first task is to combine the circuitry on one board.· Is this a simple matter of combining the two modules using the attached diagrams on one board?· I notice that both share pin P0.· Is this a problem?· My goal, of course, is to combine the two on one board safely so I don't zap any components.
I'll then try to tackle the programming issues which I will obviously need some help with here.·
Is there any documentation that has already been developed to accomplish this project? I'm aware of the "DS1302 Real Time Clock with SX Video module display modification"·project in the project forum, but it's a bit too daunting for me to make the translation.
Any help would be greatly appreciated.
Thanks in advance,
Gerald
Amateur Radio Operator KD4EQZ
Comments
1. Using the DS1620 example code, build the circuit as described and get that working. Then move the speaker to a different I/O pin, for example 12, and modify the program so it works like the original. You didn't post any of the code, or a link to it, so your on your own in that respect.
2. Leave all of the DS1620 stuff connected and move on to the EMIC module. Connect this up and get the EMIC only code to work.
3. Now that you have both separate programs working, now comes the task of merging the two code chunks together in a way that you want the project to work.
Mike
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"OEM NMEA GPS Module" Now available on ebay for only $19.99
Product web site: http://www.allsurplus.net/Axiom/
http://www.parallax.com/dl/docs/prod/stamps/pbasicstyle.pdf
Also remember that too many comments are better than none. I usually comment every line of my code as a "proof reading" exercise, this usually points out bone headed mistakes so I can make corrections if I'm having difficulties making something work.
Mike
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"OEM NMEA GPS Module" Now available on ebay for only $19.99
Product web site: http://www.allsurplus.net/Axiom/
Thanks for your suggestions.
Yes, I'm intend to start with the code for the EMIC module here: http://www.parallax.com/dl/src/prod/3rd/EasyEmic.BS2
and the code found on page 17 of the Applied Sensors student guide here:
http://www.parallax.com/dl/docs/books/edu/AppliedSensors1_3.pdf
I'll update my progress.
Thanks,
Gerald
Here's my progress so far.· I have repositioned each component (EMIC TTS and DS1620) on to two separate breadboards.· I have attached diagrams of the wiring showing the connections to the BS2.· Each of these two components are working correctly, when run separately, using the programs referenced in a previous post.
Now, I will try to merge the two components on to a single breadboad.
Mike, when you say "move the speaker to a different I/O pin, for example 12, and modify the program so it works like the original" are you referring to the EMIC speaker or the DS1620 Piezo "speaker"?· I assume you mean the piezo.
Thanks,
Gerald
Mike
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"OEM NMEA GPS Module" Now available on ebay for only $19.99
Product web site: http://www.allsurplus.net/Axiom/
When I run the sample program found on page 17 of the Applied Sensors (Student Manual), everything works OK.
Also, when I run the Simple Code Example found here http://www.parallax.com/dl/src/prod/3rd/EasyEmic.BS2, it runs OK.
I have next tried to get both the EMIC module and the DS1620 to work within one program.· So, I combined some code (I know--a dangerous thing to do). See attached as EMICDS1620.bs2.
What I was trying to achieve at this step was this:
1: have the EMIC say, "Hello, Gerald, hear me roar".
2: have the DS1620 display the temperature.
I get #2 ok but not #1.
Thanks for any help and for your patience with a newbie!
Gerald
Mike
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"OEM NMEA GPS Module" Now available on ebay for only $19.99
Product web site: http://www.allsurplus.net/Axiom/
Post Edited (Mike Cook) : 11/23/2005 12:45:49 AM GMT
Your code corrections worked perfectly.· I will study up on OUTS, INS, DIRS, etc. It's pretty hard reading for me at this point, but important.
I can now reliably run both modules on the same breadboard and from the same code.
From all the sample EMIC BS2 programs I've looked at so far, the programmer stores all the possible·text to be generated as DATA·in EEPROM and then retrieves it when needed.· For example:
At some appropriate point in the code, the ASCII phrases, etc. are retrieved for EMIC as in the following subroutine Say_String:
Thus far, I've not seen any examples of using EMIC to speak text which changes constantly such as reading a news or stock ticker.· In the case of temperature, the variables which I have created (degC, degFA, and degFB) cannot be pronounced using the SEROUT Tx, Baud, [noparse][[/noparse]Say, "The temperature is...", EOM] syntax.· It would not make sense here to pre-store all the possible degrees for later retrieval since EMIC can already pronounce "57", "72", etc.
So, it would seem to me that my code would need to derive the temperature from DS1620 and store that value as the temperature variable in EEPROM.··That variable would then be retrieved as in the above example (Say_String[noparse]:)[/noparse] for EMIC.· Am I heading in the right direction here?
Also, I will wait until later the problem of which temperature formula to settle on. Right now I have not solved the problem of fractional degrees either.· The code I'm using only shows temperature in whole numbers.
Any hints for me would be greatly appreciated.
Thanks,
Gerald
http://forums.parallax.com/showthread.php?p=464293
http://forums.parallax.com/showthread.php?p=464383
http://www.parallax.com/dl/docs/cols/nv/vol5/col/nv108.pdf
Now I would convert the DS1620 & EMIC into subroutines, this will make your main program loop simpler and also makes for code that is re-usable in other programs that use these items. Not to harp on the subject but give this a good read:
http://www.parallax.com/dl/docs/prod/stamps/pbasicstyle.pdf
I know it does not seem real important now but if you get into the habit of using these techniques it will make life easier later on when your debugging a complicated program.
Mike
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"OEM NMEA GPS Module" Now available on ebay for only $19.99
Product web site: http://www.allsurplus.net/Axiom/
Post Edited (Mike Cook) : 11/23/2005 12:54:39 PM GMT
The EMIC will "do it's thing"...speak the phrase which might be 25 to 30 seconds long, depending on the length of the·sentance data·you have sent to it.
The stamp on the other hand will continue running it's program doing other things while the EMIC is speaking...so don't have the stamp send the EMIC anymore sentence data until the EMIC is finished speaking what you have sent to it, or it will miss it.
Be careful and don't get lost in setting up your DATA statements by mixing up the EEPROM address and the label for that address other wise you will speak the wrong sentancek or number.·
If you are going to send the EMIC individual numbers for the correct temp, "build the whole sentance first then send it out to the EMIC serially.· It will sound better then sending one number/number/"point"(deciamal)/number at a time to the EMIC
.
My two cents worth....\
deno
I also just discovered this bit of code from Mike's references that will alleviate the EEPROM DATA writes:
SEROUT Tx, Baud, [noparse][[/noparse]Say, "The temperature is ", DEC degFB," degrees Farenheit.", EOM
I didn't know the syntax well enough to realize that you could concatenate stuff like this.
Now, I'm working on computing/displaying/saying the fractional portion of the temperature calculation. I will also work on subroutines as Mike suggested and post my updated *.BS2 program soon.
Any references here to how to compute the temperature to the nearest 10th would be helpful.
Thus far my code for temperature calculations with the DS1620 are:
degC = x / 2····························· ' Convert the data to degrees C.··
degFA = degC * 9 / 5 + 32················ ' Convert the data to degrees F formula A.
degFB = x * 9 / 10 + 32·················· ' Convert the data to degrees F formula B.
Formula B seems to give a better temperature resolution than Formula A.
Thanks All,
Gerald
http://forums.parallax.com/showthread.php?p=548617
Check out Tracy's web site:
www.emesystems.com
He has some valuable information there for measurements and other techniques for the Basic Stamp.
Mike
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"OEM NMEA GPS Module" Now available on ebay for only $19.99
Product web site: http://www.allsurplus.net/Axiom/
These are great resources! What I really need to do is start with page 1 of "What is a Microcomputer." As you can imagine, my enthusiasm to do something "big" or "real" overtook my being a novice. Anyway, I'm having fun and learning a lot.
Thanks,
Gerald
Wanting to get something "real" accomplished without learning the basics first is probably one of the most prevalent of the hacker mentality traits, but it sounds like you have acquired the "wisdom" necessary to continue in this glorious hobby.
You may pass :^)
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Truly Understand the Fundamentals and the Path will be so much easier...
Post Edited (Tom Walker) : 11/23/2005 7:39:12 PM GMT
Here is some code I found at www.emesystems.com which displays degrees C to two decimal places using the DS1620.··
I'd like it to be able to show degrees Farenheit to two decimal places.·
Any help here would be greatly appreciated.
Thanks,
Gerald
' enter with degC a twos complement number from -4000 to +12380
' representing temperatures from -40.00 to +123.80 degrees Celsius
degC=degC + 4000 ' add an offset to make the number positive
degF = degC ** 52429 + degC + 3200 - 7200 ' convert to Fahrenheit
degC = degC - 4000 ' restore Celsius if necessary
DEBUG TAB,REP "-"\degF.BIT15,DEC ABS degF/100,".",DEC2 ABS degF
Why that funny formula? The formula works on positive numbers, so adding 4000 to degC and at the end subtracting 7200 from degF makes the offset and then restores it, so degC and degF are both twos complement numbers that can report negative temperatures. Note that 7200 = 4000 * 9/5.
The operation **52429 is also a way to multiply by 0.8. What the **52429 does internally is multiply times the fraction 52429/65536, which is the same as 0.8. Then adding in degC again makes it 1.8, which is the conversion ratio for C to F.
Be sure to follow the instructions in the program. The DS1620 has to be configured for single shot operation, and you have to cycle the power for the configuration to take effect. Once in that mode it will stay there, because the configuration is stored in eeprom.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tracy Allen
www.emesystems.com
Gerald
I am attaching the final code. Temperature in C and F is announced to two decimal places.
Previously, I posted diagrams of the DS1620 and EMIC breadboard wiring.
It works!
Gerald (KD4EQZ)