I need help setting up my photon as a control switch for a electric fan. I am new to all the electronic stuff, (adding switches and relays and stuff). I need advice in doing this.
What does the hardware look like? What kind of connections, and what relay modules do you have?
There doesn’t seem to be a lot of low-voltage circuitry which the Photon could interface with directly. So your best bet is to put a relay in-line with the on/off switch. The on/off switch would be your master power switch and the relay would be your internet controllable switch. You would need at minimum, a relay and a MOSFET. From the Walmart symbol in the background, I’m assuming you are on the US power grid so you need a relay rated at 120V and with a current rating above whatever that device is rated at (actually about 20% great for safety). The relay would be controlled by one of the Photon’s GPIO pins. But, the GPIO pin usually can’t supply enough current to activate the relay. So that’s why you would need a MOSFET between the Photon and the relay. The MOSFET would be controlled by the Photon and would allow enough current to flow through the relay control coil.
If you would rather have a pre-built relay solution, look at the ncd.io offerings here:
The one down-side of the ncd offerincs is that they are a bit large and might not fit your available space. In that case, you might want to explore using an Argon with the Particle featherwing relay board:
Something like this might work with the Photon:
You also have to consider how you will power your Photon when enclosed in the fan. Is there 5-12V power available from that fan module? If not, you might need to find a 120V to 5V power supply that can fit in the enclosure.
If you didn’t want to mess with high voltage (over 24 volts can get really dangerous!!!) you could try one of these:
and control it with a Photon.
Else, the boards @ninjatill mentioned are good, or you could buy the Particle relay shield:
If you wanted to control your fan from your phone, may I recommend a project I had a lot of fun creating and building an app for?
It’s all here:
Cheers,
Gustavo.
Thanks for the advice!
Ok. I think I have a power supply in mind.
Thanks
Can you help me out with this? I can’t get this working for anything
What seems to be the issue, as the question is rather broad?
@julybread, it seems non of the head pins on the relay featherwing are soldered!! You may want to solder those before testing!
Dude, thanks for that reply! Sorry took me so long to respond back. I finally got it soldered.
Thanks
I don’t think this one alone will work. The Photon maxes out at 25mA, and this has a working current of 65mA.
That’s why the suggestions above mentioned a MOSFET. The Photon can use low current to control the MOSFET and the MOSFET can supply a higher current to the relay. Some of the modules above have a MOSFET built into them and only need a logic signal for control.