I'm baby fresh to coding but, I'm looking to build a code to trigger a fan (relay) with a PIR sensor and a press button.
Idea is to kick the fan on if someone walks up to the outside of the door with PIR (forgot to mention fan is mounted above a door). Or to also trigger fan with button if opened from inside.
Basically building a commercial entrance fan for my house to help keep the bugs out.
If you have a wiring diagram, please post it. Hand drawn, photographed and posted is fine. Include all pin names/numbers, components, their part numbers and/or values and power supplies. Fritzing type diagrams are less than desirable.
Supply data sheets or other technical data for the relevant components.
It is easy to understand and has a good mixture between explaining important concepts and example-codes to get you going. So give it a try and report your opinion about this tutorial.
does "commercial entrance fan" mean that you want to sell this device in series?
hm I guess if this shall be efficient you would need a huge fan which creates a somehow stiff breeze blowing against the person that wants to come in.
triggering the fan (relay) opening door from inside
The idea I have at the moment is, when the door is closed the momentary switch will be pressed and the fan (relay) needs to be off. Then when the door opens and releases the momentary switch the fan needs to kick on for roughly 15,000ms.
triggering fan (relay) from outside
The idea is to trigger fan (relay) with movement with the PIR sensor. Then door will be open, which will trigger the momentary switch, and that signal needs to be ignored.
A fan operating at a voltage of 110V means that your complete product must fullfill a lot of security requirements. Do you have a graduation / certificates in electricity / electronics?
yes I have exp with electrical just not coding. I can build automotive wiring harnesses from scratch, built a homemade spot welder, and my own cctv set up. I understand and respect the danger of higher voltage.
I could make the device work easily without code just using mechanical systems but, I've decided to expand my know how and learn Arduino.
It is easy to understand and has a good mixture between explaining important concepts and example-codes to get you going. So give it a try and report your opinion about this tutorial.
And this constant worry about safety is killing progress. Why are the countries worried about safety the only ones in decline? Life is risk, success is risk, not excepting that fact is a mental illness.
if you mean the USA my impression is:
a part of the rich try to make money by lawsuits that the riscs were not clearly enough explained on products.
IMHO the declining is caused by something else:
Another aspect is that real good education is not for free. Conseqeunce the folks get dumber and dumber. It is easier and more effective to shout a scary boooh! to get the dumb people run in the direction the rich wants them to run (and vote).
additionally each rich individual wants to keep his money and in summary this leads to a slowly increasing dumbness of the people. The next level is started by chatGPT.
But I'm straying away into politics.