I am a total newbie but i have a project in mind and willing to learn if i can eventually complete the project. Thing is i have no clue if what i want to do is feasible since i am unable to find any info about it.
I want to be able to activate a 12vdc motor at random intervals between 2 to 20 seconds per interval and have the motor reverse or switch polarity from one random interval to the next.
Am i barking the wrong tree? Is it a very complex project ? Or something a newbie can achieve without getting discouraged?
No, no, and probably yes.
Arduino is a micro controller. All you need do is have it control some 5v low-current gear that operates a 12v high-current motor. The hard bit will be getting it to work in a truly random manner, but some pseudo random manner may be quite satisfactory and a lot easier.
You are clearly not looking hard enough. There are a bazillion of them out there - specifically made for situations like yours. You may even find some solid state device that is more appropriate.
Probably not. Typically, an electric motor can be reversed by a double pole/double throw relay - the coil of which can be operated by Arduino in exactly the same manner as a simple on/off relay.
Just having a motor rotate at some speed for some time, but next time do the same in reverse rotation, all by itself doesn’t make much sense. What is your motor actually doing and will that doing be the same when the motor reverses? Have you selected a motor with brushes, so it can reverse easily, that will have enough torque to do the job?
Correct, an Arduino cannot power a 12V relay. But it can control the power to the relay. 5V relays are very common but you don't actually want one of those, you want a 12V relay. If you choose a 5V relay, it would probably be powered by the Arduino. If the Arduino is powered by 12V then providing enough power at 5V for the relay will put a big strain on its internal voltage regulator. Better to use a 12V relay, which can be powered directly from the 12V power supply.
Usually when we talk about relays on this forum, what we really mean is relay modules. A relay module contains the relay itself and also a driver circuit that may contain transistors and/or opto-isolators to allow the relay to be controlled by a lower voltage like 5V.
To drive the motor in both directions, you need a circuit called an H-bridge. This H-bridge can be a chip on a module, or it can be a pair of SPDT relays. (A DPDT relay is not required.)
When choosing an H-bridge chip or relays, you need to know the current that your motor will need. Knowing the voltage is not enough. Also understand that the current can be 5 to 10 times higher when the motor first starts compared to when it is running at steady speed. This higher current is known as the stall current of the motor.
Yes the original project was based on a stepper motor activating a rod moving forward and backward apparently at random with g code programming . But the weight constraints and the limitation on the power source needing to be portable and specific makes that approach rather costly.
Thank you. It makes sense now . So the 5v relay powered by the Arduino as i now understand it is an integrated module w a power transistor to trigger the 12v relay that powers the motor.
The 12v motor can pull at stall almost 25A so the H bridge would need to power a pair of these integrated 5v relays as well ? Or am i misunderstanding your statement.
Again i hope this is not wasting your time. This is virgin territory to me and i am feeling my way in the dark.
The motor is similar to an automotive power window or wiper motor 25A stall.
It activates a translating rod that moves a weight front to back in a semingly random movement. Operating amps is about 7 A but can be as high as 10A depending on the weight the distance traveled from furthest back to furthest forward position is 300mm or 12 inches. That is as much as i can reveal . I am exploring Arduino because of portability and the constraints of my power source. If it were not for that a stepper motor powered by a plugged power supply and programmed in G code would work well but much more expensive and bulky.
Again and to all posters, i am thankful and hopefully not an irritant. I am really blind here and ignorant of electronics.
I see that. May i ask for the correct search term for these Arduino 5v integrated relay modules so that i can get a visual clue of what they are. ( so long of course that i am not violating terms of the forums)
Thank you for your patience