Giter Club home page Giter Club logo

Comments (4)

pixelwave avatar pixelwave commented on June 27, 2024

I figured out ... what works though ... if I connect PIN32 to POWER_LED+ on the ATX header. Is that safe to do?

IMG_1797

IMG_1798

from esphomepcpowercontrolhomeassistant.

Erriez avatar Erriez commented on June 27, 2024

@pixelwave Thanks for using this project. Reading the computer power state is motherboard dependent. What works for you may not work on another motherboard as it is not standardized. When the reset pin does not work, I also recommend to use a different pin like the power LED. When the input pin of the ESP32 does not exceed 3.3V, then you can use this pin. Otherwise you can use an optocoupler for isolation. Success!

from esphomepcpowercontrolhomeassistant.

pixelwave avatar pixelwave commented on June 27, 2024

Thanks for the reply! Yes I was quite confused that it works in your case. After my research usually the feedback was:

The reset pin on a PC motherboard is typically used to perform a hardware reset of the computer, forcing it to restart. It is not designed to provide information about the power state of the PC. The reset pin is a momentary contact switch or signal that, when triggered, causes the computer to reset and begin the boot process.

I went exactly down the road that you suggested in the meantime. With the help of the reddit community I came up with this scheme using optocouplers and the power LED. I assembled it - and it works!

Screenshot 2023-10-23 at 08 19 23

This code I used for testing:

import machine
import time

# Define boot button on ESP32
button_pin = machine.Pin(0, machine.Pin.IN)
power_pin = machine.Pin(13, machine.Pin.OUT)
reset_pin = machine.Pin(14, machine.Pin.IN)
reset_pin.init(mode=machine.Pin.IN, pull=machine.Pin.PULL_UP)

# Main loop
while True:
    if button_pin.value() == 0:
        power_pin.on()
    else:
        power_pin.off()

    print("Power State:", reset_pin.value())

With the onboard button of an ESP32 dev board (pin0) I can trigger the pc boot (pin13). When the PC is running pin14 outputs low/0 when it is off high/1. I tried to use PULL_DOWN on pin14 to reverse that but the output was always 0/low then.

Btw .. do you have a tip for a good online forum / community where ESP32/electronics stuff like this can be discussed?

from esphomepcpowercontrolhomeassistant.

Erriez avatar Erriez commented on June 27, 2024

Good to hear that you found a solution. I probably designed exactly this schematic when opto isolation is required. So well done. :-)

Btw .. do you have a tip for a good online forum / community where ESP32/electronics stuff like this can be discussed?

I recommend https://hardwarerecs.stackexchange.com which if pretty new / Stackoverflow or Reddit.

I assume this issue can be closed. Otherwise let me know.

from esphomepcpowercontrolhomeassistant.

Related Issues (8)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.