In post #16, the relay coils are 12 volts not 5 volts.
Do not drive your relay coils directly with Arduino pins.
An Arduino output pin can safely supply 20mA.
For the Arduino to count turns, you need to have a sensor.
In post #16, the relay coils are 12 volts not 5 volts.
Do not drive your relay coils directly with Arduino pins.
An Arduino output pin can safely supply 20mA.
For the Arduino to count turns, you need to have a sensor.
What do you mean by that?
Count based on turning time in some direction.
If you try to take more than 20mA from an Arduino pin (example your 150mA) you will destroy your Arduino.
You can time events with the Arduino, however, this is not the same as counting turns.
Suggest you also keep the limit switches as a fallback.
Why is that? Everywhere I've read online states it can output 133mA and can certainly turn on relays.
But I do know how long a single turn takes, and how many turns it takes for the blinds to go from top to bottom.
With your suggestion; using transistors, relays and limit switches, Is an Arduino needed?
Thanks
20mA is the value that can safely drawn form an output for an UNO.
You are the one who suggested timing. You need to apply power to the motor and time how long it takes. You need to time the number of turns.
For accuracy, a sensor wheel needs to be attached to the motor shaft and use an optical switch or physical switch (a limit switch would work) to detect one revolution.
Well if you want to open and close at a specific time of day it makes sense to use a controller. An RTC could be added and would tell the controller the time of day.
This is your project, itβs incumbent on you to design how you want things to function.
We give you the reasons why you should do things correctly.
Ignoring said advise will result in your failure.
Hello. I'm back on this project - powering a 12V motor in 2 directions with 2 relays, 2 transistors, Arduino Nano and a 12V DC adapter.
Just to make sure I understand the diagram- the coils will be powered through the 12V adapter? (only when the transistor is cunductive of course)
Also, what is the 1N4007 (light blue part) used for in here? i Google said it's an AC/DC adapter so I don't understand.
Thank you
The diodes across the relay coils are called kickback diodes.
When the relays are de-energized, they produce a high voltage spike.
The diodes absorb the kickback spike.
The diodes on either side of the motor do similar as the motor also produce kickback spikes.
Make sure you use the normally closed contacts on the limit switches.
To move the motor, one transistor will be ON at a time.
The limit switches are there to stop the motor when it reaches a maximum point, i.e. up/down or left/right.
Ok thanks. 2 more questions please:
Regarding the limit switches, you mean that one should be placed at the top and one at the bottom and mechanically limit the turning? I'm not sure if it's doable. First of all the blnds are quite long so I will have to put one switch far from the main enclosure of the project, and also physically I don't know how to place them.
Maybe that's not what you meant.
I see in the diagram R1 & R2, I suppose these are resistors of 470 ohms?
Why are they needed?
Thanks.
The 470 ohm R1 and R2 resistors are to limit the Arduino output current to a safe level; these could be 220 ohms also.
Safe for the Arduino?
Yes
We want to keep the maximum Arduino output current to less than 20 milli amps.
OK.
When choosing a DC motor for the project, does the stall current matter? All of the motors I consider getting have a stall current between 2A to 5A, and a free run current between 0.15A to 0.25A.
I have a DC adapter of 12V/1A. I could also get one with 3A if needed. Please let me know if the stall current matters and how. Basically I don't expect the motor to be stalled as it's rated power will be much more the blinds weight - The motors I consider are between 9.4kg.cm to 49kg.cm and the blinds weigh less, as you can imagine. they are bigger than average but not gigantic.
thx
If you have a 12V/1A supply, try it to see if it works.
But what exactly does it mean?
Is it like the range of current drawn between free run to stall? So I will get only a torque in the ratio of the 1A / Stall current?
Any important stuff to consider when choosing a DC motor for this project and generally?
Thanks
Is it like the range of current drawn between free run to stall? So I will get only a torque in the ratio of the 1A / Stall current?
Any important stuff to consider when choosing a DC motor for this project and generally?
Less than what it can move while running with no load?
Hi all and the mighty @LarryD especially.
So I got my components today and tried building a test circuit on a breadboard. I've put a picture of it here, probably worthless but maybe you could understand something from it.
My idea for this circuit was to put a resistor instead of the motor and test the voltage drop across it with a multimeter.
I just wanted to use "one side" of the circuit; one relay which will be NC short, and it's NO will be connected to power, and at command by Arduino Uno's pin D7 it will close the circuit and there will be voltage on the resistor. The other end ("2nd side") of the resistor is simply connected to ground.
Long story short there was 0V across the resistor and although it's leds still work, I can't upload anything the Arduino now...
Maybe you can identify my mistake, I think maybe I got something wrong with the relay's pins.
I also added it's datasheet(model G5SB by Omron), maybe I haven't interpreted it correctly. I connected pin 3 (on the datasheet) to the power supply and pin 2 to the resistor.
I've also put here a schematic of the circuit.
Thanks in advance
Import the schematic offered you (in Post #28) into a graphics editing program.
Add and erase elements in the image with your graphics editor so you can better show what you are doing.
It turns out the website had the wrong relay datasheet so the pinout was wrong.
Anyway, I made a small circuit that turns on and off an led every 3 seconds with Arduino through the 2N2222, relay and the 12V 1A PSU and it worked great. I then replaced the led with the motor I'm using for the project but instead of turning, it moves like one tiny step each time the relay's coil is turned on.
The motor is supposed to work at the given current and voltage. For the led I did put a resistor but not for the motor.
Any idea why this is happening?
Thanks