Bricked

191 views
Skip to first unread message

Geekm0nkey

unread,
Jan 9, 2021, 2:03:04 PM1/9/21
to CatGenius
Well the issues I have been posting about over the past few months.. (buttons stopped responding, failed cycles etc.. ) these now seem to have been systemic. AS the system has totally failed.. It had gotten to the point I just had to double button reset just to get it to manual run a cycle..  Well today, it wouldn't complete a cycle fully (left water in bowl) So I went to flash diag, and got a memory failure, then i attempted full firmware, also same memory failure.. Now the unit is bricked.. Seems the memory somehow has become corrupt.. So I'm in search of a replacement controller.

Robert Deliën

unread,
Jan 9, 2021, 6:14:35 PM1/9/21
to catg...@googlegroups.com
> Well the issues I have been posting about over the past few months.. (buttons stopped responding, failed cycles etc.. ) these now seem to have been systemic. AS the system has totally failed.. It had gotten to the point I just had to double button reset just to get it to manual run a cycle.. Well today, it wouldn't complete a cycle fully (left water in bowl) So I went to flash diag, and got a memory failure, then i attempted full firmware, also same memory failure..

If the CPU is not broken, which would be rather rare, it may still be the power supply on the board. Did you measure the 5V on the board? Both in DC and AC domain? It’s probably easier to get a replacement board though.

Paul Gumerman

unread,
Jan 9, 2021, 7:31:45 PM1/9/21
to catg...@googlegroups.com
If the 5V regulator chip is bad, it can easily be replaced with a MUCH
better DC-DC buck converter that'll handle up to 3A, instead of the
100ma or so that the original is good for.

These little guys are great:
https://www.amazon.com/gp/product/B0758ZTS61/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&psc=1

"DROK 5pcs Mini Voltage Reducer DC 4.5-24V"

On Sat, Jan 9, 2021 at 6:14 PM Robert Deliën <rob...@delien.nl> wrote:
>
> > Well the issues I have been posting about over the past few months.. (buttons stopped responding, failed cycles etc.. ) these now seem to have been systemic. AS the system has totally failed.. It had gotten to the point I just had to double button reset just to get it to manual run a cycle.. Well today, it wouldn't complete a cycle fully (left water in bowl) So I went to flash diag, and got a memory failure, then i attempted full firmware, also same memory failure..
>
> If the CPU is not broken, which would be rather rare, it may still be the power supply on the board. Did you measure the 5V on the board? Both in DC and AC domain? It’s probably easier to get a replacement board though.
>
> --
> You received this message because you are subscribed to the Google Groups "CatGenius" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to catgenius+...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/catgenius/4ED76806-AB7A-48D6-8EFB-91A06415374C%40delien.nl.

Geekm0nkey

unread,
Jan 9, 2021, 9:01:23 PM1/9/21
to CatGenius
Haven't taken it apart yet, I put a breeze litter box in it's place to buy me some time to test, replace what not..  Would those components cause memory write errors? such as verified 000000 expected 003945 etc.

Paul Gumerman

unread,
Jan 9, 2021, 9:15:57 PM1/9/21
to catg...@googlegroups.com
If the +5 regulator is bad, then *anything* can happen. It is
actually the very first thing I'd look at. It's also the easiest
thing to fix. At the same time, check any electrolytic caps in that
power supply section for swelled tops. Caps that are on 24x7x365 can
and will fail. The heat from the dryer doesn't help in that regard
either.

http://www.capacitorlab.com/visible-failures/
> To view this discussion on the web visit https://groups.google.com/d/msgid/catgenius/5926a3ff-5deb-4101-8527-a04ac3ff5334n%40googlegroups.com.

Joshua Speer

unread,
Jan 9, 2021, 9:29:48 PM1/9/21
to catg...@googlegroups.com
Would anyone it be interested if I just made my own board to control the entire box? I see all this firmware hacking but maybe it's just me but building a whole new board from scratch to control it would seem like the easier route. I can get started on it if it seems like something people would be interested in. I know I can do it and I'd have a prototype ready in a week.

Michael Conner

unread,
Jan 10, 2021, 12:35:20 PM1/10/21
to catg...@googlegroups.com
As Robert pointed out, check the 5 Volt supply and related copper traces. 

I've purchased several used CG units, reprogrammed them and then given them as gifts to friends. I also purchased  at least two for spare parts, I've been through the frustration as well. 

It is a wonderful thing that Robert has completed the programing and shared with many plus the continuous Tech Support. Than kagain Robert !!

It's easy to forget to turn the CG power on when programming. I done this several times and the program verity was valid.  But I always erased the previous program prior to reprogramming. A weak 5  Volt supply is a concern when reprogramming !! 

I have one CG that was Flaky for over a year. The Keyboard being intermittent was the first symptom. Later it was issues with the wash cycle, typically hanging...  

It's been well over a year so I don't recall the exact procedure. But the 5 Volt DC supply was the problem, it is seemingly weak..  I Measured the 5 Volt supply on various places on the circuit board did reveal Voltage drops. Then there's the heat and other conditions that make matters worse.

Not having the time and  Too many other projects, I didn't replace the 5 Volt Regulator nor thicken up the copper traces, I simply used a spareboard. 

Hopefully someday I canfin the time to use a Raspberry Pi with a newly designed interface / motor Drive circuit for a CG. 

Nothing specaucaly just a few more options like varying the dry time and perhaps temperature control. Plus a camera that can determine after a Cat Visit if there's solid waste in the Bowl. Then an alternate scoop / wash cycle can be optimized. 

Best of luck !

Michael..





On Sat, Jan 9, 2021 at 3:14 PM Robert Deliën <rob...@delien.nl> wrote:
> Well the issues I have been posting about over the past few months.. (buttons stopped responding, failed cycles etc.. ) these now seem to have been systemic. AS the system has totally failed.. It had gotten to the point I just had to double button reset just to get it to manual run a cycle..  Well today, it wouldn't complete a cycle fully (left water in bowl) So I went to flash diag, and got a memory failure, then i attempted full firmware, also same memory failure..

If the CPU is not broken, which would be rather rare, it may still be the power supply on the board. Did you measure the 5V on the board? Both in DC and AC domain? It’s probably easier to get a replacement board though.

Robert Deliën

unread,
Jan 10, 2021, 1:55:58 PM1/10/21
to <catgenius@googlegroups.com>
Would anyone it be interested if I just made my own board to control the entire box? I see all this firmware hacking but maybe it's just me but building a whole new board from scratch to control it would seem like the easier route. I can get started on it if it seems like something people would be interested in. I know I can do it and I'd have a prototype ready in a week.

Yes, preferably one based on a Raspberry Pi Zero or compute module. I’ve been working one this on and off for years, more off than on, obviously, but my EE fell seriously ill a year ago, so no progress there.

Somebody in this group, in more of a hurry than I, already created a board base upon the ESP32, if I’m not mistaken. I have ordered two PCBs, and they’ve been on my desk since I’ve received them

But I’ll be happy to work with you.

Paul Gumerman

unread,
Jan 10, 2021, 8:32:07 PM1/10/21
to catg...@googlegroups.com
I'm the one with the ESP32, and all I've done is patch it in to the
input side of the ULN2003 relay drivers and replace the water-sensor,
driving the comparator input from the ESP32. I replaced the IR water
sensing with stainless-steel probes that contact the water in the
bowl. It's now going on three weeks of working perfectly. Home
Assistant is monitoring all the signals, and it's quite interesting to
see what's actually going on during a flush cycle.

Right now, my CG is running on the ESP8266 prototype, and it consists
of just the off-the-shelf ESP8266 module and one of those 5V DC-DC
buck convertors (because the 5V regulator on the CG board is barely
able to run the board).

It would be pretty easy to take the next step and actually control the
CG. I highly recommend starting with esphome as a platform, since so
many of the bit we'd need are already created for us. Where
necessary, it allows you to drop down to C++ code for things it
doesn't already know how to do.

It's a little bit like coding for Arduinos, but there are an awful lot
of much higher level things that can be done declaratively, for
example: a simple web server page, logging, enabling over-the-air
updates, and integration with Home Assistant. As an example, I was
able to have the ESP8266 detect two possible flood conditions, and
have it request Home Assistant to turn off the smart plug that the CG
is connected to.
Over the next week or two I plan on getting the ESP32 version up and
running in a similar monitor-only (with water sensor) mode.
> --
> You received this message because you are subscribed to the Google Groups "CatGenius" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to catgenius+...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/catgenius/E2BC3950-CA88-4800-BBED-988DC257467D%40delien.nl.

Robert Deliën

unread,
Jan 11, 2021, 3:21:30 AM1/11/21
to CatGenius
> I'm the one with the ESP32,

I’m sorry Paul; I should have remembered.

> and all I've done is patch it in to the
> input side of the ULN2003 relay drivers and replace the water-sensor,
> driving the comparator input from the ESP32. I replaced the IR water
> sensing with stainless-steel probes that contact the water in the
> bowl. It's now going on three weeks of working perfectly. Home
> Assistant is monitoring all the signals, and it's quite interesting to
> see what's actually going on during a flush cycle.

So you’ve got software running as well, that’s nice. Perhaps you’d like to share the links here.

> Right now, my CG is running on the ESP8266 prototype, and it consists
> of just the off-the-shelf ESP8266 module and one of those 5V DC-DC
> buck convertors (because the 5V regulator on the CG board is barely
> able to run the board).

Yes; It is under-dimensioned.

> It would be pretty easy to take the next step and actually control the
> CG. I highly recommend starting with esphome as a platform, since so
> many of the bit we'd need are already created for us.

I’m not a big fan of the ESP32 platform.

> Where
> necessary, it allows you to drop down to C++ code for things it
> doesn't already know how to do.

And I don’t think C++ is a good choice for embedded software, especially not on small MCU’s with (very) limited resources.

If it were my choice, and a Linux based board would be out of the question, I’d go for an i.MX-RT1011 running Zephyr OS, to at least have the benefit of supporting connectivity.

> It's a little bit like coding for Arduinos, but there are an awful lot
> of much higher level things that can be done declaratively, for
> example: a simple web server page, logging, enabling over-the-air
> updates, and integration with Home Assistant. As an example, I was
> able to have the ESP8266 detect two possible flood conditions, and
> have it request Home Assistant to turn off the smart plug that the CG
> is connected to.

Yes; I do think that using an existing domotica platform is a brilliant idea to off-load the web interface and other advanced functionality to. Especially because they are readily available, with may how-to guides, and run on simple platforms such as a Raspberry Pi.

> Over the next week or two I plan on getting the ESP32 version up and
> running in a similar monitor-only (with water sensor) mode.

Great.

Robert Deliën

unread,
Jan 11, 2021, 3:45:17 AM1/11/21
to CatGenius
> If the +5 regulator is bad, then *anything* can happen.

Yes. And the alternative is a defective MCU, which does happen, but is much less likely, and much harder to fix without proper soldering tools.

> It is
> actually the very first thing I'd look at. It's also the easiest
> thing to fix.

That is indeed common practice in electronics repair.

> At the same time, check any electrolytic caps in that
> power supply section for swelled tops. Caps that are on 24x7x365 can
> and will fail. The heat from the dryer doesn't help in that regard
> either.

That’s a good suggestion.

On the controller board, close the transformer (the largest component on the board), there’s an unpopulated foot print for a TO-220 component, marked with reference designator U1. Above the letters of U1, sits a SOIC-8 component, marked 8L05A.
@Geekm0nkey: If you’re interested in fixing the power supply, you homework starts here. The SOIC-8 component is most likely a low power 7805 lineair regulator. Look-up the foot print to see where the input, ground and output are, and if there are any other pin functions. Lookup the TO-220 7805 foot print. Using a simple multi-meter with continuity test, check if the SOIC-8 foot print on the board matches the TO-220 foot print of U1 on the board. In other words; Check if the SOIC-8 can be replaced by a TO-220.

If so, Traco and Recom (one is the original, the other is a cheaper copy cat) offer drop-in switching replacements for TO-220 foot print 7805 regulators. Low heat-dissipation, because it’s an SMPS, but still high current output. For your reference; The transformer is rated for 355mA secondary, but he SOIC-8 78L05A is rated for only 100mA. It’s a terrible design.

Paul Gumerman

unread,
Jan 11, 2021, 11:25:36 AM1/11/21
to catg...@googlegroups.com
> On the controller board, close the transformer (the largest component on the board), there’s an unpopulated foot print for a TO-220 component, marked with reference designator U1. Above the letters of U1, sits a SOIC-8 component, marked 8L05A.
> @Geekm0nkey: If you’re interested in fixing the power supply, you homework starts here. The SOIC-8 component is most likely a low power 7805 lineair regulator. Look-up the foot print to see where the input, ground and output are, and if there are any other pin functions. Lookup the TO-220 7805 foot print. Using a simple multi-meter with continuity test, check if the SOIC-8 foot print on the board matches the TO-220 foot print of U1 on the board. In other words; Check if the SOIC-8 can be replaced by a TO-220.
>
> If so, Traco and Recom (one is the original, the other is a cheaper copy cat) offer drop-in switching replacements for TO-220 foot print 7805 regulators. Low heat-dissipation, because it’s an SMPS, but still high current output. For your reference; The transformer is rated for 355mA secondary, but he SOIC-8 78L05A is rated for only 100mA. It’s a terrible design.

Those TO-220 pads do indeed have the unregulated DC input and ground.
I don't recall if the third pin was +5 or not. I used that location
to install the DROK DC-DC buck convertor, but only used it to power
the ESP module, leaving the 78L05 alone. When I pull the board to
replace the prototype ESP8266 with the ESP32, I think I'll pull the
78L05 out.

Here's a link to the DC-DC convertor on Amazon:
https://www.amazon.com/gp/product/B0758ZTS61/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&psc=1

They are incredibly handy to keep around if you like to play with electronics!

Geekm0nkey

unread,
Jan 11, 2021, 11:28:30 AM1/11/21
to CatGenius
So I got to take it apart this weekend, on initial inspection there are no signs of physical failures. (no burnt traces, blown caps, smoked chips etc.) So must be a logical fail some where, or weak component.

Paul Gumerman

unread,
Jan 11, 2021, 12:04:45 PM1/11/21
to CatGenius
On Monday, January 11, 2021 at 3:21:30 AM UTC-5 MindBender wrote:

So you’ve got software running as well, that’s nice. Perhaps you’d like to share the links here.


Here's the current catgenie.yaml that esphome generates the code from:

esphome:
  name: catgenie
  platform: ESP8266
  board: d1_mini
  on_boot:
    - switch.turn_off: water_detect

wifi:
  ssid: "COOLDOG1"
  password: !secret wifi_password
  use_address: "catgenie.cooldog.com"

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Catgenie Fallback Hotspot"
    password: !secret fallback_password

web_server:
  port: 80

captive_portal:

# Enable logging
logger:

# Enable Home Assistant API
api:
  password: !secret api_password

ota:
  password: !secret ota_password
  
globals:
  - id: timeout_shutdown
    type: bool
    restore_value: no
    initial_value: 'false'
  
binary_sensor:
  - platform: gpio
    pin:
      number: GPIO5    # D1
      mode: INPUT
    name: "CatGenie Arm"
    id: catgenie_arm
    filters:
      - delayed_on: 50ms
      - delayed_off: 50ms

  - platform: gpio
    pin:
      number: GPIO4    # D2
      mode: INPUT
    name: "CatGenie Bowl"
    id: catgenie_bowl
    filters:
      - delayed_on: 50ms
      - delayed_off: 50ms

  - platform: gpio
    pin:
      number: GPIO14   # D5
      mode: INPUT
    name: "CatGenie Water Valve"
    id: catgenie_water_valve
    filters:
      - delayed_on: 50ms
      - delayed_off: 200ms

  - platform: gpio
    pin:
      number: GPIO12    # D6
      mode: INPUT
    name: "CatGenie Dryer"
    id: catgenie_dryer
    filters:
      - delayed_on: 50ms
      - delayed_off: 50ms

  - platform: gpio
    pin:
      number: GPIO13    # D7
      mode: INPUT
    name: "CatGenie Cat Sensor"
    id: catgenie_cat_sensor
    filters:
      - invert
      
  - platform: gpio
    pin:
      number: GPIO16    # D0
      mode: INPUT
    name: "CatGenie Pump"
    id: catgenie_pump
    filters:
      - delayed_on: 50ms
      - delayed_off: 250ms

  - platform: template
    name: "CatGenie Emergency Shutdown"
    id: catgenie_emergency_shutdown
    lambda: 'return id(timeout_shutdown);'
  
# do a sanity check on the water valve, once per second  
interval:
  - interval: 1sec
    then:
      - if:
          condition:
            for:
# this value is about 15 seconds longer than it takes to fill the bowl, YMMV
              time: 110sec
              condition:
                binary_sensor.is_on: catgenie_water_valve
          then:
# we have a potential flooding problem
                - globals.set:
                    id: timeout_shutdown
                    value: 'true'
                - binary_sensor.template.publish:
                    id: catgenie_emergency_shutdown
                    state: ON
# tell the CatGenie we have detected water
                - switch.turn_on: water_detect
                - logger.log: "Water Valve open for too long!  Shutdown triggered"
# politely ask Home Assistant to shut us down by turning of the AC power
                - homeassistant.service:
                    service: switch.turn_off
                    data_template:
                       entity_id: 'switch.catgenie_power'

sensor:
  - platform: wifi_signal
    name: "CatGenie WiFi Signal"
    update_interval: 60s
    id: catgenie_wifi_signal

# The A0 analog input is connected to water probe 1
# Water probe 2 connects to 3.3VDC
  - platform: adc
    pin: A0
    name: "CatGenie Internal Water Probe Voltage"
    update_interval: 0.5s
    internal: true
    filters:
      - multiply: 3.3
      - sliding_window_moving_average:
          window_size: 20
          send_every: 10    
    on_value_range:
      - above: 0.1
        then:
          - switch.turn_on: water_detect
      - below: 0.05
        then:
          - if:
              condition:
                lambda: 'return !id(timeout_shutdown);'       
              then:
                - switch.turn_off: water_detect

switch:
  - platform: gpio
    name: "CatGenie Water Detect"
    pin: GPIO2   # D4
    id: water_detect


I’m not a big fan of the ESP32 platform.

Good heavens!  What's not to like?  It's utterly *perfect* for this sort of thing.
 
> Where
> necessary, it allows you to drop down to C++ code for things it
> doesn't already know how to do.

And I don’t think C++ is a good choice for embedded software, especially not on small MCU’s with (very) limited resources.

LOL!  I cut my teeth designing arcade games around the Intel 8048 in assembler, so the ESP32 is hardly what I'd call "limited".  The DevKit-C boards are available with anywhere from 4 to 16MB of flash, and 320K to 520K of static RAM, and 4MB of SPI-RAM.  To top it off, the thing runs at 240MHz has two cores, and has WIFI and Bluetooth built-in.  Not to mention a crapload of built-in I/O, PWM, touch sensors, ADC and DACs.

My only quibble with these boards is that I am forever trying to use some GPIO pin that has some special purpose, and screws things up.  I just whipped up an ESP32 WIFI add-on for my PelletPro smoker controller, and now have to debug it because of that (I assume) issue.  Grrrrrrrr!

If it were my choice, and a Linux based board would be out of the question, I’d go for an i.MX-RT1011 running Zephyr OS, to at least have the benefit of supporting connectivity.

I use Linux every day, but it's not the hammer for this nail.  Even just diving into Espressif's RTOS would be overkill for this application.  The ESP32 with esphome hands you WIFI, bluetooth, a web server, MQTT client, OTA updates, etc, etc, etc on a plate ... how much more connectivity could you wish for?

Yes; I do think that using an existing domotica platform is a brilliant idea to off-load the web interface and other advanced functionality to. Especially because they are readily available, with may how-to guides, and run on simple platforms such as a Raspberry Pi.

Even the dinky and slow ESP8266 in the prototype has no problem running the web interface; that's standalone.  I just use Home Assistant to collect the time-series info from the sensors.

I'd really urge you to spend $10 on a DevkitC module and a few hours playing with it and esphome.  Once you do, I guarantee that you'll start looking at the coffeemaker, toaster oven, BBQ, water softener, garage door, etc, etc, etc thinking "Hey ... I could hook a board to that and make it do xxxx ... it might take me an hour ..."

Paul Gumerman

unread,
Jan 11, 2021, 12:08:27 PM1/11/21
to catg...@googlegroups.com
> So I got to take it apart this weekend, on initial inspection there are no signs of physical failures. (no burnt traces, blown caps, smoked chips etc.) So must be a logical fail some where, or weak component.

Did you check the +5 voltage?

Marco Salinardi

unread,
Jan 11, 2021, 1:47:30 PM1/11/21
to catg...@googlegroups.com
I am a big fan of this board and homeassistant too, implemented all my house domotics based on esphome too. I can tell you that on ESP8266 only pin 4 and 5 are not used at the boot so in my first domotic boards i used this ones as outputs for sensitive devices like the opening of the door. Now i switched to the input output expansion board MCP23017 that is more reliable on boot time. 
If you ever design any esp32 board and program i would definitively love to try it  and could try to help you out in the meanwhile
 
If it were my choice, and a Linux based board would be out of the question, I’d go for an i.MX-RT1011 running Zephyr OS, to at least have the benefit of supporting connectivity.

I use Linux every day, but it's not the hammer for this nail.  Even just diving into Espressif's RTOS would be overkill for this application.  The ESP32 with esphome hands you WIFI, bluetooth, a web server, MQTT client, OTA updates, etc, etc, etc on a plate ... how much more connectivity could you wish for?

Yes; I do think that using an existing domotica platform is a brilliant idea to off-load the web interface and other advanced functionality to. Especially because they are readily available, with may how-to guides, and run on simple platforms such as a Raspberry Pi.

Even the dinky and slow ESP8266 in the prototype has no problem running the web interface; that's standalone.  I just use Home Assistant to collect the time-series info from the sensors.

I'd really urge you to spend $10 on a DevkitC module and a few hours playing with it and esphome.  Once you do, I guarantee that you'll start looking at the coffeemaker, toaster oven, BBQ, water softener, garage door, etc, etc, etc thinking "Hey ... I could hook a board to that and make it do xxxx ... it might take me an hour ..."

--
You received this message because you are subscribed to the Google Groups "CatGenius" group.
To unsubscribe from this group and stop receiving emails from it, send an email to catgenius+...@googlegroups.com.

Joshua Speer

unread,
Jan 11, 2021, 1:53:48 PM1/11/21
to catg...@googlegroups.com
Sorry I never posted here and I replied within another thread about a different subject. I would be using the Esp32. I don't know how to use the PI for anything other than running small os's for things like voip servers, ubiquiti network tools etc. Maybe something I need to move onto now that I've learned the esp8266 and Esp32. However the limited needs of the cat box including a small web interface where you can change the variables for operational timings etc shouldn't be much at all for the Esp32 to handle. 

I sort of inquired because I see all of this hacking of the original boards and I'm sitting here watching it for a couple years thinking... It's just relays and timers and sensors... Why not just do a mainboard and be done with it all. For me I'm just pissed that I found out later it has a drm on the cleaning solution so they can stuff it. Especially since the box quit emptying the water and used an entire bottle up somehow. There should be a disclaimer on the sale of products when they require proprietory things to run them. 

--
You received this message because you are subscribed to the Google Groups "CatGenius" group.
To unsubscribe from this group and stop receiving emails from it, send an email to catgenius+...@googlegroups.com.

Robert Deliën

unread,
Jan 11, 2021, 2:32:07 PM1/11/21
to <catgenius@googlegroups.com>
> So I got to take it apart this weekend, on initial inspection there are no signs of physical failures. (no burnt traces, blown caps, smoked chips etc.) So must be a logical fail some where, or weak component.

So no sh!rstains, that’s good. But did you actually measure anything?

Robert Deliën

unread,
Jan 11, 2021, 3:13:13 PM1/11/21
to <catgenius@googlegroups.com>
I’m not a big fan of the ESP32 platform.

Good heavens!  What's not to like?  It's utterly *perfect* for this sort of thing.

It’s Chinese, proprietary, full of bugs, poorly documented, no errata sheets available, no support, …, …, …
I have been in product development for many years, and I have never encountered an ESP there. And I developed platforms from consumer products up to measurement instruments, for both small companies, but also very large ones such a Agilent and TomTom. Apparently it’s not very popular there.

> Where
> necessary, it allows you to drop down to C++ code for things it
> doesn't already know how to do.

And I don’t think C++ is a good choice for embedded software, especially not on small MCU’s with (very) limited resources.

LOL!  I cut my teeth designing arcade games around the Intel 8048 in assembler, so the ESP32 is hardly what I'd call "limited".  The DevKit-C boards are available with anywhere from 4 to 16MB of flash, and 320K to 520K of static RAM, and 4MB of SPI-RAM.  To top it off, the thing runs at 240MHz has two cores, and has WIFI and Bluetooth built-in.  Not to mention a crapload of built-in I/O, PWM, touch sensors, ADC and DACs.

C++ has nothing to offer over C that’s valuable for embedded software. Sure, creating objects is a little easier, and in rare cases inheritance can come in handy, but do that a couple of times, and 520KiB will hardly be enough for your stack. Embedded software, especially on small MCU’s, doesn’t need dynamic object instantiation, auto pointers, template programming, etc. It just needs to work every time, all the time. Besides that, C++ allows programmers to make a bigger mess of the code, with so many possibilities. Sure, a C++ god can make neat, tight and efficient embedded application on a small MCU, but most programmers aren’t C++ gods. The language is just too complex for simple embedded solutions.

My only quibble with these boards is that I am forever trying to use some GPIO pin that has some special purpose, and screws things up.  I just whipped up an ESP32 WIFI add-on for my PelletPro smoker controller, and now have to debug it because of that (I assume) issue.  Grrrrrrrr!

That’s a problem on all SoMs.

I use Linux every day, but it's not the hammer for this nail.  Even just diving into Espressif's RTOS would be overkill for this application.  The ESP32 with esphome hands you WIFI, bluetooth, a web server, MQTT client, OTA updates, etc, etc, etc on a plate ... how much more connectivity could you wish for?

I guess we all have our preferences. TCP/IP stacks on small CPUs used to be sub-standard, not implementing many mandatory features, relying one the robustness of TCP/IP to eventually get the data through. I’ve seen many compatibility problems with that in the past, but perhaps it’s better now.

I'd really urge you to spend $10 on a DevkitC module and a few hours playing with it and esphome.  Once you do, I guarantee that you'll start looking at the coffeemaker, toaster oven, BBQ, water softener, garage door, etc, etc, etc thinking "Hey ... I could hook a board to that and make it do xxxx ... it might take me an hour ..."

I haven’t had a reason to spend effort on that yet. I’m proficient in Linux Kernel development, Linux application development, U-Boot development, Optee development, bare metal embedded software development on LPCs, i.MXs, STM32s, PICs and AVRs. I value being able to pick the editor I like (Geany), the build tool that I like (GNU make, what else), the compiler that I like (gcc, clang), the IDE that I like (Eclipse, if Ihave to) and the version control system that I like (git).

No offence intend, I want to make that absolutely clear. People seem to be offended rather easily last couple of weeks.

I guess we all have our preferences, and the tool you have the most knowledge on and experience with, is per definition the best tool for your. It would be more surprising if that were the same.

Reply all
Reply to author
Forward
0 new messages