Happy new year! Thank you so much for your messages! I saw them very late, I thought I would receive an email, I am sorry for the late response...Anyway, I am really thankful because with some keywords that you mentioned you helped me do some research for things that I didn't know.
ricky101:
Cannot see why that should not work.
Ok that's good news, I was just wondering how am I going to do it...am I going to just use four wires (2 for the DC motor and 2 for the Arduino) that are going to be connected straight on to the battery poles? Is this ok? Or it is necessary to use a something like a power supply module?
ricky101:
The Arduino jack socket can run off the same 12V dc but many suggest thats a little high to avoid overheating the onboard regulator, depending on what else the Arduino is driving.
You could use an external regulator instead, down to 7v to 8v or even 5v direct.
Here says that Arduino UNO has a Minimum input limit at 6V and the recommendation is at 7V...so i thought that a Regulator LM7807, which is giving 7V, would be a good choice to use between the 12V battery and the Arduino (with the Barrel jack), just to be sure that the on-board linear Regulator is not going to raise temperature. Do you think is too much or is it ok?
ricky101:
The L298 datasheet offers plenty of info, but suggest you look at the Arduino L298 motor shield schematic and create a current sense circuit as its quiet easy to blow its output transistors.
jremington:
The L298N driver can't handle the 3 ampere motor stall current, which the motor will briefly draw every time it starts up.
After looking closer to L298N module, it has 2A Drive current for continuous current draw but for instantaneous current draw has a maximum limit of 3A. So my thought is that since the DC Gearmotor is going to operate just for a few seconds each time and of course 3A is the Stall current, which means that probably the construction is not going to reach that stress level for more than 2 seconds, I am going to give it a shot and see if it's working.
ricky101:
An alternative module, the LMD18200 is said to be much more protected, many on ebay
jremington:
You will need a modern motor driver, like this one.
LMD18200 though seems like a much better choice than L298N, but I have so little time that if I order it now it will take about a month to receive it. MC33926 Motor Driver Carrier that jremington suggested seems more professional but again it will be my last choice (if the others don't work) as it costs triple the price against the other two.
I stumbled upon this website and I found out that a 3rd option to include to DC motor controlling would be to use a 2 channel relay board – module like this one. My only concern about this option is the speed i.e. the time that the system will take to switch ON and OFF after the photoresistors measurements. Could such problem exist, Do you think that this could be a major problem? In case of using relay how am I going to control the speed of the motor (There is no PWM)? Will i have to control it by lowering the Voltage with a regulator or a potentiometer?
jremington:
You need to know the average current draw of your project, while in typical operation, in order to determine the required battery capacity. A rough estimate for the hours of operation would be (battery capacity in mAh)/(average mA).
About the power consumption: the battery will supply with power two loads, 1) Arduino (and all that is on it), 2) the mentioned DC Gearmotor.
- Arduino will have connected on it:
- 2 simple photoresistors: maximum power consumption for each is 100mW (how much is this in mA?)
- A Motor driver module: If it is “L298N Dual H-Bridge” it has logical current draw 0-36mA, (the current for the operation of the board is different?)
- Or a 2 Channel Relay board: 15 – 20mA for each channel (the current for the operation of the board is different?)
Also Arduino by it self needs some power to operate, for example to run code, how do i calculate that operation consumption?
- The DC Gearmotor will be connected either to the “L298N Dual H-Bridge” or the 2 channel relay:
Relay is in fact switch which means that the Motor will draw current as long as the switch remains ON, I don't know for how long though, lets say for 1-2 seconds every 3-5 minutes. 3A is the maximum current draw. How do I calculate the power consumption with such information?
Is it also going to be the same with the motor driver or the DC motor will draw also current from the battery when the motor is not operating?
Sorry for the very long text, any comment and correction is of course welcome!