The potentiometer from the wheatstone bridge circuit can be adjusted to
have the voltage out values that i want. Now the h-bridge are different
from wheatstone. Potentiometer is the one to control the motor to
certain angles when given specific commands. What i want to achieve is
between wheatstone and h-bridge, i can have this case structure to give
commands to the h-bridge using if else statement.
This is the link for my L293 circuit. But i'm using only one portion since i'm using only one motor.
http://www.me.umn.edu/courses/me2011/robot/technotes/L293/L293.html
I
have Pin 1 as enable, pin 2 and 7 to control my motor to forward and
reverse. I use P0.0, P0.1 and P0.2 to give digital output to pin1, 2
and 7 respectively.+5V connect to pin 8 and 16, GND connect to pin 4
and 5.
So far, i can control the motor to forward and reverse in a
while loop but it won't stop unless i unable the toggle switch of pin 1
to 'Low'.
The operation looks something like:
Power supply(+10V) to wheatstone bridge circuit
Acquire voltage out from NI UBS-6009 by AI0, GND using DAQ assistant function
Gives
commands to case structure like if else statement, for examples if
voltage out data 5V is less than 10V, it return true condition and if
its greater than 10V, it return false condition and etc.
From case structure to while loop of h-bridge to dc motor
Lastly to my pendulum.