Lựa chọn quyền riêng tư của bạn

KiwiBee sử dụng cookie tùy chọn của Google Analytics, Google Ads và Meta Pixel để hiểu khách truy cập là người lớn, đo lường số lượt đăng ký hoàn tất và cải thiện các chiến dịch. Cookie thiết yếu luôn được bật. Pixel quảng cáo ChatGPT của OpenAI cũng đo lượt xem trang và yêu cầu đã gửi sau khi bạn đồng ý quảng cáo, và có thể dùng thông tin liên hệ đã băm để đối sánh. Chính sách quyền riêng tư

Chuyển đến nội dung chính

Arduino Knob

  • Vật lý
—

Giới thiệu mô phỏng này

Arduino Knob is a 3D model of the classic first analog project: a potentiometer on pin A0 controlling the brightness of an LED on pin 9. The Arduino Uno is drawn at its real size next to a half-size breadboard with five coloured jumper wires, a 10 kilohm potentiometer, a resistor with colour bands and a red LED. Students drag around the knob to turn it, or use the slider, and watch three numbers change together: the analogRead value from 0 to 1023, the voltage at A0 from 0 to 5 volts, and the analogWrite value from 0 to 255 that sets the PWM duty cycle on pin 9. A sketch card shows the code with the live values, and a scope shows the pulses that dim the LED. A schematic view redraws the same circuit as a diagram with a wiper you can drag, and current flow dots show where the electricity goes. Changing the resistor between 220 ohm, 1 kilohm and 10 kilohm shows why the LED needs a series resistor and what happens when it is too large.

Học sinh có thể khám phá điều gì

  • Drag around the knob from its minimum to its maximum and watch analogRead(A0), Voltage at A0 and analogWrite(9) change together.
  • Set the knob to the middle and read the PWM duty. Explain why analogRead 512 becomes analogWrite 128.
  • Switch Diagram to Schematic and drag the arrow along the 10 kilohm resistor to see the wiper voltage move between 0 V and 5 V.
  • Change Resistor from 220 ohm to 10 kilohm at full brightness and compare the LED current and how bright the LED looks.
  • Turn on Show current flow and compare how fast the dots move at low and high knob positions.

Mục tiêu học tập

  1. 1Explain how a potentiometer works as an adjustable voltage divider.
  2. 2Describe how analogRead turns a voltage from 0 to 5 volts into a number from 0 to 1023.
  3. 3Explain how PWM and analogWrite dim an LED by changing the duty cycle.
  4. 4Predict how the series resistor value changes the LED current.

Câu hỏi giáo viên thường đặt ra

Is Arduino Knob free to use?

Yes, with a free KiwiBee account. Sign up, then open the Arduino Knob simulation in any modern browser. Nothing to download.

Why does the sketch divide the reading by 4?

analogRead returns a number from 0 to 1023, which is 1024 steps, but analogWrite accepts only 0 to 255, which is 256 steps. Dividing by 4 maps the first range onto the second.

What is PWM and how does it dim an LED?

PWM stands for pulse width modulation. Pin 9 switches on and off about 490 times a second. The longer it stays on in each cycle, the brighter the LED looks, because the eye averages the fast pulses.

Why does the LED need a resistor?

An LED has very little resistance once it conducts, so without a resistor too much current would flow and burn it out. A 220 ohm resistor keeps the current near 14 milliamps. Try 10 kilohm to see the LED almost go dark.

Nhúng mô phỏng này

Đặt vào hệ thống học tập, blog hoặc trang lớp của bạn — miễn phí.

<iframe src="https://kiwibee.io/vn/simulations/arduino-potentiometer-knob-3d-simulation/embed" title="Arduino Knob | KiwiBee" loading="lazy" allowfullscreen style="width:100%;height:min(70vh,620px);min-height:420px;border:0;border-radius:16px"></iframe>

Mang khoa học tương tác vào lớp học của bạn

Không gian giáo viên miễn phí của KiwiBee gộp soạn bài, phiếu bài tập, công cụ lớp học và sổ điểm vào cùng một nơi.

Bắt đầu miễn phí và tạo lớp học đầu tiên

hoặc khám phá không gian giáo viên →