Help with circuit for Plasma Stick 2040 W

Hm, I don’t understand. You were talking about a button to turn the Pico on or off. You just connect the button (it must be one that keeps state like a slider) to the enable pin and that is it. No line of code necessary.

If you want to control the enable pin from a circuit, you need something else. Either you connect the interrupt pin of your RTC to the enable pin and let the RTC drive the enable pin. In this case you need to power the RTC externally, since when the Pico is off, it cannot provide power to the RTC. Or you skip the RTC and use something like the TPL5110 (also available from Pimoroni) to drive the enable pin.

I mentioned the other thread with a button to ask how a pin can be controlled with a code. Sorry for any confusion. I don’t need to connect any buttons to Plasma Stick right now. I’m asking if I can connect this driver to any two pins on the Pico and control two input pins programmatically by putting them on HIGH and LOW in specific timed sequence, hence the RTC connected via QW/ST. The Pico will be on all the time. It’s basically a project where the Pico is responsible for two things – driving the clock and remotely controlling LED light inside the clock.

Ok. That driver board supports PWM, and almost all Pico pins support PWM also. So the connection is possible. And you could skip PWM and toggle the pins manually (but why would you bit-bang if the Pico supports PWM?).

But I can’t see the role of the RTC in this context.

From what I read, I don’t even need PWM. I need to send: HIGH to IN1 / LOW to IN2 and LOW to IN1 and HIGH to IN2 exactly every minute to move the railway clock’s mechanism. RTC is to keep the time? I’ve read somewhere that Pico’s internal RTC is not too precise.

IN1 and IN2 need PWM between 0 and 100kHz. This defines the duty-cycle and this controls the motor speed. Of course you could switch between full-speed and no-speed, but I would prototype this to see if this really works.

Yeah, that motor driver is probably an overkill for what I need but I couldn’t find anything cheaper/simpler that would send out +/-24V. I’m an enthusiast in field of electronics :)

There is Mosfet-driver from Adafruit Search - Pimoroni. It claims to support up to 30V. If this is suitable depends on your peak current.

One other thing: I would not worry about the precision of the internal RTC of the Pico as long as you can update the time using the WLAN-chip once in a while. You basically only need an additional RTC if you are not connected. Even with an additional external RTC I tend to update (both RTCs) once in while.

I can confirm I was able to turn two pins on and off with

in1 = machine.Pin(19, machine.Pin.OUT)
in2 = machine.Pin(20, machine.Pin.OUT)
in1.on()
in2.on()

Both have 3.3V when measured. Now need to get the driver, do some soldering an make a prototype :)

Will report back. Thanks.

If you decide to build from scratch, this may help?
Pico Proto PCB (pimoroni.com)