How does software create mechanical motion?

In summary, computer software and programs use electronic signals to control devices such as printers and robots. These signals are generated by the computer's microprocessor and are used to turn on and off transistors, which in turn control the motion of devices. This process is similar to how our brains control our bodies through electrical signals. The abstract idea of a program becomes concrete when it is running and producing actual electronic signals. These signals are then used to manipulate physical components, such as motors, to perform tasks. Inside a computer chip, this process is repeated as the chip's components, including MOSFETs, use electronic signals to control other components. This is similar to how a plane is controlled through small changes in mechanical angles.
  • #1
Red_CCF
532
0
Hi

I have a relatively general question. How does a computer software/program (ex. like a printer driver) cause mechanical motion/action (ex. actual printing by the printer)? Another example would be software controlled robots, an input into a computer software causes robots to perform certain tasks, but how does a program, something abstract, get converted to such motion?

Thanks.
 
Engineering news on Phys.org
  • #2
That's the beauty of the electronics (okay, and computers, too!) Instead of flipping a switch, or dropping an egg, or mixing two chemicals together to start off some Rube Goldberg contraption, some bits of silicon can do it for you (assuming they're configured properly).

When you flip a switch, you can start a motor going. Flip the leads around, and you can get the motor going backwards (in the case of simple electric motors--there're quite a few of them). A transistor acts as an electronically-controlled switch, which means that you don't have to physically toggle something on and off.

When you write a program to turn on a motor, it's represented on the screen as a bunch of lines of code. However, that's purely for YOUR benefit. The machine code generated (or interpreted, in the case of some languages) is run by a microprocessor somewhere down the line, and it's able to turn on a bunch of transistors, or send instructions to your inkjet printer, and have it control a bunch of transistors. By controlling these transistors, you are basically turning switches on and off, and (in the case of the inkjet) they move the print head back and forth across the page.

That may sound simplistic, but remember that even in a lowly inkjet, you have the coordination of multiple motors, and good enough coordination that you can print off some fairly high-quality pictures. And that's why I've always been fascinated by electronics and microprocessors: you'd never be able to get that degree of control and ease-of-configuration with some clockwork apparatus.
 
  • #3
I might add that a computer also uses feedback information to tell the program what the device it controls happens to be doing. Again, it will be basically a set of switches providing inputs to the computer. This is just how your brain controls your body - without the feedback, you would just be flailing your arms and legs around and getting nowhere!
 
  • #4
sophiecentaur said:
I might add that a computer also uses feedback information to tell the program what the device it controls happens to be doing. Again, it will be basically a set of switches providing inputs to the computer. This is just how your brain controls your body - without the feedback, you would just be flailing your arms and legs around and getting nowhere!

Or worse yet, you'd be thinking about moving, trying your best, and you'd just be staring at your arm lying there futilely! Then again, that's probably the para/quadrapalegic experience...
 
  • #5
Red_CCF said:
Hi
but how does a program, something abstract?
Programs are not totally abstract. Each line of program you type through your keyboard, changes the state (the current loops or smthing like that) of the RAM. These states can be further transferred into the robot or Printer by pressing some other key combination of keyboard. (eg Ctrl C, Ctrl V :yuck:). Then, the motor, which is already wired to rotate as per the state saved in the printers memory, will rotate so as to print what you just typed!

I hope my paragraph was redable.
 
  • #6
Red_CCF said:
Hi

but how does a program, something abstract, get converted to such motion?

Thanks.

The program was abstract when it was just an idea in the programmer's head but it ceases to be abstract when it is actually running because real currents are flowing.
This is a philosophical point, actually and it applies, just as much, to the actions of our bodies which we make as a result of an 'abstract' idea.
In fact, at this very moment, I am demonstrating how my abstract thoughts are becoming keystrokes and getting these ideas to thousands of avid readers. (perhaps a few dozen)

There is a parallel in Maths: Three sheep take away one sheep will result in two sheep (concrete)
but the statement 3-1=2 is quite abstract.
 
  • #7
I think the replies missed some of the nuts and bolts.

Computer chips have pins. If these pins are configured as outputs, they emit voltages (as inputs, they detect them). Usually, there are two possible voltages: 0V and 5V (or 3.3V or 1.8V, depending on the chip). The voltages can be used talk to other chips such as memory, or they can manipulate analog electrical circuits. In particular, a MOSFET takes a voltage on one of its pins as input and controls whether two other pins are short-circuited (ie, it's a switch). A computer chip running a program outputs 5V on one of its pins, a MOSFET is switched on, a motor is connected to its battery, and it turns.

Btw, when turned on, an Intel microprocessor knows nothing but to emit a certain pattern of voltages on its pins. Hopefully, a memory chip is connected by printed wires (PCB traces) to these pins and responds to the electrical pattern with an electrical pattern of its own. This response carries the actual machine code that the microprocessor uses to boot. This dance continues with many other chips, and the computer operates. Device drivers run, a lot of computation goes on, and finally the chip that most directly controls the motor toggles its own pins.

Inside a chip, you also have this dance of voltages. In fact, the chip is composed of the very same MOSFETs that can be used to control a motor! You see, their property of taking an input and creating a short circuit is quite useful. But that's a story for another day.
 
Last edited:
  • #8
This very similar to how planes fly. You have very small changes of mechanical angle in the rudder etc. But the whole plane changes its motion. Whenever you think about such things, think about a crane where a small guy moving a joystick and the tons of steel moves in some direction. Or ever wondered how contactors work under a lot of Amperes of current.

It is relatively easier to drive the printer since the load is pretty small and many components can be controlled directly by digital signals which are used to carry also information. It is the engineering motivation to steer energy from one place to the other while creating "useful" stuff.
 

1. What is the basic principle behind software creating mechanical motion?

The basic principle behind software creating mechanical motion is converting electrical energy into mechanical energy. This is achieved through the use of software-controlled electronic devices, such as motors and actuators, which can convert electrical signals into physical movement.

2. How does software control the speed and direction of mechanical motion?

Software controls the speed and direction of mechanical motion by sending instructions to the electronic devices, which then adjust their output accordingly. This can be done through programming specific movements and speeds, or by using sensors to gather feedback and adjust the motion in real time.

3. Can software be used to create precise and accurate mechanical motion?

Yes, software can be used to create precise and accurate mechanical motion. By programming precise movements and using advanced sensors and feedback loops, software can control the motion to within very small tolerances, making it suitable for a wide range of applications.

4. What types of software are commonly used to create mechanical motion?

There are various types of software that can be used to create mechanical motion, depending on the specific application. Some common examples include CAD (Computer-Aided Design) software for designing and simulating mechanical systems, control software for programming movements and adjusting parameters, and motion planning software for optimizing complex movements.

5. How can software be integrated with mechanical systems to create efficient motion?

Software can be integrated with mechanical systems in various ways to create efficient motion. This can include using sensors to gather feedback and adjust movements in real time, optimizing movements through advanced algorithms, and using complex motion planning software to minimize energy consumption and increase efficiency.

Similar threads

  • Computing and Technology
Replies
13
Views
2K
Replies
2
Views
830
Replies
37
Views
3K
  • Programming and Computer Science
Replies
7
Views
461
Replies
36
Views
2K
Replies
2
Views
6K
  • General Discussion
Replies
9
Views
1K
  • STEM Educators and Teaching
Replies
22
Views
3K
Replies
5
Views
1K
Replies
7
Views
1K
Back
Top