I want to make something like a Sinilink USB Switch Module but Adafruit IO compatible

General project help for Adafruit customers

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
CorbeauCat
 
Posts: 28
Joined: Sun May 13, 2018 7:42 pm

I want to make something like a Sinilink USB Switch Module but Adafruit IO compatible

Post by CorbeauCat »

I want to make something like a Sinilink USB Switch Module, or a powerbank that can be turned on and off by Adafruit IO control. The goal is to power on and off something that is powered through a USB A plug and can be controlled by an app using Wi-fi or Bluetooth LE. The thing I have in mind to use it for is an IKEA HALVKLART closet light which normally needs to be pressed to turn it on or off, so it’s difficult to put in a place that is hard to reach. The light itself defaults to being on when first plugged in or after a power outage.

Ideally I would like to do as minimal soldering as I can and would like to use STEMMA/STEMMA QT and/or Qwiic if possible.

User avatar
adafruit_support_mike
 
Posts: 67446
Joined: Thu Feb 11, 2010 2:51 pm

Re: I want to make something like a Sinilink USB Switch Module but Adafruit IO compatible

Post by adafruit_support_mike »

Not knowing how much current the lamps use, it would probably be a good idea to use a power controller like the TB6612:

https://www.adafruit.com/product/2448

It can handle 1.2A per channel, and each output channel can control two on/off devices. Any microcontroller can generate the signals that control the outputs, so it will be easy to integrate with online control.

User avatar
CorbeauCat
 
Posts: 28
Joined: Sun May 13, 2018 7:42 pm

Re: I want to make something like a Sinilink USB Switch Module but Adafruit IO compatible

Post by CorbeauCat »

So a separate relay would not be necessary then, right?

Also, this forum post I linked below is about hacking the type of light I just mentioned, but it gives a closer look into the innards of the light:

https://www.eevblog.com/forum/projects/ ... net-light/

User avatar
adafruit_support_mike
 
Posts: 67446
Joined: Thu Feb 11, 2010 2:51 pm

Re: I want to make something like a Sinilink USB Switch Module but Adafruit IO compatible

Post by adafruit_support_mike »

CorbeauCat wrote: Mon Mar 20, 2023 12:51 pm So a separate relay would not be necessary then, right?
Correct.

Given that the lamps take 5VDC power, mosfets are much faster, better behaved, and longer lasting. The TB6612 is basically a set of power mosfets with some control logic, so it's convenient for this kind of power control.

User avatar
CorbeauCat
 
Posts: 28
Joined: Sun May 13, 2018 7:42 pm

Re: I want to make something like a Sinilink USB Switch Module but Adafruit IO compatible

Post by CorbeauCat »

What would be a good microcontroller for this that can run on a powerbank for an hour or so at a time? I also wonder if instead of having it be plugged into the microcontroller, if it is better that the lamp be wired directly to a MOSFET, it seems to have two wires running down the cable to the USB A.

User avatar
adafruit_support_mike
 
Posts: 67446
Joined: Thu Feb 11, 2010 2:51 pm

Re: I want to make something like a Sinilink USB Switch Module but Adafruit IO compatible

Post by adafruit_support_mike »

CorbeauCat wrote: Tue Mar 21, 2023 9:44 pm What would be a good microcontroller for this that can run on a powerbank for an hour or so at a time?
Any of them..

Even the ESP32 boards, which can use 300mA when their Wifi radios are active, can last a couple of hours on a battery.

For simple programming though, a board like the Feather 32u4 Basic or the Feather M0 Basic would be good choices:

https://www.adafruit.com/product/2771
https://www.adafruit.com/product/2772

Those both have a nominal operating current of 11mA, 3mA of which is the power LED. They're easy to work with and will run for days from even a moderately sized battery.
CorbeauCat wrote: Tue Mar 21, 2023 9:44 pm I also wonder if instead of having it be plugged into the microcontroller, if it is better that the lamp be wired directly to a MOSFET,
The microcontrollers can't handle enough current to light the lamps, so you'll need some kind of external hardware to manage the power to the lights. A mosfet could do it, but you'd be responsible for writing all the code to make that happen, and correcting any problems that come up over time.

The TB6612 isn't strictly necessary, but is convenient. It already has the power mosfets and control circuits to make the mosfets change cleanly when controlled by 3.3V signals.

Locked
Please be positive and constructive with your questions and comments.

Return to “General Project help”