0

I'm getting interested in electronics. As a beginner thing, I wanted to try to manually turn on and off my plasma globe through Python code. The globe takes in a 5 volt DC power supply. I can power it through my laptop, which is a nitro 5. So it's sending a constant 5 volts. enter image description here

I need to communicate with the USB (serial port?). The module Pyserial seems to be the right choice. However, no matter what I try it can't identify the USB serial port. Not even when I plug in a phone. I think it can only identify a COM port, whatever that is. What's the difference? In my device manager, there isn't even a COM port section.

enter image description here

I know it's possible to communicate through that USB port because it can send data to and from my phone, so is this simple thing even possible? Thanks!

Lambda
  • 11
  • 5
  • If the connector on that globe is a 2-wire barrel, then just power & ground are being delivered, and the USB differential data signals are not used. So that globe would not be a USB device. If you want to control this power delivery, a simple solution could be a USB-controlled relay. You would also need another USB host port or an external 5 volt supply. See https://superuser.com/questions/321774/easy-way-to-trigger-a-switch-via-usb – sawdust Apr 18 '22 at 05:47

1 Answers1

1

Well, the problem is that your plasma ball has most likely not USB interface at all, meaning that from the 4 wires you maybe got inside the cable (rx; tx; GND; 5V) only the 5 volts are used inside the ball to give the HV circuit power.

Other than that, pyserial is a meant to be used for serial communication like devices with RS232 not USB interface.

If i wanted to control the ball from my computer with software i would program an AVR µc to interact via serial communication (probably with an MOS-FET as a switch), from that point on you could use for example your python module to turn it on and of.

Marc
  • 13
  • 3
  • I wasn't aware of that. OK thanks I'll look into it! – Lambda Apr 17 '22 at 01:04
  • You don’t need an additional micro controller to switch that, the problem is rather in finding the proper hardware interface, which might require USB port to be in use. – 0andriy Apr 17 '22 at 07:24