1 wire & RISC OS
jeff (2534) 2 posts |
can RISCOS manipulate the io pins accurately enough for 1 wire devices, or have i missed a posting ? |
Neil Fazakerley (464) 124 posts |
Which devices did you have in mind? Most things are possible outside the desktop as BBC Basic makes a near realtime OS when single tasking. |
Dave Higton (1515) 3526 posts |
I just skimmed the Wikipedia article on 1-wire and noticed a link to an article on how to control a 1-wire bus with a UART. Very clever – I wish I’d thought of that as a method. It pretty much takes the real-time requirement away from software and puts it into hardware that something like a Raspberry Pi already has – give or take the odd pull-up resistor and diode. |
Rick Murray (539) 13840 posts |
Now there’s a clever hack. |
Steve Pampling (1551) 8170 posts |
Dave will now disappear for a while to work on a home alarm and heating control system based on a Pi. |
Dave Higton (1515) 3526 posts |
My heating control system has been based on a Pi for a few years now. It used to be run by an A3010 (some of you may remember the original Drobe article, which was Slashdotted and brought the site down). More recently the original A3010 died and was replaced by a spare, which provoked me to re-engineer the system to use a more modern computer. Later I added control from the Internet via a browser. Recently I added voice control via Alexa, and (more usefully) via a mobile phone. |
John Hogg (3893) 40 posts |
Dave did you ever get anywhere with risc OS one wire on risc OS Rpi??? Gonna do the smart thermometer thing on RPI as a project and program a controller app then upgrade to more and more clever system bringing in change in temps, outside temp and other bits. To get going though need to find out about how can go about using 1-wire on Rpi with risc OS. Cheers ;) |
Dave Higton (1515) 3526 posts |
It’s not something I ever tried. I responded above because I’ve been an electronics engineer (and computer programmer) all my professional life, so I understand the principle of how 1-wire communication works with a UART, and I thought it’s very clever. I’m on my second heating control system now. The first was just a clever on/off system with a conventional thermostat. I was going to replace the mechanical thermostat with an electronic one, but we moved house before I got round to it, and the new owners wanted to keep my controller. The new one is based on Max thermostatic valves, communicating by radio with a Max Cube LAN gateway. Each thermostatic valve is a temperature control system in its own right, with its own sensor, so I don’t need to add any sensors of my own. All my control system has to do is send commands to the valves to alter their set points according to a weekly timetable, so as to implement a temperature profile for each room; then turn the heating circuit and fire up the boiler according to the valve openings, which they communicate back via the Cube. So I don’t have any experience to offer, I’m afraid. Sorry. |
John Hogg (3893) 40 posts |
Looks like UART is a go for me… Seems very clever and very workable… Rpi uart is already useable in risc OS and the tutorial and source code for how it was implemented in posix looks like it should be quite achiveable this way and actually smarter than os 1-wire support. My final goal is actually smart TVR’s as there are ones that work on z-max protocol use same rf freq as the Rpi rf module. So hope right at end i may be able to have full zone system that can even come on for a single room if it gets too far out of requested temp for that room. Or come on downstairs more often than upstairs etc. |
Chris Johns (3727) 40 posts |
Using a Risc OS heating system is something that’s on my list of things to do! |
John Hogg (3893) 40 posts |
Chris check my other post about attracting users and learning programming… Looks like talked myself into a project and series of articles to follow. Looks like the serial UART method is a great way to get 1-wire data with risc OS and guess it means other risc OS machines can get access to 1-wire too. Start will be thermostat, relay, Rpi and the program up a simple program to control the heating and display temp. This will then be added to for things like controlling remotely. Next will be getting it to bring in things like time, outside temp, wind speed and direction and are if can’t use the info to get it to learn and adjust its behaviours smartly (maybe also include time from heating on to change in temp upwards and time after goes off for drop to start in data as well. Last bit which may end up pie in the sky but fingers crossed. There are 6ghz rf devices for Rpi and z-wave smart TVR’s use same 6ghz Rf. So if can get at info as to what is sent to and from the thermostats i can pick up individual room temps and even create a zoned system where if one room gets too far below temp it can come on just for that room. Anyway won a Rpi from raspberry pie competition so have a dedicated risc OS one for project and am going to order the temp sensor and other bits. You even get one wire light sensors and other stuff so could maybe even bring in smart lighting and even some sockets (you can buy 6ghz Rf controlled socket things as well. May be poss to build to a really reliable full automation system for the diy electronics and programming sorts. And I’ll bet i can produce a much better learning system than any expensive Honeywell etc learning system. |