Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Idea of making a project on ESP32 + ETHERNET #31

Open
kamil2466 opened this issue Oct 2, 2022 · 30 comments
Open

Idea of making a project on ESP32 + ETHERNET #31

kamil2466 opened this issue Oct 2, 2022 · 30 comments

Comments

@kamil2466
Copy link

Hello,
I make various pcb boards and I have a proposal to make a professional board for this project. I wanted to add MQTT broker control over ETHERNET, is it possible to rewrite the software under ETHERNET ?

@kamil2466 kamil2466 changed the title The idea of doing a do-over on ESP32 + ETHERNET Idea of making a project on ESP32 + ETHERNET Oct 2, 2022
@vekexasia
Copy link
Owner

vekexasia commented Oct 2, 2022 via email

@kamil2466
Copy link
Author

kamil2466 commented Oct 5, 2022

Thank you for your reply :)
I will make the design of the board and make it available to everyone.
The controller will run on 12v DC power and Ethernet , and the outputs will be CAN bus, RS485 and 1-wire (ds18b20)

@Obelixje
Copy link

Very interesting!

@Vinzent82
Copy link

great @kamil2466!

@kamil2466
Copy link
Author

I made a PCB design and will order a prototype
30
31
29

Input power supply +12V or from USB_C (+5V). Available buses (CANBUS, MODBUS and 1-WIRE).

@SkullboyNL
Copy link

looks good. Keep us informed

@kamil2466
Copy link
Author

kamil2466 commented Dec 9, 2022

PCB documentation
https://docs.google.com/document/d/1q0n5UrU_Wb4M9KEMclKQVpAS4q2IFIikL5ap5B0-XQ0/edit?usp=sharing

@tezet
Copy link

tezet commented Dec 16, 2022

Looks great @kamil2466! I like the idea of making the board based on WT32 - ETH01. I was planning to design some boards for my SSR relays control in similar way. Are you going to publish the project files for the board design?

@kamil2466
Copy link
Author

Looks great @kamil2466! I like the idea of making the board based on WT32 - ETH01. I was planning to design some boards for my SSR relays control in similar way. Are you going to publish the project files for the board design?

Yes they will be made available :) For now it is a prototype after launching and testing I will make it available to everyone
Go to boneio.eu we do home automation controller

@Vinzent82
Copy link

anybody having an idea how the firmware needs to be adapted for Ethernet support?

@tezet
Copy link

tezet commented Feb 13, 2023

I would personally go with porting it as a ESPHome component, it would make it more flexible to integrate with different things (including Ethernet). Unfortunately I currently don't have time to do it, also current solution works fine for me.

@gahujipo
Copy link

@tezet what is your current solution? Does that solution use Ethernet?

@vekexasia
Copy link
Owner

i'm designing a pcb as well. why would you want to use ethernet instead of wifi?

@Vinzent82
Copy link

why would you want to use ethernet instead of wifi?

@vekexasia, my reasons:

  • better stability as my WiFiy quality is bad in the cellar
  • we care for human radiation exposure. Thus we switch off our WiFi as frequently as possible and it runs on minimum radiation power
  • less energy consumption

@vekexasia
Copy link
Owner

vekexasia commented Apr 30, 2023 via email

@hcouplet
Copy link

you can also directly use the board from olimex. See #51

@nliaudat
Copy link

nliaudat commented Aug 8, 2023

That should works : https://github.com/nliaudat/esp_canbus 10$/board at jlcpcb

@une18
Copy link

une18 commented Nov 25, 2023

@kamil2466 What is the status of this project? Did you get it working?

@gekkekoe
Copy link
Contributor

gekkekoe commented Mar 21, 2024

@vekexasia would one of these
https://docs.m5stack.com/en/atom/atom_can
work out of the box? I think that it should work? Might be an easy solution.

[edit]
hmm seems that it cannot power the board from the can bus itself, that's inconvenient then

@svde
Copy link
Contributor

svde commented Mar 22, 2024

This one https://docs.m5stack.com/en/unit/Unit-Mini%20CAN should be able to power the board from the can bus.

I have one. I'm trying to use it in combination with an atoms3 lite / atoms3u, but the ESP32S3 doesn't compile. Will get a atom lite (regular esp32) and try with that.

@gekkekoe
Copy link
Contributor

gekkekoe commented Mar 22, 2024

This one https://docs.m5stack.com/en/unit/Unit-Mini%20CAN should be able to power the board from the can bus.

I have one. I'm trying to use it in combination with an atoms3 lite / atoms3u, but the ESP32S3 doesn't compile. Will get a atom lite (regular esp32) and try with that.

yeah saw that one, but can't order it (yet) in the Netherlands. if you stack that one, you still need to use a grove cable to connect it to the S3 right? Also the (TJA1051T/3) chip does not have isolation compared to CA-IS3050G chip. Don't know if its really needed btw, but sounds a bit safer.

Did you change the board definition to build esphome? the s3 should be supported (s3 is also faster). have a look at an example esphome: https://github.com/fonske/Mitsubishi_procon/blob/main/esphome/boards/board-esp32S3.yaml
or esphome/feature-requests#2332

@svde
Copy link
Contributor

svde commented Mar 22, 2024

This is the config I'm using:

substitutions:
  board: esp32-s3-devkitc-1
  device_description: "wtw new"
  mac: ***redacted***
  platform: "ESP32"
  rx_pin: "1" # RX = GPIO_NUM_1
  tx_pin: "2" # TX = GPIO_NUM_2

api:

captive_portal:

comfoair:
- rx_pin: ${rx_pin}
  tx_pin: ${tx_pin}

esphome:
  comment: "${device_description}"
  name: esphome-${mac}
  platformio_options:
    board_build.flash_mode: dio

esp32:
  board: ${board}
  framework:
    type: arduino

external_components:
  - source: github://vekexasia/comfoair-esp32
    components: [ comfoair ]

logger:
  level: INFO

mqtt:
  broker: ***redacted***

ota:

switch:
  - platform: restart
    name: restart

text_sensor:
  - platform: version
    name: version
  - platform: wifi_info
    ip_address:
      name: ip
    ssid:
      name: ssid
    bssid:
      name: bssid

web_server:
  port: 80

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password
  ap:
    ssid: esphome-${mac}
    password: !secret ap_password

and this is the (first) error:

Compiling .pioenvs/esphome-802aa8c75ec3/FrameworkArduino/esp32-hal-gpio.c.o
In file included from /config/.esphome/platformio/packages/framework-arduinoespressif32/tools/sdk/esp32s3/include/soc/esp32s3/include/soc/dport_reg.h:21,
                 from .piolibdeps/esphome-802aa8c75ec3/esp32_can/src/esp32_can_builtin_lowlevel.cpp:33:
.piolibdeps/esphome-802aa8c75ec3/esp32_can/src/esp32_can_builtin_lowlevel.cpp: In function 'int CAN_init()':
.piolibdeps/esphome-802aa8c75ec3/esp32_can/src/esp32_can_builtin_lowlevel.cpp:217:29: error: 'DPORT_PERIP_CLK_EN_REG' was not declared in this scope
     DPORT_SET_PERI_REG_MASK(DPORT_PERIP_CLK_EN_REG, DPORT_CAN_CLK_EN);
                             ^~~~~~~~~~~~~~~~~~~~~~

@gekkekoe
Copy link
Contributor

gekkekoe commented Mar 22, 2024

Something like this should work:
esp32: board: m5stack-atoms3 variant: esp32s3 framework: type: esp-idf version: 5.1.2 platform_version: 6.5.0

Seems to be ESPHome, it does not support platformIO 6 yet.

In file included from src/esphome/components/comfoair/comfoair.cpp:1: src/esphome/components/comfoair/comfoair.h:2:10: fatal error: esp32_can.h: No such file or directory
It's probably moved or is re-named differently in new version.

[edit]
espressif/arduino-esp32#6937
Ah the ESP32 Can lib is old, and does not support new S3 board. Should not be that hard to switch to a newer lib

@gekkekoe
Copy link
Contributor

seems that we need to use an updated lib dep of the esp32_can.
I tried to replace it : gekkekoe@c79ed14
but it does not seem to work, I'm pretty new with esphome so probably doing something wrong

@svde
Copy link
Contributor

svde commented Mar 22, 2024

Got the M5stack atom lite. It works, powered via the 12V of the zehnder unit.

@gekkekoe
Copy link
Contributor

gekkekoe commented Mar 22, 2024

use (my repo has the adjusted esp32 lib for S3):

external_components:
  - source: github://gekkekoe/comfoair-esp32
    components: [ comfoair ]

and configure as

esp32:
  board: m5stack-atoms3
  variant: esp32s3
  framework:
    type: arduino
    version: 2.0.14
    platform_version: 6.5.0

this builds :) no need to buy a regular. the S3 is faster

@vekexasia
Copy link
Owner

Can you guys post a pic of Al these different builds?

@svde
Copy link
Contributor

svde commented Mar 23, 2024

This is my second "build".
IMG_7098

Components:

It's small enough to be tucked away under the wiring cover on the top of the unit.

My first build (the original 3D printed box) isn't able to send commands to the ventilation unit. That's why I built the 2nd one, which (turns out) also isn't able to send commands to the ventilation unit. Perhaps it's due to the ComfoConnect LAN C and option box that are also connected to the unit.

@gekkekoe
Copy link
Contributor

@vekexasia I still have a soldered version, but want to replace it. Would like a CAN module that can also power an atom3. Preferably no cable between the atom and CAN module. this https://docs.m5stack.com/en/atom/atom_can would have been ideal.

@SkullboyNL
Copy link

i made a Wifi and ethernet version

WhatsApp Image 2024-03-24 at 13 59 25 (2)
WhatsApp Image 2024-03-24 at 13 59 26
WhatsApp Image 2024-03-24 at 13 59 25 (1)
WhatsApp Image 2024-03-24 at 13 59 25

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests