POV Display SAO

Introduction

 

This is an accelerometer-based hand-waved POV display featuring front and back LEDs to create two 5 pixel x 12 character display. The device uses an ADXL345 accelerometer to track motion, enabling the user to just wave the SAO to show a message. Users can customize the message displayed via I2C, allowing flexibility in creating unique text or patterns. The combination of front and back LEDs ensures visibility from multiple angles, making this a versatile and engaging display for any application.

Hackaday Projects Page: Persistence of Vision POV Display SAO

 

Connect POV Display to Badge

Connect the SAO connector to the badge, taking into account the pin orientation. Once securely plugged in, power on the badge. The POV display should activate immediately, indicated by blinking LEDs. If the LEDs do not blink, double-check the connection and make sure the badge is correctly powered.

 

Test POV Display for "SUPERCON8" Message

Move the POV display smoothly from left to right and back again to reveal the hidden message. As you wave it, look closely to see if the message "SUPERCON8" appears in the air.

 

Switch POV Display to "Message Uploading Mode"

Firmly double-tap the POV display board to switch it to message uploading mode. If successful, the LEDs will turn solid white instead of blinking. It may take a few tries, and tapping it against a hard surface like a table can help.

 

Upload New Message to POV

To upload a new message to the POV display, use the I2C protocol. The device’s I2C address is 0x5B. Follow these steps to transfer your message:

  1. Prepare the Message:
    • The message must be an ASCII character array.
    • It can contain up to 12 characters maximum.
    • Supported characters include:
      • A-Z (uppercase only)
      • 0-9 (numbers)
      • Space
      • Symbols: ! " # $ % & ' ( ) * + , - . / : < = >
  2. Upload the Message:
    • Use buffer write to send the message to memory location 0x00 on the device.
    • Ensure the message fits within the 12-character limit. Any extra characters will be ignored. If your message is shorter than 12 characters, it’s recommended to pad the remaining space with SPACE characters to ensure the entire previous message in memory is fully overwritten.
  3. Confirm Success:
    • If the upload is successful, the POV display’s LEDs will begin blinking.
    • To view the new message, wave the display left and right. The updated message should now appear clearly in the air.

The following is an example of how to upload the message "HELLO" to the POV Display, using the Arduino IDE:

 

 

#include "Wire.h"

 
//Defines
#define DEVICE_ADDR   (0x5B)

// standard Arduino setup()
void setup()
{

  //Begin Wire I2C
  Wire.begin();  

}

void loop()
{

  uint8_t dataToWrite[5] = {0x48, 0x45, 0x4C, 0x4C, 0x4F}; //HELLO
  writeI2CBuffer(DEVICE_ADDR, 0x00, dataToWrite, sizeof(dataToWrite));

  delay(5000);

}


void writeI2CBuffer(uint8_t DeviceAddress, uint16_t Address, uint8_t* dataBuffer, size_t dataSize) {
    Wire.beginTransmission(DeviceAddress);  // Begin communication with the I2C slave
    
    // Send the memory address starting at 0x00.
    Wire.write(Address);  // Send the high byte of the memory address
    
    // Send the buffer data
    for (size_t i = 0; i < dataSize; i++) {
        Wire.write(dataBuffer[i]);  // Send each byte from the buffer
    }
    
    Wire.endTransmission();  // End communication with the I2C slave
}


For an equivalent example using MicroPython (NOT WORKING on actual badge. Please help me debug and drop me a line):

 
from machine import I2C, Pin
from time import sleep

# I2C device address
DEVICE_ADDR = 0x5B

# Initialize I2C on Pico W (I2C 0, SDA on GPIO4, SCL on GPIO5)
i2c = I2C(0, scl=Pin(5), sda=Pin(4), freq=400000)

def write_i2c_buffer(device_address, mem_address, data_buffer):
    # Create a bytearray with memory address followed by data
    buffer = bytearray([mem_address] + data_buffer)
    # Write the bytearray to the I2C device
    i2c.writeto(device_address, buffer)

# Main loop
while True:
    # Data to write: "HELLO" in ASCII (0x48, 0x45, 0x4C, 0x4C, 0x4F)
    data_to_write = [0x48, 0x45, 0x4C, 0x4C, 0x4F]
    
    # Write data to memory starting at 0x00
    write_i2c_buffer(DEVICE_ADDR, 0x00, data_to_write)

    # Wait 5 seconds before the next write
    sleep(5)