Junior Design at Oregon State University has teams of three Electrical and Computer Engineering students band together to create what is essentially a miniature design project over two terms. The project my group has been working on for the past two months is a Bluetooth Controlled AC Switch, which allows an end user to control 2 US Outlets with up to 5 A draw per channel.
Our design includes the following features:
- Two 120 VAC, standard US plug outlets (“channels”)
- Simple on/off control of each channel, in addition to timer-based control (enable/disable channel up to 1 hour from now)
- 5 A current draw per channel, fuses included for safety, in addition to software-based control via relays.
- Current/power measurements unique to each channel, accurate within 50 mA or ~6 W.
- Local displays and sound system on final product to alert end user to certain events such as overcurrent protection, Bluetooth pairing status, and power consumption.
The schematic for our project, as entered into EEschema, can be viewed here:
At the heart of the design is the trusty ATmega328p microcontroller, which handles current measurements through its on-die ADC, digital control of the relays using simple digital I/O through an optocoupler, generates simple tones by use of the on-chip Timer/PWM hardware, and finally Bluetooth and local display contents are controlled with external ICs through the SPI bus. The measurement of AC current is done through an ACS723 current sensing IC, which outputs an analog signal that is linearly proportional to the amount of current, AC or DC, that passes through one side of the die. We use digital signal processing techniques to calculate the RMS value of this signal, which allows us to read AC current on an ATmega328!
The main board design is not yet finished, but simple breakout boards for the common-cathode 7 segment displays have been ordered and sent to the fab that will work well on the pinout with our MAX7221 display driver, which can be seen here:
Currently our design is entering the final phase; all of our hardware works in isolation, so over the next few weeks we will be working on integration and design of the final PCB.