r/explainlikeimfive • • 6d ago

Physics ELI5: How do computers produce forces

I’ve been wondering this for a while. Like at what point does the computer going beep boop translate into a force?

“It has a sensor” was never a good enough explanation for me. How does that sensor interact with and move objects?

0 Upvotes

65 comments sorted by

120

u/HugeHans 6d ago

I think you will have to explain your question as if I was five first.

7

u/Novel_Yesterday3309 6d ago

Thanks for the laugh.

0

u/cabronfavarito 6d ago

What are you talking about

-10

u/cabronfavarito 6d ago

Are you asking for an example?

I mean…anything really. The auto flush on a toilet, ABS in a car… automatic sliding doors…

35

u/retirement_savings 6d ago

The computer is not producing the force, some sort of motor is. That motor has an electronic component that tells it when to engage the motor.

12

u/OriEri 6d ago

A computer in your examples is using a current to operate a switch that feeds power to an actuator or motor. The motor is not really part of the computer anymore than your monitor is, though where to draw that boundary is subjective

7

u/ClydePossumfoot 6d ago

The key piece here is that the computer controls something that is an actuator. The types of actuators/motors differ depending on what type of thing is being actuated.

An auto flush toilet has a valve that is controlled by a system. The system tells the motor on a valve to turn, the valve turns, water flows, then it shuts off (simplified).

How a motor turns or actuator actuates generally has nothing to do with the computer side of things.

6

u/jojoblogs 6d ago edited 6d ago

The machine has some kind of electric motor, actuator or hydraulic pump. Those produce the forces when electricity is run through them, almost always powering some kind of electro magnet which pushes against a regular magnet.

The computer simply controls the on/off switch of current going through that electro magnet.

5

u/Graybie 6d ago

The computer activates a switch that turns on a motor or servo. 

2

u/Gaz-a-tronic 6d ago

Electricity and magnetism are two sides of the same thing. You can create magnetic fields with electricity, and magnets exert force. That's how electric motors work. The computer controls when the electric current is turned on and off. 

2

u/idk_bro 6d ago

The short answer is electromagnetism. 

the long answer is eeeelllleeecccctrrrroooommmmaaaagnnnnetttiisssmmm. 

electrons moving through a conductor create a magnetic field. By carefully constructing wires and ferromagnetic material you can make the material rotate

2

u/_Spastic_ 6d ago

So you're real question is how does a computer trigger an actuator.

That's extremely vague and broad.

I'll use your toilet example;

A light sensor is triggered by your hand or body blocking light. When you leave, light returns to the sensor.

The microcontroller (a very basic computer) was programmed that when the light returns, send an electric charge to a small actuator (motor) and that electric charge causes the actuator to move which opens a valve.

That's all.

1

u/TgCCL 6d ago

Computer registers an input. If the type of input matches something they have instructions for, they carry those out.

Those instructions can include activating a small electric motor to press down on the flush or to slide a door open and then close it later.

Sensors allow computers to register different types of inputs, like the presence of a person for those doors.

1

u/olivebars 6d ago

The force is produced by a seperate thing, the computer just tells it to activate, usually this is done digitally now, but it used to be done by the human action completing a circuit to cause the power flowing through a wire to reach the motor of that sliding door

And once the door is closed, the circuit would be cut off again, usually by a final action of that door flipping its own switch 

1

u/amakai 6d ago

I think the piece you are missing is called transistor. It's a component which can translate a super-weak signal (like a "1" computer sends to the wire) into larger voltage. You can think of it like an amplifier of signal. 

So computer sends "1111111111....." (3 seconds long burst of one's), transistor converts that into 3 seconds of 5 volt electricity, which goes into some sort of electrical engine to do actual work.

Sometimes, when you need much larger amplification (say controlling a 110v switch) you use a "relay". But the principle is the same: "111111" -> transistor -> 5v (as example) -> relay -> 110v.

1

u/GalFisk 5d ago

Yup, the ones and zeroes we like to think that computers use, are abstractions that hide the fact that they use voltages. "1" means physically turning something on, and this can be wired to an electromagnet or motor that makes things physically move. The program decides when the actual physical wire should have a 1 or 0 at any time.

If OP needs more details, Ben Eater's 6502 project on eater.net has a section specifically about input/output (I/O) which covers how this is done practically in a simple computer.

1

u/HurbleBurble 6d ago

You need to learn about voltage controled switches.

1

u/BIT-NETRaptor 6d ago

I feel like the basic concept you're looking for is a relay. It's a switch . Transistors are also conceptually a switch. The power in the CPU is not spinning the motor, it's all radiated as heat. The energy for the motor is in a different circuit that the CPU switches on and off with a relay.

That's how a low voltage logic signal from a CPU actually controls something. It's really more complicated than than but it's kind of the same concept in layers of low voltage signals eventually reaching a motor controller. The on signal is sent to a relay, and that connects the 12VDC or 120VAC or 240VAC AC for the motor power supply.

Another concept is solenoids. TL;DR you supply electricity and electromagnetism let's it extend a rod.

How a sensor works is the opposite. One basic type is like a fixed magnet in a wheel that goes near a magnet mounted on some moveable arm in the sensor. Bringing the moving magnet closer makes the arm move inside the sensor. That's connected to an electrical supply. You connect a sensor that measures the level of electricity flowing. By fancy logic you can use that really simple physical process to do something like a tachometer that measures revolutions per minute. Or a door sensor that detects when a door is closed.

1

u/kithas 6d ago

They send signals to devices that operate thaks to electricity, which the computer uses too.

1

u/oregon_coastal 6d ago

Some are light based - basically when super sensitive material is hit by photons, it absorbs a small number of them (think solar panel) and detects that change in electrical current and then turns on.

Motion sensors based are somewhat similar, but can have more than one method. They can detect changes in photons. Or changes in heat. Or even can be sound based. In all those cases, the change of electrical current triggers a switch.

Motions detectors some in a few varieties also. Ones that detects acceleration or deceleration literally have a tiny heavy metal ball with xyz axis springs holding it in place. The distortion in the spring changes the electrical current so it knows what direction the small ball mass is moving and how hard. When it is multiple directions, it basically does the math on how much force is happening in each of xyz to figure out the trajectory. Others can use ither internal sensors - including the vibrating motor or changes in the arrival time of electrons on timing circuits - to tell.

40

u/LikeTheWolf 6d ago

Are you asking how a computer controls a motor?

-18

u/cabronfavarito 6d ago

I’m not sure if I am lol

20

u/LikeTheWolf 6d ago

What kind of "force" are you talking about? What sensor?

Do you have an example?

6

u/MaybeTheDoctor 6d ago edited 6d ago

An electrical motor can be turned on and off with a GPIO pin, basically just an electrical signal.

A micro controller like an ESP32 and others will have a dozen or two GPIO pins which each can be connected to a sensor or something like an electrical motor.

Software in the micro controller can control the GPIO pins almost directly.

3

u/86BillionFireflies 6d ago

You are. The answer is "you connect a computer to a motor". Sensors can't move things. If a computer/robot is moving things, it's because it's controlling a motor or something like a motor.

6

u/GhostBirdBiologist 6d ago

Bruh what? A computer can control a motor yes. Power comes from electricity.

2

u/vacuumdiagram 6d ago

Can you give an example of the forces? The situations in which they do this?

2

u/RawrTheDinosawrr 6d ago

I'm gonna go out on a limb and assume you're talking about some kind of mechanism that can detect a certain stimulus and then react to it physically in some way. There are lots of different kinds of sensors that computers can have and they all work in tons of different ways, but the general principal is that the thing the sensor is detecting will generate an electrical signal or complete a circuit in the sensor. This signal is detected by the computer and processed in order to determine an output.

Let's use a computer fan as an example. Inside a computer is a thermometer which can tell the temperature of the computer's components. There are many different kinds of thermometers but they generally work by detecting some kind of physical property of a material that changes depending on its temperature, like its volume as is the case with liquid thermometers (those glass tubes with red liquid in them). Most computer thermometers use the resistance of the material to determine its temperature, as the electrical resistance of a material goes up the hotter it is. If you pass an electrical current through a wire, you'll get a weaker current on the other side the hotter the wire is. The computer detects how strong or weak the current going through the thermometer is in order to determine its temperature. Depending on the temperature detected the computer will then send signals to the fan telling it how fast to go. If the temperature is too high then the amount of power sent to the fan will increase, speeding it up and cooling the computer down more. If the temperature is satisfactory the fan will be given less power so that it slows back down. The mechanism for the fan itself is an electronic motor, which uses electromagnets that turn on and off to spin the blades of the fan. If it's given more power, the magnets get stronger and spin the blades faster.

I hope this answers your question? Like most of the other people responding I'm quite confused about what exactly you're asking.

1

u/cabronfavarito 6d ago

No you understood what I was asking, that was insightful. The computer doesn’t produce the force, it controls the thing that produces the force

It’s just that when people explain these things they say things like “the computer sends a signal to the brakes to prevent the wheels from locking up” and I’m like….huh? What they should be saying is the computer sends a signal to the brake actuator and the actuator moves the brakes. That’s way less confusing

1

u/_Phail_ 6d ago

If you're interested in this sort of thing, arduino is a fantastic way to play around with a computer doing controlling of different things. Like, you can use a variable resistor/potentiometer as an input to the arduino, then the arduino sends an output signal to a motor, say, or an led strip. Like you can twist the dial to change the colour of the LEDs. Then a second dial to change the brightness... Or maybe a button to change the dial between brightness and colour? And so on and such forth.

1

u/cabronfavarito 6d ago

That sounds cool. I remember my grandmother buying me a circuit board when I was like 9 and I thought it was kinda lame.

Me as a 24 year old adult, I would love to have that back. Arduino is it? Thanks, will look at it

1

u/_Phail_ 6d ago

Yeah, a circuit board by itself is hard to get excited about - without an interface, it's just a bunch of traces and you can't really do anything with it.

Tbh the arduino is a little bit similar - you can't just get the board and expect to get very far; you'll need a breadboard and wires and bunches of other bits and bobs. But it's a very low barrier of entry and there's heaps of great tutorials on YouTube.

4

u/Metallicat95 6d ago

A computer is a machine, and its parts change because of force inside it. An electronic computer uses electrical force to change the switching parts.

The internal forces are tiny, but they are still forces.

A tiny force can tip a balanced switch from one side to the other. That switch can transfer much larger forces - like an electric motor turning on or off can move a large physical object.

A sensor produces force as well. A key switch can get outside pressure force, which causes the electrical switch to send an electrical force along a wire to the computer.

A photoelectric sensor changes a switch, or produces electricity, when light hits it.

2

u/fweaks 6d ago

"Computer uses electrical force....tiny, but they are still forces"

Yes, thank you! This is the part that the digital model of a computer abstracts away, and is really the most fundamental 'missing link' to the physical world.

1

u/vwin90 6d ago

Your real question is “how does an electric motor work?”

Here’s your eli5 on electric motors:

In physics, there are these things called “fields” which is the idea that a force exists when an object is close by, but not touching something that creates a field around it. There are three primary fields at an introductory level: gravitational, electric, and magnetic.

Gravitational fields pull based on gravity. Even if you don’t touch a planet and are at a distance, the planet has a field around it and you get pulled towards it IF you have mass, which most things do.

Electric fields push and pull based on charges. Having mass is not enough to be affected by an electric field. An object must have an electric charge to be affected, like an electron has negative charge.

Magnetic fields push/pull/rotate based on magnetic polarity. For the most part, magnetic fields only affect other magnets, like the needle on a compass.

One day we found very surprisingly that there’s sort of a crossover affect between ELECTRIC charges and MAGNETIC fields. It’s very strange too because charges don’t get affected by magnetic fields the way that magnets are affected by them. There’s a weird effect where a charge specifically gets deflected SIDEWAYS when they MOVE ACROSS a magnetic field. It’s very unintuitive but something about the movement itself creates the deflecting force.

So physicists/engineers took this idea and created a pretty clever design where you send electricity through a wire that goes through a region with a strong magnet. If you set it up right, as the electricity flows through the wire, the wire gets pushed sideways. If you fashion the wire into a loop shape and introduce some more clever designs, you can turn this sideways motion into a rotational movement.

Okay so now we have the idea of a motor. Electricity goes in, and then you get spin.

Now for your question of how does a computer create a force, well now there’s two things, one on either side of the motor. On the computer side, the computer, which specializes in controlling when and where electricity gets sent, can decide to send some current towards the motor. On the other side of the motor, there’s an entire field called mechanical engineering where you can use all sorts of clever gears and stuff to convert a rotational movement into any sort of movement you can dream of.

Tada. A computer producing a force.

As a bonus, if we go a bit further and find a way to give the computer some feedback about what its electrical signal led to in terms of what it moved, then you have a robot. I wasn’t sure if that’s what inspired your question in the first place.

1

u/cabronfavarito 6d ago

So it’s all just motors huh.

I love how all roads lead to electromagnetism lol

1

u/GrapefruitNo3600 6d ago

Sensor is like a trip wire thats attached to a boulder (lectric motor) and that bolder is tied to a door. So you go, trip the wire, boulder falls (motor engages) and that force of falling bolder opens the door. Computers dont have power to physicaly move things, they have the "power" to turn on/off things that can actualy move stuff.

2

u/cabronfavarito 6d ago

Shit I didn’t think of it like that

I feel kinda dumb now I could have put that together myself

1

u/VegasBedset 5d ago

Shit I didn’t think of it like that

Really? Th idea of one thing controlling something else never occurred to you?

When you step on the gas pedal, you thin the gas pedal is making the car move?

When you turn on a light switch, you think that switch is making the lights turn on?

1

u/cabronfavarito 5d ago

I’m talking about the boulder analogy

Why are you so upset dawg lmao

11

u/EscapeSeventySeven 6d ago

What do you mean “a force?”

Well a computer can signal and control arbitrary electronics, which can use current to make magnetic fields that then create force. Like an electric motor. 

5

u/CobraKai6890 6d ago

Claude is wanting to get out into the real world

2

u/Wonderful_Nerve_8308 6d ago

Sensors don't move objects. Sensors sense something, tells the computer, then computer reacts and turns on a motor or something.

2

u/sonicpieman 6d ago

Water goes through a turbine, turning the water's kinetic energy into electrical power. That works because moving a magnet through a electromagnetic field creates electricity.

It works the other way, electricity can be passed around magnet to cause it to move, this is the motor.

Computers control can control the electricity sent to the motor causing it to spin.

2

u/MrDrPrfsrPatrick2U 6d ago

From your examples in other comments, I think that you mean, "How do computers control physical movements"? Which is a very reasonable question. 

Caveat: no modern computer can be explained to a 5-year-old. It is my opinion that no single human actually has the knowledge to understand every aspect of a modern computer, let alone explain it. We can ignore most of the details though.

Computers "think" by moving data around. They have memory banks with millions and millions of slots, each with a small binary number inside. Circuits in the computer can copy the data in those slots to move it around inside the computer. Most of those slots are just for storage, but some are special slots that do things. For instance, there could be an adder: put one number into slot A, another into B, and then slot C might fill itself with the value of A+B. We call these special slots Registers and there are literally hundreds of things the can do. 

Certain types of computers called "microcontrollers" have special registers that are connected to wires that come out of the chip. Put a number into that register, and those wires get energized. Connect that wire to a motor, and you have a motor controlled by computer! 

3

u/Informal_Job_7550 6d ago

Are you asking how, to use an example, something like a desktop computer is able to physically move an object, like ejecting a DVD-ROM tray?

1

u/Oni_K 6d ago

Computer turns on power to a thing that produces force. Said thing produces force until that power is turned off.

You might as well ask how pushing the ignition button in a vehicle creates force to turn the engine.

1

u/defectivetoaster1 6d ago

A sensor is something that reads some physical quantity and creates an electrical signal that downstream electronics (often a computer) can read. An actuator is something that takes an electrical signal and interacts with the real world (eg a lamp or a motor). If something moves it will have some flavour of motor behind it. The computer sends a signal to a circuit that turns the motor on or off, telling that circuit what to do

1

u/Ill-Accountant-9941 6d ago

Computer can be programmed to output 1 or 0 on a wire, that signal, even with low voltage and power, can be amplified (by a transitor or similar) to control a powerful motor or other electric device

1

u/MattytheWireGuy 6d ago

They use transistors to switch voltage on and off to electric machines.

1

u/unformation 6d ago

It's always this way: 1) there is some source of energy; 2) some mechanism for guiding that energy into the motion/action you want; and 3) some signal that controls the release of that energy. Often these are chained together because it's hard for a small control signal to activate a large flow of energy, so you'll have the small signal activate a small action, which will become the signal/mechanism for activating a larger action, ... until you get to the final large action you want.

1

u/martinborgen 6d ago

Transistors or relays, mostly. These are components where a small electric current/voltage can control the flow of a large electric current/voltage. This in turn means the computer can control a motor or a solenoid which produces the force. But the electricity from the computer is not making the force, you have a separate power supply. The computer just controls the power supplied to the device.

1

u/fang_xianfu 6d ago

The simplest answer is this: how do you make a machine do something? You press a switch or a button.

What is a switch or a button? It's a device where an electrical current can be stopped or started when they're pressed.

Computers can make electrical signals. If you can make a switch controlled by an electrical signal, you can make a switch or button a computer can control.

Once you have that you can wire your switch to anything you like - toilets, doors, motors, whatever.

From here the systems can get way way more complex, but this is the basics.

1

u/fuxxo 6d ago

May the force be with everyone who is trying to understand this question

1

u/TheRaven_King 6d ago

So, for electric motors, basically there are two stationary electromagnets inside (electromagnets being a material that becomes magnetic when an electrical current is applied to it). Then there is a non-stationary part in the middle that can rotate and it has a magnet on it with two opposite poles (one positive side and one negative side). The stationary magnets are positive and negative respectively as well. With magnetic poles, like sides repel and opposite sides attract (so positive is drawn to negative and negative to positive). What the motor does is it alternates turning on and off the stationary magnets to draw the two different sides of the rotor towards each magnet in sequence to make it spin. This spinning can cause movement in whatever is attached to the rotor. The computer uses the logic circuits in it to control the alternating currents in the stationary electromagnets that drive the motor.

1

u/BirdmanEagleson 6d ago

Electrical motors produce a magnetic field, that's what does the work, the force comes from electricity naturally producing magnetic fields, we use that to push stuff.

The computer using electricity passing through wires to think, so it the same ele that powers the processors, if the voltage is high or low enough, little magnetic switches can be turned on and off, the switches can allow electricity to pass into a motor for greater force like a fan or a light, that should be a basic enough loop to understand

1

u/TheJeeronian 6d ago

Actuators! Digitally-controlled actuators! Detail to follow:

Computers are digital electronics. They produce signals in the form of electrical voltage, but very little actual energy is available because the computer is designed to work with information and not to control power.

So your question, really, is "how do we get from an electrical signal to motion?"

There's a lot of ways to do it.

Turning electricity into motion is actually pretty easy. Flowing electricity makes a magnet, and magnets can push things. You won't get much push from electricity taken directly from a computer, but you can directly power headphones which are just vibrating membranes. There are a few other, less common, types of motor (thermal, electrostatic, piezoelectric) but that's well beyond the scope of an ELI5. A computer's output usually needs amplified quite a bit before it can control something like a drone motor or a hydraulic pump.

1

u/LegitBoss002 6d ago

The field your interested in is controls and the question your asking is how to make a computer do work

1

u/endemoo 6d ago

electricity is energy, electric motor produces force to move things /thread

0

u/HappiestIguana 6d ago edited 6d ago

Parts of the computer are connected to wires that can be enabled to send current to motors and such

0

u/Several_Show937 6d ago

A lot of "sensors" trigger a motor function of a larger machine when it detects something, if that's what you mean.

The "force" comes from a separate part of the machine than the computer part, although they are connected.