Can i connect 6v DC motor and 12v DC motor to adafruit motor shield v1, and an external 12v power supply?
also, how does it determine how much voltage needs to be supplied to a motor? is it done by code, when we set the speed of the motor, or the frequency?
Juraj:
voltage is like a pressure in a water hose. the current flow of water is determined by the sprinkler. but only until the pressure of the water drops.
umm, i know that actually, but i asked a specific question, can i connect two motors of different voltage ratings to the motor shield? and how does it supply the voltage to the motors , is it based on the speed we set in code?
is it done by code, when we set the speed of the motor, or the frequency?
None of the above.
Your source supplies the voltage, and is able to hold that until it reaches it's maximum current.
A motor driver doesn't do anything with the voltage (it might show some marginal loss).
It controls the speed by adjusting current.
You can set the current by sending a PWM signal through your code.
The frequency of that signal doesn't matter in this case (it might cause an audible noise if the frequency is within a certain range).
Juraj's analogy explains what happens, but you need some imagination to get that.
The voltage you're probably looking for, is the measured voltage at the motor.
That depends on the load that motor forms.
Ohm's law tells a lot of what's going on there.
The type of measuring equipment you use might help you out understanding this.
A digital multimeter shows you an average over a number of samples it takes.
So the measured voltage over the motor is also an average.
An oscilloscope will do that too, but if set correctly it will also show you a graphic of what the voltage looks like, and maximum as well as minimum voltages.
vikrant47:
umm, i know that actually, but i asked a specific question, can i connect two motors of different voltage ratings to the motor shield? and how does it supply the voltage to the motors , is it based on the speed we set in code?
you changed the title of this topic?
I answered the title "How does the motor shield determines how much voltage to supply to a motor?"