How to Control a Motor with Visual Basics and a Serial Port?

  • Thread starter Thread starter darkness_limits
  • Start date Start date
  • Tags Tags
    Basics Visual
AI Thread Summary
To control a motor connected to an electronic chip via a computer's serial port using Visual Basic, a direct connection is not feasible. Instead, a serial-to-TTL converter is required, which allows for pin control through the serial port. By sending commands like "on 1" or "off 1," users can manipulate a switch or relay to operate the motor. An IO-board can facilitate this process, enabling high/low outputs through simple commands such as 'getInput()', 'setDirection()', and 'setOutput()'. This setup effectively manages motor control through a circuit linked to the serial port.
darkness_limits
Messages
11
Reaction score
0
hi please can anyone tel me how to control a motor connectd to an electronic chip connected to the computer uning serial port , using visual basics(iknow how to use VB )
 
Technology news on Phys.org
You cannot connect a motor directly to a serial port
You need to get a serial-ttl converter - available from lots of robotics toy companies.
These will provide a pin that you can drive high or low from the serial port. You can use this to control a switch or relay to turn the motor on or off.
You normally control it by sending text such as "on 1" "off 1" to turn on pin 1 etc.
 
In electronics class we use something called an 'IO-board' which is connected through the serial port. Our teacher has written a script to run it and we can use simple commands to write high/Low out throught 8bit.
So we basically use homemade commands like 'getInput()','setDirection()' and 'setOutput()' that does the job.
This is how we do it, and then, as mgb_phys said, we connect the motor etc to a circuit which is controlled by the High/Low from the 8bit.

Hope I was of some help.
 
Dear Peeps I have posted a few questions about programing on this sectio of the PF forum. I want to ask you veterans how you folks learn program in assembly and about computer architecture for the x86 family. In addition to finish learning C, I am also reading the book From bits to Gates to C and Beyond. In the book, it uses the mini LC3 assembly language. I also have books on assembly programming and computer architecture. The few famous ones i have are Computer Organization and...
I have a quick questions. I am going through a book on C programming on my own. Afterwards, I plan to go through something call data structures and algorithms on my own also in C. I also need to learn C++, Matlab and for personal interest Haskell. For the two topic of data structures and algorithms, I understand there are standard ones across all programming languages. After learning it through C, what would be the biggest issue when trying to implement the same data...
Back
Top