Search found 983 matches

by basicchip
Mon Nov 11, 2019 10:07 pm
Forum: Projects
Topic: DIY WiFi Programmable Thermostat
Replies: 41
Views: 25553

Re: DIY WiFi Programmable Thermostat

OK, I've seen all the pieces work including WiFi, though in the long run I should program that in Lua and load onto the ESP8266. Right now it just checks the time from my timer server on the Coridium web site. I am not sure how I will record data there, but it could easily query a web page to read a...
by basicchip
Mon Nov 04, 2019 3:24 pm
Forum: Projects
Topic: DIY WiFi Programmable Thermostat
Replies: 41
Views: 25553

Re: DIY WiFi Programmable Thermostat

Another word on switch debounce. Turns out the code works fine for 1 switch, but the other must have some contamination, as it goes high and low while holding it down. Probably sloppy solder / cleaning technique on my part. A good reason to place switches last when building boards by hand. many swit...
by basicchip
Mon Nov 04, 2019 2:04 pm
Forum: Software issues
Topic: ArmBASIC - contact debouncing
Replies: 7
Views: 1620

Re: ArmBASIC - contact debouncing

For my thermostat project, I wrote some interrupt code to debounce buttons.

viewtopic.php?f=4&t=995&start=30#p4423

Works great for 1 button, the other button was bad, will have to replace it, that bad button was changing state while I was holding it down.
by basicchip
Mon Nov 04, 2019 3:38 am
Forum: Projects
Topic: DIY WiFi Programmable Thermostat
Replies: 41
Views: 25553

Re: DIY WiFi Programmable Thermostat

And here is some initial code to put the CPU to sleep not turning off the oscillators as that cuts the connection to the PC, and need that for debugging for now ST_CTRL = 5 ' disable systick interrupt SYSCON_MAINCLKSEL = 0 'switch to IRC clock SYSCON_MAINCLKUEN = 0 ' SYSCON_MAINCLKUEN = 1 'enable sw...
by basicchip
Mon Nov 04, 2019 3:36 am
Forum: Projects
Topic: DIY WiFi Programmable Thermostat
Replies: 41
Views: 25553

Re: DIY WiFi Programmable Thermostat

And now working on the buttons, here is some code that is handling the buttons using GPIO interrupts. Basically debounce is done by ignoring changes during the debounce time. ''''''''''''''''''''''''''''''''''' UP / DOWN interrupts ''''''''''''''''''''''''''' ' ' #define DEBUG_BUTTONS #define Deboun...
by basicchip
Mon Nov 04, 2019 12:25 am
Forum: Projects
Topic: DIY WiFi Programmable Thermostat
Replies: 41
Views: 25553

Re: DIY WiFi Programmable Thermostat

Doing some power testing, yes I have a short attention span. I tried running the ESP8266 from the incoming 24VAC switcher, but that way it draws about 20 mA from 24 VAC, which might trigger the heat system to come on. So back to the battery for that. As the WiFi takes up to 250 mA, it determines the...
by basicchip
Sun Nov 03, 2019 5:32 pm
Forum: Projects
Topic: DIY WiFi Programmable Thermostat
Replies: 41
Views: 25553

Re: DIY WiFi Programmable Thermostat

Working through all the functions smoke test - 24V AC supply OK temp sense OK LCD OK backlight control OK charge enable OK battery sense OK -- after I remembered the 24V AC needed to be there for that to work heat request OK Now on to writing code for switch debounce and function. Then check out WiF...
by basicchip
Fri Nov 01, 2019 3:54 am
Forum: Kitchen sink
Topic: WAIT in a MultiTasking program
Replies: 3
Views: 1070

Re: WAIT in a MultiTasking program

Also in the multitask setup, the task switch can occur in the middle of the WAIT or WAITMICRO. So unless you disable the task switch interrupt, all you can guarantee is that the WAIT will be at least the time requested.
by basicchip
Thu Oct 31, 2019 9:26 pm
Forum: Projects
Topic: DIY WiFi Programmable Thermostat
Replies: 41
Views: 25553

Re: DIY WiFi Programmable Thermostat

Making progress on firmware including LM71 and Newhaven character LCD display which uses an ST7066 Here is that test code ' Drive NewHaven LCD ' ' 4-bit Initialization -- interface uses GPIO 15-8 (except 12 #define E IO(13) #define R_W IO(14) #define PortD_I IO(15) #define DATA_ALLIGNED 1 ' set to 1...
by basicchip
Wed Oct 30, 2019 10:39 pm
Forum: Projects
Topic: DIY WiFi Programmable Thermostat
Replies: 41
Views: 25553

Re: DIY WiFi Programmable Thermostat

It's winter so time to finish this project. Got the boards back, picture on the blog. https://www.coridium.us/coridium/blog/time-for-software After finding a mis-labeled pin the temperature measurement is working. I chose a digital temp sensor the LM71. Happy that I did as it has 14 bit accuracy vs ...