Skip to content
Parallax Learn

Parallax Learn

  • Welcome
  • Tutorials
        • Tutorial Series head tag

          Tutorial Series
        • Tutorial Series

          The special, classroom-ready series pages are organized collections of tutorials for our most popular hardware and/or languages. The tutorials for each topic are conveniently accessible from a single page, shown in the order it is recommended that they be completed.
        • Robotics Series Head tag

          Robotics Series
        • Robotics Series

          • Artificial Intelligence
          • Cybersecurity: Radio Data tutorialCybersecurity
          • cyber:bot + Python
          • cyber:bot + MakeCode
          • Boe-Bot Tutorial SeriesBoe-Bot
          • Arduino Shield-Bot
          • ActivityBot with C TutorialsActivityBot + C
          • ActivityBot with BlocklyProp Tutorial SeriesActivityBot + BlocklyProp
          • Scribbler 3 Tutorial SeriesScribbler 3
        • Electronics & Programming Series Head tag

          Electronics & Programming Series
          • BS2 Board of Education Tutorial SeriesBS2 Board of Education
          • Propeller C-Language BasicsPropeller C Basics
          • FLiP Try-It Kit C Tutorial SeriesFLiP Try-It Kit + C
          • FLiP Try-It Kit BlocklyProp TutorialsFLiP Try-It Kit + BlocklyProp
          • Badge WX Tutorial SeriesBadge WX
          • Propeller BlocklyProp Basics and ProjectsPropeller BlocklyProp Basics
          • View All Tutorial Series »
        • Browse Tutorials
        • Browse Tutorials

          Individual tutorials sorted by robot or kit, and language.
        • By Robot or Kit
          • ActivityBot
          • SumoBot WX
          • Boe-Bot
          • Shield-Bot
          • cyber:bot
          • Badge WX
          • ELEV-8
          • ARLO
        • By Language
        • By Language

          • Propeller C
          • Arduino
          • BlocklyProp
          • PBASIC
          • Python
          • MakeCode
          • View All Tutorials »
  • Educators
  • Reference
  • Downloads
  • Home
  • All Courses
  • Robotics with the Board of Education Shield for Arduino

Robotics with the Board of Education Shield for Arduino

Activity 3: Start-Reset Indicator

In this activity, we’ll build a small noise-making circuit on the BOE Shield’s prototyping area that will generate a tone if the robot’s batteries run too low.

When the voltage supply drops below the level a device needs to function properly, it’s called brownout.  The device (your Arduino) typically shuts down until the supply voltage returns to normal.  Then, it will restart whatever sketch it was running.

Brownouts typically happen when batteries are already running low, and the servos suddenly demand more power.  For example, if the BOE Shield-Bot changes from full speed forward to full speed backward, the servos have to do extra work to stop the servos and then go the other direction.  For this, they need more current, and when they try to pull that current from tired batteries, the output voltage dips enough to cause brownout.

Now, imagine your BOE Shield-Bot is navigating through a routine, and suddenly it  stops for a moment and then goes in a completely unexpected direction.  How will you know if it is a mistake in your code, or if it’s a brownout?  One simple, effective solution is to add a speaker to your BOE Shield-Bot and make it play a “start” tone at the beginning of every sketch.  That way, if your BOE Shield-Bot has a brownout while it’s navigating, you’ll know right away because it’ll play the start tone.

We’ll use a device called a piezoelectric speaker (piezospeaker) that can make different tones depending on the frequency of high/low signals it receives from the Arduino.  The schematic symbol and part drawing are shown below.

Frequency is the measurement of how often something occurs in a given amount of time.

A piezoelectric element  is a crystal that changes shape slightly when voltage is applied to it.  Applying high and low voltages at a rapid rate causes the crystal to rapidly change shape.  The resulting vibration in turn vibrates the air around it, and this is what our ear detects as a tone. Every rate of vibration makes a different tone.

Piezoelectric elements have many uses.  When force is applied to a piezoelectric element, it can create voltage.  Some piezoelectric elements have a frequency at which they naturally vibrate.  These can be used to create voltages at frequencies that function as the clock oscillator for many computers and microcontrollers.


Printer-friendly version
Servo Troubleshooting
Prev
Build the Piezospeaker Circuit
Next

DISCUSSION FORUMS | PARALLAX INC. STORE

About | Terms of Use | Feedback: learn@parallax.com | Copyright©Parallax Inc. 2024

© 2025 Parallax Learn • Built with GeneratePress