[dorkbotpdx-blabber] Txtzyme - OneWire

5 views
Skip to first unread message

David Madden

unread,
Jun 30, 2012, 10:45:43 PM6/30/12
to A discussion list for dorkbot-pdx (portland, or)
Ward-

I was thinking of using a Teensy with Txtzyme off a GuruPlug to run my
radiant floor system. I have some OneWire themometers embedded in the
floor, plus a pump controller that requires a triac to switch things on
and off.

So I looked at using Txtzyme to talk OneWire, but I think it might be to
complex and timing-sensitive. On the other hand, Txtzyme is too simple
to do the kind of logic and looping I'd like.

When I was thinking about how to do this, I kept coming up with
Postscript or Forth-like ideas for stack manipulation in Txtzyme. Do
you have any ideas about how to extend the language that way? Or maybe
I should just implement a quick Forth or Postscript for Teensy?

Any advice?
--
Mersenne Law LLC · www.mersenne.com · +1-503-679-1671
- Small Business, Startup and Intellectual Property Law -
1500 SW First Ave. · Suite 1170 · Portland, Oregon 97201

_______________________________________________
dorkbotpdx-blabber mailing list
dorkbotpd...@dorkbot.org
http://music.columbia.edu/mailman/listinfo/dorkbotpdx-blabber

Jerry Biehler

unread,
Jun 30, 2012, 10:54:00 PM6/30/12
to A discussion list for dorkbot-pdx (portland, or)
I would juse to a solid state relay (SSR) to turn the pumps on off. Basically an optically isolated triac all in a module ready to go. Most accept 3-32v dc to turn on. Surplusgizmos has a lot of them used.

You should also look into a PID loop. It will make things more comfortable.

-Jerry

Dave Edick

unread,
Jun 30, 2012, 10:58:01 PM6/30/12
to A discussion list for dorkbot-pdx (portland, or)
Why not use one of the existing AVR Forth implementations?

http://tech.groups.yahoo.com/group/avrForth/

--
/Dave Edick/  dave....@gmail.com or da...@solderslingers.com
See http://solderslingers.com for Electronic Kits and Components.

David Madden

unread,
Jun 30, 2012, 11:09:11 PM6/30/12
to A discussion list for dorkbot-pdx (portland, or)
On 6/30/2012 19:58, Dave Edick wrote:
> Why not use one of the existing AVR Forth implementations?

Didn't know about them, but more importantly, the last time I had
anything to do with Forth was about 1985, when my roommate had one of
the original Macs and the only development setup we could get/afford was
Forth. I never really understood it very well, although I bet I could
figure it out now.

Will look into AVRForth, thanks!

Re: the triacs, I already have the pump controller with relays and all,
but it has thermostat inputs that have to be shorted to turn on a zone.
The real problem is, the thermal mass is really high, so an air
thermometer isn't very useful. You have to turn things on a couple
hours before you want the floor to be warm. So all the smarts and
computation is in polling the OneWire sensors and then figuring out
(given current temperatures) how far in advance you have to turn the
system on.

What's interesting, is looking at temperature traces as the system warms
up. You can see the floor warming up at a slow exponential, plus you
can see the water heater cycling on a much shorter time scale.

I'm switching the system from an ARM SBC that got zapped somehow last
winter, to a GuruPlug that'll have a web interface. Next winter I'll be
able to monitor the floor via the Internet!

Ward Cunningham

unread,
Jul 1, 2012, 11:46:49 AM7/1/12
to A discussion list for dorkbot-pdx (portland, or), A discussion list for dorkbot-pdx (portland, or)
I found the arduino libraries unreliable. Paul has worked them over do you could start there.

I finally read the data sheet very carefully and wrote this test code that is the basis of everything I do with onewire:

https://github.com/WardCunningham/Txtzyme/blob/master/projects/onewire/test.pl

This can be greatly simplified if you skip the device discovery logic. See get.pl for an example.

The advantage I find with Txtzyme is that the Teensy keeps no state between requests. This allows me to have multiple applications talking to multiple sensor/actuators in a web centric enviroment.

You could get your basic control running in a cron job and then do innovative analytics in cgi or sinatra.

I took this approach when I hooked my Christmas lights up to the onewire thermometer in my furnace hot air plenum.

https://github.com/WardCunningham/Txtzyme/blob/master/projects/moodlites/ReadMe.md

Best regards -- Ward

Sent from my mobile
503-432-5682

Reply all
Reply to author
Forward
0 new messages