new project – Cam's Electronics Projects http://localhost Sun, 08 Apr 2018 19:34:46 +0000 en-CA hourly 1 https://wordpress.org/?v=4.7.10 New Project: Internet Alarm Clock http://localhost/2017/04/23/new-project-internet-alarm-clock/ Sun, 23 Apr 2017 21:49:47 +0000 http://localhost/?p=79

The goal for this project is to replace my old alarm clock (pictured above) with something that shows the key information I need to know in the morning. That information is:

  • The time
  • The weather
  • When the next bus is coming

Sure, my phone can do all those things. But it takes time to touch and thumb through the various interfaces, beginning with entering a pattern to unlock the screen. And of course apps exist to put the weather and next bus on my phone’s unlock screen, but this information is still not available at a glance because it requires a button press. Having all the key information – time, weather, next bus – always visible on a dedicated display is convenient because it takes next to no effort to access the information; all I have to do is turn my head.

What I want this alarm clock to have:

  • Ability to get the time from the internet
  • A classic red seven segment clock display visible from across the room. (Red so that it doesn’t interfere with my sleep.)
  • A small transflective character LCD screen to provide additional or clarifying information
  • Alarm functionality so it can wake me up in the morning
  • Ability to function as a classic alarm clock in the absence of a wireless internet connection

Here’s what I don’t want this alarm clock to have:

  • An FM radio, internet audio streaming, or any advanced audio capability beyond having an audible alarm. I don’t use the radio functionality of my existing alarm clock anyways so I might as well reduce the complexity of the design by not including this.
  • A graphic display or touchscreen functionality. Just old fashioned tactile buttons please!
  • The classic digital alarm clock interface that required holding down a “time set” or “alarm set” button while tapping a separate minute or hour advancing button.

In addition to solving a practical need, I am using this project to gain experience in the following technical areas:

  • PCB design – for the internal electronics
  • I2C bus – for the displays and buttons
  • State machines – for writing deterministic and easy-to-modify code
  • Wi-Fi modules – for time synchronization, as well as downloading weather and bus times
  • 3D printing – for the case/enclosure
  • Design for usability – I don’t want to frustrate my future self by creating a difficult to use device

This is a project I’ve actually been working on the past few months, so the next few posts will be to catch up with what I’ve done so far.

]]>
Introduction: What is the bispectrum? http://localhost/2016/11/29/introduction-what-is-the-bispectrum/ Wed, 30 Nov 2016 01:49:37 +0000 http://localhost/?p=5 The bispectrum is a tool for analyzing signals. While the power spectrum of a signal breaks down the power of a signal by its frequency, the bispectrum provides information regarding specific interactions between the various frequency components of a signal. What can this tell us? Various sources, such as Wikipedia, researchers in Japan and the UK, and academic articles say that the bispectrum can tell us about the nonlinear interactions in a process that generates a signal. These are great articles – full of precise mathematics and deep technical detail. But after reading these sources, I don’t understand, on a simple and intuitive level, how the bispectrum of a signal really represents a signal.

Various web searches did not reveal sources with a truly intuitive explanation. Maybe the bispectrum can’t be explained or demonstrated in simple terms at all – math might very well be the only way to communicate the concept. But it looks like no one has really tried to explain what the bispectrum is in a simple manner. I must not be the first person who has faced the bispectrum and felt that the mathematical definition leaves more to be desired. The bispectrum appears to live in an academic world. My goal with this project is to bring the concept of the bispectrum within both conceptual and practical reach of a wider audience.

Show, don’t tell

The mathematical definition of the bispecrtum is like a recipe – it defines the operations necessary to produce a bispectrum. It tells you what to do, and once you do it, you get a result that you can plot, and therefore see. Seeing is essential for understanding. So, I recorded an audio signal of myself saying “hello world” and plotted its bispectrum:

This helps a bit, but not much. What do those vertical and diagonal lines indicate? Is it a unique mark of my voice? What about those green puddles between the lines? I don’t know. It would be better if I had a way of quickly generating the bispectrum of various familiar sounds (signals). In particular, real-time generation of the bispectrum would help me develop an intuitive understanding of how a bispectrum represents sound. Then I might be able to go beyond the mathematical definition by showing what a bispectrum really represents.

Build a bispectrum visualizer

A portable instrument that rapidly and repeatedly computes and displays the bispectrum of real-world sounds would provide the best way, I think, to gain an appreciation of how the bispectrum represents a signal. Spectrum analyzers are commercial laboratory instruments that display the power spectrum of an electrical signal and have been built in the “homebrew” context by electronics hobbyists. So why not build my own bispectrum visualizer? (The name “bispectrum analyzer” is already taken by this software.)

Project goals

To build a standalone device with:

  • A standard audio input connector
  • Signal conditioning circuitry
  • A microprocessor to repeatedly compute the bispectrum of the audio signal reasonably quickly
  • A display to show the bispectrum

Looking ahead

Future posts will cover the system block diagram and circuit topology followed by detailed circuit design and component selection. Stay tuned for more!

]]>