Skip to main content

Controlling a Mains Device

  • Chapter
Practical Raspberry Pi
  • 4406 Accesses

Summary

So far you have been able to do a lot of interesting projects with your Raspberry Pi. There is, however, one topic that always comes up when you talk to anyone about practical uses for a microcontroller or, in your case, for the Raspberry Pi. That question goes something like “how can I turn on some random device in my house?” For example, you may want to turn on a lamp at night or your air conditioner before you get home. Nothing like a cron job to turn on your air conditioner! Now if you think about this quickly, getting the Raspberry Pi to turn on a random device is an easy task. In theory, turning a mains-powered device on or off is no different. It’s just interrupting the flow of electricity to that device; after all, this is what your common wall switch does. Unfortunately, here are two big issues that you will face and they both have the same source. That source is alternating current, or AC.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 29.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 37.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Authors

Rights and permissions

Reprints and permissions

Copyright information

© 2013 Brendan Horan

About this chapter

Cite this chapter

Horan, B. (2013). Controlling a Mains Device. In: Practical Raspberry Pi. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4302-4972-6_10

Download citation

Publish with us

Policies and ethics