Hot answers tagged

4

To control AC power for inductive load (motor) a Triac is used. The concept is called phase cutting. It works for a resistive load (heater) too. This module is designed for phase cutting. It contains a zero crossing detector and a Triac. The control is done in MCU. The zero crossing detector is wired to an interrupt pin. The control signal for the Triac is ...


3

From the Amazon page you linked to: 1 dc+ : Dc power supply positive pole 2 dc- :Dc power supply negative pole (i.e. ground) Arduino: VCC: positive DC power supply GND: ground technically, VCC = the voltage at the collector of a transistor, these days it's used as shorthand for the positive output pin of an IC.


3

The pins have input protection diodes that clamp the pins to Vcc and Gnd. If a pin gets to >VCC +0.5V the positive diode clamp conducts and Vcc is powered via the internal Vcc bus, and if a pin get to < -0.5V the negative diode clamp conducts. With Vcc = 0V, the pin could act as if it were a low, but more generally folks see the chip acting like it was ...


2

I would unsolder the switch then solder in a FET in the configuration shown below. The FET will act as a switch and may be controlled with any digital output from your Arduino board. When selecting a FET makes sure you find something that will fit the foot print you have to work with on your board, and the gate-source threshold voltage is rated to handled 5V....


2

Consider constraining your design with clear requirements. As it is highly unlikely any design can protect its self for all situations. my relais module should keep a certain state (change of state is rare), no matter what happens to the arduino Consider latching relays where there is a set coil and a reset coil. Such as this one. Such a device ...


2

You are using pin 13, but you set pin 10 as an OUTPUT. pinMode(10, OUTPUT); Try changing that to pinMode(pinOut, OUTPUT); PS by not setting pin 13 to OUTPUT, digitalWrite(pinOut, HIGH); enables the internal pull-up, instead of "connecting" it to 5V. The internal resistors are around 35kOhm. So pulling a bit of current through them will result in a lower ...


2

I don't think there is a need for a specific "normally-open" opto-coupler. Same result can be easily achieved by using "normally-closed" opto-coupler and making a slightly modified "NOT" logic gate using three resistors and NPN transistor. 1. When INPUT is LOW: Base of Q1 is shorted to ground through R1 so Q1 not letting the magic pixies go through. This ...


2

If it's working with 12v on the input but not 5v, it sounds like the base resistor value (which is missing from the diagram) might be too high. A value of around 1k should ensure the transistor is fully switched on.


2

There are two solutions: Use the pin as a open-collector pin as in the answer of VE7JRO. Switch the pin between input (high) and output with low. I prefer to use the INPUT_PULLUP. Write the output value before setting the pinMode. All the microcontrollers of the AVR family (ATtiny and ATmega chips) allow to set the output value before setting the pin as ...


2

Yes. There's not a lot more to be said really. It's a relay, and they provide a MOSFET and associated circuitry to drive it cleanly. Just connect power and ground to the Arduino, along with the "Signal" pin to the GPIO pin of your choice, and away you go. Note that the relay is a 3.3V relay, so you must power it by the 3.3V pin, not the 5V pin.


2

From the image in the question, the jumper across pins J5 (in the below schematic) or JD as on the silk screen on the PBC is missing. Using the above schematic, a choice to power the Ardino and the relays off of one 5V power supply can be made. This appears to be done by connecting the 5V to the VCC pin, Ground to the GND pin & placing a jumper across ...


2

That appears to be a 12 "solid state" relay. That means that it is designed to be both powered by and switched by 12V. You're trying to drive it with slightly more than 1/3 of its rated voltage. Don't do that. Edit: Note that none of the relays being discussed are true solid state relays. These are are all conventional coil relays that include cicuitry ...


2

You might get away with powering a PIR sensor from a logic line. Check the specs. If it draws less ≤20mA you'd be fine. If you nee to drive more current than that you can use a CMOS TTL Driver or a properly selected N-channel MOSFET. Adafruit sells these, for example. A relay is another matter. If you this is one of those optically isolated relays and all ...


1

Sure you can. This site isn't a great place for open-ended questions like this though. Since you have a serious real-world need I'll give you some guidance anyway. You'd need to break it into pieces and solve each one in turn. First create code that recognizes long and short presses (not using delay().) You'll probably want to respond on releasing the ...


1

Finally i found it as a product available here with the thyristor circuit and electrical-contactless servo (PWM or ANALOG input) motor ( to drive the input) will helps to drive the output from 0 to 220V. smooth fan regulator can also do this with servo motor and without any external electrical component requirement . If it is not efficient way with low cost ...


1

Its not exactly what you are looking for but it will help Arduino-controlled-light-dimmer-The-circuit. Here is the sample project in which TRIAC is used with arduino for controlling the flow of current to the light. In your case Light or better we can say load is FAN. This will help you in controlling the FAN Speed. Relay only act as switch and it won't ...


1

If your chosen power supply is of a good quality and provides proper ground isolation then it shouldn't be a problem to connect the grounds of the two systems together. However, since there are so many bad power supplies available on the internet (and even some "good" power supplies are somewhat iffy when it comes to grounding) it is safest to hedge your ...


1

Can I directly connect an ESP GPIO pin to the base of the transistor where the arduino is connected? No. You will effectively be connecting two outputs together, and that is very bad. Instead you will need to add a second transistor in parallel to the first - one controlled by the Arduino and one controlled by the ESP-01. Can I put a relay module ...


1

I think what you're looking for is to declare your functions near the top of your file, usually before the first function you write, setup(), in this case. So add this just above your setup() function: // Forward function declarations void displayNumber(void); void checkUp(void); void checkDown(void); void checkStart(void); void countDown(void); C ...


1

Here is some code that might help you; leaving out the temperature and humidity stuff: // constants // number or relays const int relays = 4; // pins for the relays const int relayPins[] = {2, 3, 4, 5}; // relay cycle times const unsigned long relayTimes[] = { 5*60*1000, // 5 min 60*60*1000, // 1 Hour 2*60*60*1000, // 2 hours 12*60*60*...


1

I had this same issue with an ESP8266 NodeMCU-12E using Cayenne in the past. It would drop connection for no apparent reason, but no matter what, most of the time it'd never reconnect until a reset. Here's what I did: CAYENNE_DISCONNECTED(){ Serial.println(F("Cayenne disconnected, rebooting...")); ESP.restart(); } I've never used Blynk before, but ...


1

When you set a pin to HIGH then that pin will provide 5V. When you set a pin to LOW then that pin will be set to 0 volts. Which direction the current flows depends on what is at the other end of the wire. Current always flows from higher voltage to lower voltage. If you set a pin to HIGH and the thing it is connected to is at ground then current will ...


1

To drive a relay you'll need a transistor (a MOSFET is a good choice) and you'll need a diode across the relay coils to protect the transistor from the reverse current pulse when you remove power from the relay coils. As Majenko says, if you Google "Arduino relay" you'll find lots of articles covering the topic. (And if you use a digital output line from ...


1

Yes it is possible. Use the Blynk example sketch to activate the pin of the esp8266. Read the pin of the esp8266 with the ATMega. Handle in ATmega sketch the esp8266 pin as a second button.


1

As Wendall says in his comment, you probably have an issue with the power-on state of your logic pins before the Arduino finishes booting up. In addition to that, you should not drive a relay directly from an Arduino logic pin, for a couple of reasons: It can't provide enough current to drive a relay coil. The relay emits a strong surge of reverse current ...


1

There is also the issue of isolation here, to keep the controller side from being connected to the mains for reasons of noise and safety. The previous posters' comments about doing this with triacs or mosfets, and phase angle control are all true. It is nearly impossible to control the speed of a single phase induction motor. Anyway, the most elegant ...


1

A relay is an electromagnet-driven switch. It opens and closes that switch, but doesn't provide power. Assuming it's like my relays, that relay can either power the relay coils AND the logic inputs, or (if you remove the jumper) use separate power for the relay coils and the logic signals. Since you've removed the jumper, you need to provide 2 different ...


1

The problem is most likely EMI (electromagnetic interference) from the switching of the inductive load by the relays. The fact that you have your setup on a breadboard means that each and every pin of the ATMega328 is connected to a little antenna. That massively increases its susceptibility to falling prey to EMI. Add to that the fact that there is ...


1

If you have a relay that is activated by a LOW or ground path, and is deactivated by an open circuit or HIGH signal applied, then you could try switching the pinMode to act as the HIGH or open circuit. const byte pin = 2; void setup(){ // Define the pin as INPUT_PULLUP until you are ready to use it. pinMode(pin, INPUT_PULLUP); } void loop(){ ...


1

As fas as I know, by default digital pins are set as inputs. Arduino has internally only pull-up resistors, which you can use in that way: digitalWrite(pinOut[i], HIGH); in first setup() line (without pinMode(pinOut[i], OUTPUT);). If you need LOW state on start-up (pull-down resistors), you have to use an external resistor.


Only top voted, non community-wiki answers of a minimum length are eligible