Skip to content
Book 7: Computer Systems

Book 7 · Chapter 6

Automated systems and robotics

§6.1§6.2Exam craftB7·6

This chapter is in the ebook.

Read it in full on cswithzak.com. Every question has its mark scheme and every program is ready to run. The free practice for each section is below, with the short code the book prints beside it.

Open in the ebook

For the whole chapter

§6.2 Robotics

Short code B7·6·2

What is an automated system?

Short code B7·6·10

Practice for this page of the book: the quiz, flashcards and past-paper questions for its section are listed above.

Microcontrollers

Short code B7·6·11

Practice for this page of the book: the quiz, flashcards and past-paper questions for its section are listed above.

Sensors and the ADC

Short code B7·6·12

for volts in [0.4, 2.0, 3.3, 4.6]:
    value = round(volts / 5 * 255)
    bits = ""
    n = value
    for i in range(8):
        bits = str(n % 2) + bits
        n = n // 2
    print(volts, "V ->", value, "->", bits)
An 8-bit ADC at work: four analogue readings (0–5 V) scaled to 0–255 and shown in binary. Notice every result fits in 8 bits.

Output

0.4 V -> 20 -> 00010100
2.0 V -> 102 -> 01100110
3.3 V -> 168 -> 10101000
4.6 V -> 235 -> 11101011
Run and checked before printing
for bits in [4, 8, 10]:
    print(bits, "bits:", 2 ** bits, "values, 0 to", 2 ** bits - 1)
Prose check: how many values an ADC can give with 4, 8 and 10 bits

Output

4 bits: 16 values, 0 to 15
8 bits: 256 values, 0 to 255
10 bits: 1024 values, 0 to 1023
Run and checked before printing

Choosing a suitable sensor

Short code B7·6·13

Practice for this page of the book: the quiz, flashcards and past-paper questions for its section are listed above.

Actuators

Short code B7·6·14

Practice for this page of the book: the quiz, flashcards and past-paper questions for its section are listed above.

Embedded systems

Short code B7·6·15

Practice for this page of the book: the quiz, flashcards and past-paper questions for its section are listed above.

Sensors, microcontrollers and actuators together

Short code B7·6·16

TARGET = 18
for reading in [21, 19, 17, 16, 18, 20]:
    if reading < TARGET:
        heater = "ON"
    else:
        heater = "OFF"
    print(reading, reading < TARGET, heater)
Trace-it check: the greenhouse heater loop, one line per reading

Output

21 False OFF
19 False OFF
17 True ON
16 True ON
18 False OFF
20 False OFF
Run and checked before printing
DARK = 30
levels = [80, 20, 20, 10]
people = [True, False, True, True]
for i in range(4):
    if levels[i] < DARK and people[i]:
        lights = "ON"
    else:
        lights = "OFF"
    print(levels[i], people[i], lights)
Corridor lights with two sensors: ON only when it is dark (light level below 30) AND a person is detected.

Output

80 True OFF
20 False OFF
20 True ON
10 True ON
Run and checked before printing

Automated systems in four areas

Short code B7·6·17

Practice for this page of the book: the quiz, flashcards and past-paper questions for its section are listed above.

Implications: jobs, safety and the environment

Short code B7·6·18

Practice for this page of the book: the quiz, flashcards and past-paper questions for its section are listed above.

What makes a machine a robot?

Short code B7·6·19

Practice for this page of the book: the quiz, flashcards and past-paper questions for its section are listed above.

Robots at work

Short code B7·6·20

Practice for this page of the book: the quiz, flashcards and past-paper questions for its section are listed above.

Evaluating robots

Short code B7·6·21

Practice for this page of the book: the quiz, flashcards and past-paper questions for its section are listed above.

Past-paper practice

Short code B7·6·90

Practice for this page of the book: the quiz, flashcards and past-paper questions for its section are listed above.

Workbook: Automated systems and robotics

Short code W7·6 · Computer Systems Workbook

The write-in workbook for this chapter has drills, exam-style practice, trace tables, fix-the-mistake and mark-it-yourself pages. Its full mark schemes and an interactive version arrive here with the chapter.

Ask Z about Automated systems and robotics
Buy ZAK's books — WhatsApp the books desk: Buy the booksPrint or ebook