Author Topic: Reliable Embedded CPU  (Read 1544 times)

0 Members and 1 Guest are viewing this topic.

Offline gnuarm

  • Frequent Contributor
  • **
  • Posts: 941
  • Country: aq
Reliable Embedded CPU
« on: April 27, 2021, 05:36:28 am »
I have an AC power switch to control various devices and would like to use a few more, but they seem to be other than 100% reliable.  The one I'm using does on occasion seem to lose it's clock setting or something, so that it mucks up the times it's supposed to turn on and off.  The UI is not bad, but it gives no visibility into figuring out what might be wrong.  So I'm thinking of rolling my own. 

I would prefer to use an off the shelf device like an rPi or ESPxxxx or similar, but I have no idea how robust they are.  I don't want to jump from the frying pan into the fire.  Anyone have enough experience to say which embedded unit with wifi would be reliable enough to run for a year or two without getting bollixed up?  It doesn't need a battery backup, but does need some form of non-volatile storage for the settings.  I guess I would be concerned about an SD card being messed up on power failures. 

The nice thing about the power switch I'm using is the power measurement, although I've never measured the accuracy of it.  I've got a Fluke power meter.  I should calibrate it sometime.  I might take it apart to check out the design.
Rick C.
  - Get 1,000 miles of free Supercharging
  - Tesla referral code - https://ts.la/richard11209
 

Online brucehoult

  • Super Contributor
  • ***
  • Posts: 2254
  • Country: nz
  • Formerly SiFive, Samsung R&D
Re: Reliable Embedded CPU
« Reply #1 on: April 27, 2021, 12:36:11 pm »
I don't understand what you're asking for.

A Raspberry Pi is not a power switch.

What do you need WIFI for? I don't think I'd trust any WIFI or BlueTooth stack to be bug-free. Ethernet, maybe.

If you need reliable then the simpler the better.

Reliability can to some extent be increased by a regular program of rebooting or, better, power cycling.

The hardware is almost never the problem.
 

Online oPossum

  • Super Contributor
  • ***
  • Posts: 1227
  • Country: us
  • The other white meat.
Re: Reliable Embedded CPU
« Reply #2 on: April 27, 2021, 12:39:22 pm »
 
The following users thanked this post: WattsThat

Offline gnuarm

  • Frequent Contributor
  • **
  • Posts: 941
  • Country: aq
Re: Reliable Embedded CPU
« Reply #3 on: April 27, 2021, 02:26:49 pm »
I don't understand what you're asking for.

A Raspberry Pi is not a power switch.

What do you need WIFI for? I don't think I'd trust any WIFI or BlueTooth stack to be bug-free. Ethernet, maybe.

If you need reliable then the simpler the better.

Reliability can to some extent be increased by a regular program of rebooting or, better, power cycling.

The hardware is almost never the problem.

Yes, I don't expect the hardware is the problem, but that is not certain.  A device that plugs into a wall outlet must be tolerant of power spikes as well as simply working 100%.  There's no small percentage of low cost, embedded devices that simply don't stay running any better than a Windows 95 computer simply because the hardware is not 100%.

This is the sort of thing I'm looking to replace.

https://www.amazon.com/s?i=tools&k=Wi-Fi%20Smart%20Plug&ref=nb_sb_noss_2&url=search-alias%3Dtools
Rick C.
  - Get 1,000 miles of free Supercharging
  - Tesla referral code - https://ts.la/richard11209
 

Offline gnuarm

  • Frequent Contributor
  • **
  • Posts: 941
  • Country: aq
Re: Reliable Embedded CPU
« Reply #4 on: April 27, 2021, 02:27:31 pm »
https://sonoff.tech/

Interesting.  I wasn't looking to hard wire it in, but that's an option.
Rick C.
  - Get 1,000 miles of free Supercharging
  - Tesla referral code - https://ts.la/richard11209
 

Offline langwadt

  • Super Contributor
  • ***
  • Posts: 2491
  • Country: dk
Re: Reliable Embedded CPU
« Reply #5 on: April 27, 2021, 02:32:37 pm »
https://sonoff.tech/

Interesting.  I wasn't looking to hard wire it in, but that's an option.

they also have plugs, https://sonoff.tech/product/smart-plug/s31-s31lite/

very cheap and they use an ESP so you can do your own software if you feel adventurous


 

Online oPossum

  • Super Contributor
  • ***
  • Posts: 1227
  • Country: us
  • The other white meat.
Re: Reliable Embedded CPU
« Reply #6 on: April 27, 2021, 02:33:35 pm »
https://sonoff.tech/

Interesting.  I wasn't looking to hard wire it in, but that's an option.

They have "smart plug" type products. I can't provide a direct link due to the poor design of their web site.
 

Offline dunkemhigh

  • Super Contributor
  • ***
  • Posts: 2890
Re: Reliable Embedded CPU
« Reply #7 on: April 27, 2021, 03:49:38 pm »
The control you have, if it's a cloudy smart switch, is likely OK and the problem is elsewhere. We have quite a few of these and they would sometimes fail by falling offline, but over time the firmware updates fixed those and they are not all reliable. We did have some timer issues,  but I worked out that they were either user errors (mostly down to not-quite-intuitive user interface) or cloud issues (although these are pretty rare now, providing the intertubes is working).

I would suggest going for the Sonoff smart plugs , like the S26 (at Amazon) which you can use the ewelink app to control. The useful thing is that if the cloud connection drops you can still control this via the LAN, albeit only to turn on and off rather than set timers.

However, for your requirements you can go further and replace the firmware so you can then tie the sockets into OpenHAB and similar. They are ESP based, so feasibly it is reasonably trivial to write your own firmware and program however the hell you like if the whim takes you.

The Sonoffs are proven designs and would save you making your own mistakes en route to a reliable switch, plus have all the awkward parts already done (like the housing, plug prongs, etc).
 

Offline gnuarm

  • Frequent Contributor
  • **
  • Posts: 941
  • Country: aq
Re: Reliable Embedded CPU
« Reply #8 on: April 27, 2021, 04:00:45 pm »
https://sonoff.tech/

Interesting.  I wasn't looking to hard wire it in, but that's an option.

they also have plugs, https://sonoff.tech/product/smart-plug/s31-s31lite/

very cheap and they use an ESP so you can do your own software if you feel adventurous

I've ordered a couple of the S31 with the energy measuring feature.  We'll see how good they are.  My Ankuoo unit seems to be working... opps, "unit has been reset and is no longer under control".  That's the sort of crap I'm talking about. 
Rick C.
  - Get 1,000 miles of free Supercharging
  - Tesla referral code - https://ts.la/richard11209
 

Offline gnuarm

  • Frequent Contributor
  • **
  • Posts: 941
  • Country: aq
Re: Reliable Embedded CPU
« Reply #9 on: April 27, 2021, 04:02:04 pm »
https://sonoff.tech/

Interesting.  I wasn't looking to hard wire it in, but that's an option.

They have "smart plug" type products. I can't provide a direct link due to the poor design of their web site.

Yeah, if you think that's a bad one, try using the Tesla site to find any info.  It's all color glossies like ads in a magazine.  I'm sure there's fine print somewhere.
Rick C.
  - Get 1,000 miles of free Supercharging
  - Tesla referral code - https://ts.la/richard11209
 

Offline ralphrmartin

  • Frequent Contributor
  • **
  • Posts: 409
  • Country: gb
    • Me
Re: Reliable Embedded CPU
« Reply #10 on: April 27, 2021, 05:48:56 pm »
You can always install the open source Tasmota firmware on the sonoff devices, so you are not reliant on their cloud.
https://tasmota.github.io/docs/
 

Offline gnuarm

  • Frequent Contributor
  • **
  • Posts: 941
  • Country: aq
Re: Reliable Embedded CPU
« Reply #11 on: April 27, 2021, 06:33:59 pm »
One of the things I'd like to do down the road is to add a relay to control a 240V device such as a water heater or an EV.  I have ToU billing on my electric and the Tesla can't deal with the concept properly.  They claim to have an awareness of ToU, but it is very, very limited and doesn't work as you would expect.  Very odd for such a high tech company to be so lame when it comes to this issue.  In the Tesla forums they say it may suck, but it sucks less than other EVs.  lol!
Rick C.
  - Get 1,000 miles of free Supercharging
  - Tesla referral code - https://ts.la/richard11209
 

Online brucehoult

  • Super Contributor
  • ***
  • Posts: 2254
  • Country: nz
  • Formerly SiFive, Samsung R&D
Re: Reliable Embedded CPU
« Reply #12 on: April 28, 2021, 12:15:32 am »
One of the things I'd like to do down the road is to add a relay to control a 240V device such as a water heater or an EV.  I have ToU billing on my electric and the Tesla can't deal with the concept properly.  They claim to have an awareness of ToU, but it is very, very limited and doesn't work as you would expect.  Very odd for such a high tech company to be so lame when it comes to this issue.  In the Tesla forums they say it may suck, but it sucks less than other EVs.  lol!

About ten years ago I used some of these remote control 240V outlets to control my hot water heater, 2400W oil column heater, and a great big fan directed at the heater.

https://www.jaycar.co.nz/remote-controlled-3-outlet-mains-controller/p/MS6147

I used an Arduino Uno to schedule and control it all, and run PID control for the heater (using a thermistor on a shield daughterboard I made myself). With 100x a second analogRead() and exponential averaging with a few second time constant I got very smooth and reliable temperature sensing to 0.01 C resolution. I was able to make any reasonable temperature change (up to a couple of degrees C) in the room in about 20 minutes (twice the thermal constant of the heater) accurately and without significant overshoot. I was just turning the heater on and off on a 30 second interval.

These outlets are controlled on 433 MHz. It's one-way and sometimes (about once a day) there would be radio noise at the same moment so the command will be missed. I just sent the command for the current desired state every 30 seconds so if one was missed it was no big deal. Not receiving two commands in a row was extremely rare.

At first I hacked the supplied remote to fake pressing the buttons, but after a couple of months I reversed engineered the protocol and switched to using a $3 433 MHz transmitter board from dealextreme, which I added to my protoboard.

I used this system every winter for four or five years until I moved from NZ to Moscow. My winter heating bill went down NZ$500 compared to my previous controlling the heater with a Honeywell mechanical thermostat AND the comfort level improved a lot because I was getting 0.05 C temperature swings (up to 0.2 C with a big transient such as starting cooking or stopping cooking in the same open-plan area), instead of 2 C with the Honeywell.

The Honeywell itself had been a huge improvement, 15 years earlier, over manual control of the heater, or using a heater's built in thermostat.

Sigh. And in the rented house I'm in since June, temperature control is adding another log to the wood fire, or not, or stirring what's already in it. Electricity now (at least in this remote region) is 40 c/kWh, vs 18-20 c/kWh in Wellington in 2010-2015 before I went overseas for five years. And there is an abundance of cheap firewood.
« Last Edit: April 28, 2021, 12:23:09 am by brucehoult »
 

Offline gnuarm

  • Frequent Contributor
  • **
  • Posts: 941
  • Country: aq
Re: Reliable Embedded CPU
« Reply #13 on: April 28, 2021, 03:09:26 am »
Interesting, but that device is only rated for 10 amps and my water heater circuit breaker is 30 amps and the present heater (30 years old) has been measured at 18 amps.  Ideally it would be a 50 amp device so that it could be connected to control any device in the panel.  That's why I'm thinking a home brew device at one level or another, would be good.  50 amp relays are a lot more money than 30 amp units for some reason.  That's probably why it's hard to find higher current switches.  But I can always find a relay. 

Did your Arduino keep good time?  How did you deal with power fluctuations?  Did you need to reset the clock on power glitches and outages?
Rick C.
  - Get 1,000 miles of free Supercharging
  - Tesla referral code - https://ts.la/richard11209
 

Online brucehoult

  • Super Contributor
  • ***
  • Posts: 2254
  • Country: nz
  • Formerly SiFive, Samsung R&D
Re: Reliable Embedded CPU
« Reply #14 on: April 28, 2021, 01:42:43 pm »
Interesting, but that device is only rated for 10 amps and my water heater circuit breaker is 30 amps and the present heater (30 years old) has been measured at 18 amps.  Ideally it would be a 50 amp device so that it could be connected to control any device in the panel.  That's why I'm thinking a home brew device at one level or another, would be good.  50 amp relays are a lot more money than 30 amp units for some reason.  That's probably why it's hard to find higher current switches.  But I can always find a relay. 

Did your Arduino keep good time?  How did you deal with power fluctuations?  Did you need to reset the clock on power glitches and outages?

Power outages or glitches are *extremely* rare in the city in NZ, certainly anywhere with underground cables. Much much better than I experienced when I lived in California.

The Arduino kept as good time as a typical digital watch once I checked how many seconds a day it was gaining or losing and put in compensation. Probably it would vary with temperature, but the whole purpose of the device was to maintain a steady temperature in the room, so ...
 

Offline gnuarm

  • Frequent Contributor
  • **
  • Posts: 941
  • Country: aq
Re: Reliable Embedded CPU
« Reply #15 on: April 28, 2021, 04:08:30 pm »
Power glitches may be minimal for you, but that's not true for people in general.  Once the unit is power cycled and on some regular period the device has to set the time to stay accurate.  Even my PC reaches out over the Internet to set it's clock.  Without that (as well as cleanly recovering from power issues, the short ones can be the worst) any sort of timing device requires manual setting which is what I want to avoid. 
Rick C.
  - Get 1,000 miles of free Supercharging
  - Tesla referral code - https://ts.la/richard11209
 

Offline ralphrmartin

  • Frequent Contributor
  • **
  • Posts: 409
  • Country: gb
    • Me
Re: Reliable Embedded CPU
« Reply #16 on: April 28, 2021, 05:23:56 pm »
One issue with sonoff's own software is it is not aware of summer time, which was my initial motivation for reflashing with Tasmota.There are various tasmota options for how to set set state after a power up.
 

Offline Doctorandus_P

  • Super Contributor
  • ***
  • Posts: 1600
  • Country: nl
Re: Reliable Embedded CPU
« Reply #17 on: April 29, 2021, 04:51:42 pm »
I would also go with the SonOff switches for relatively low power stuff, and re-flash the ESP8266 with custom firmware, as there is no chance I will let such a firm on my WiFi. (I would also set up a separate Wifi Network just for controlling stuff like this. Maybe I'm paranoid).

Swiches like the SonOff S20 are very cheap compared to what they do, and they also have a nice enclosure for that little money.

But for 30A loads that get switched often I would not call them suitable, and would use bigger relays or contactors, and probably also a power supply with extra filtering to improve reliability near switching such high loads.
 

Offline gnuarm

  • Frequent Contributor
  • **
  • Posts: 941
  • Country: aq
Re: Reliable Embedded CPU
« Reply #18 on: April 30, 2021, 02:26:08 am »
One issue with sonoff's own software is it is not aware of summer time, which was my initial motivation for reflashing with Tasmota.There are various tasmota options for how to set set state after a power up.

Yeah, it would seem to be simple to set times, but time actually has many confusion factors.  Summer time is just one.  I am looking at moving to Puerto Rico which is an hour east of where I am now.  However, while we are on summer time since Puerto Rico does not do that, we are the same time.  Huzzah! 

I think it may have been the summer time change here that whacked out my Ankuoo.  Seems to be working now.  Maybe it was me.  I have 8 months before I deal with that again.
Rick C.
  - Get 1,000 miles of free Supercharging
  - Tesla referral code - https://ts.la/richard11209
 

Offline gnuarm

  • Frequent Contributor
  • **
  • Posts: 941
  • Country: aq
Re: Reliable Embedded CPU
« Reply #19 on: April 30, 2021, 02:35:10 am »
I would also go with the SonOff switches for relatively low power stuff, and re-flash the ESP8266 with custom firmware, as there is no chance I will let such a firm on my WiFi. (I would also set up a separate Wifi Network just for controlling stuff like this. Maybe I'm paranoid).

Swiches like the SonOff S20 are very cheap compared to what they do, and they also have a nice enclosure for that little money.

But for 30A loads that get switched often I would not call them suitable, and would use bigger relays or contactors, and probably also a power supply with extra filtering to improve reliability near switching such high loads.

I didn't see any SonOff that are rated for 30 amps, so yeah, a relay is required.  But I don't know what you mean about "a power supply...".  These devices use 120 VAC or 240VAC.  What power supply???

I do wish they had a selection guide rather than just pictures and names.  I hate browsing web pages that are just glossy ads with minimal information content. 
Rick C.
  - Get 1,000 miles of free Supercharging
  - Tesla referral code - https://ts.la/richard11209
 

Offline dunkemhigh

  • Super Contributor
  • ***
  • Posts: 2890
Re: Reliable Embedded CPU
« Reply #20 on: April 30, 2021, 12:45:47 pm »
Quote
I do wish they had a selection guide rather than just pictures and names.

Got to the bottom of this page (right at the bottom) and there's a table of them all saying what they do:

https://www.itead.cc/sonoff-sv.html

I think that table is attached to all the Sonoff pages at Itead; the one I post is just a random one I dropped on.
 

Offline gnuarm

  • Frequent Contributor
  • **
  • Posts: 941
  • Country: aq
Re: Reliable Embedded CPU
« Reply #21 on: April 30, 2021, 02:56:33 pm »
Quote
I do wish they had a selection guide rather than just pictures and names.

Got to the bottom of this page (right at the bottom) and there's a table of them all saying what they do:

https://www.itead.cc/sonoff-sv.html

I think that table is attached to all the Sonoff pages at Itead; the one I post is just a random one I dropped on.

Thanks, that is very useful.  They have R2 versions of some devices which seem to add more software features.  I wonder why they still sell the lesser versions?  In the case of the Sonoff Pow the R2 version is also much smaller, so maybe the specs are not so accurate. 

I've ordered a couple of the S31 smart plugs to start playing with.  I don't have any time to muck with this stuff at the moment, but we'll see how it goes.
Rick C.
  - Get 1,000 miles of free Supercharging
  - Tesla referral code - https://ts.la/richard11209
 

Offline gnuarm

  • Frequent Contributor
  • **
  • Posts: 941
  • Country: aq
Re: Reliable Embedded CPU
« Reply #22 on: May 15, 2021, 06:10:56 am »
I bought a couple of the Sonoff switched outlets that measure the power consumption and I am not at all impressed with the user interface.  The Ankuoo interface is better and it's not all that great. 

I guess I'll work on installing the open source stuff.
Rick C.
  - Get 1,000 miles of free Supercharging
  - Tesla referral code - https://ts.la/richard11209
 

Offline james_s

  • Super Contributor
  • ***
  • Posts: 15208
  • Country: us
Re: Reliable Embedded CPU
« Reply #23 on: May 15, 2021, 06:31:03 am »
I have dozens of Sonoff devices, they're quite good and have been reliable so far. I never even tried the stock firmware though so I can't comment on that, it requires their cloud backend to do anything so I opened my devices up and flashed them with Tasmota prior to even plugging them in. Tasmota is fantastic, there are several other options too.
 

Offline james_s

  • Super Contributor
  • ***
  • Posts: 15208
  • Country: us
Re: Reliable Embedded CPU
« Reply #24 on: May 15, 2021, 06:35:25 am »
Interesting, but that device is only rated for 10 amps and my water heater circuit breaker is 30 amps and the present heater (30 years old) has been measured at 18 amps.  Ideally it would be a 50 amp device so that it could be connected to control any device in the panel.  That's why I'm thinking a home brew device at one level or another, would be good.  50 amp relays are a lot more money than 30 amp units for some reason.  That's probably why it's hard to find higher current switches.  But I can always find a relay. 

Did your Arduino keep good time?  How did you deal with power fluctuations?  Did you need to reset the clock on power glitches and outages?

Use a Sonoff Basic to control a contactor, then you can control as big a load as you want, limited only by the rating of the contactor you select. Furnace contactors are relatively cheap and readily available, they're used for controlling the heating elements in electric furnaces and can be had with 240VAC coils.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf