diff --git a/submissions/skateboardLights/BOM_neopixel_2025-04-14.csv b/submissions/skateboardLights/BOM_neopixel_2025-04-14.csv new file mode 100644 index 00000000..c70ead57 Binary files /dev/null and b/submissions/skateboardLights/BOM_neopixel_2025-04-14.csv differ diff --git a/submissions/skateboardLights/PCB_PCB_neopixel_2025-04-14.pdf b/submissions/skateboardLights/PCB_PCB_neopixel_2025-04-14.pdf new file mode 100644 index 00000000..2b4c40c6 Binary files /dev/null and b/submissions/skateboardLights/PCB_PCB_neopixel_2025-04-14.pdf differ diff --git a/submissions/skateboardLights/README.md b/submissions/skateboardLights/README.md new file mode 100644 index 00000000..2168c5fa --- /dev/null +++ b/submissions/skateboardLights/README.md @@ -0,0 +1,34 @@ +--- +name: "@checkers" +slack_id: "U04J8RCP4RW" +github_handle: "@YashasSingh" +tutorial: # Link to the tutorial if you used one, including the default guide +wokwi: # Link to the Wokwi project +--- + +# Skateboard Backlight + +No wowki link, too complex + + +This project is a skateboard backlight system that uses a photoresistor to adjust the brightness of the lights based on ambient light and an accelerometer to detect motion or tilt for dynamic lighting effects. The system is powered by a XIAO microcontroller and includes addressable LEDs for customizable lighting patterns. + +A simplified BOM table +(pls include rough pricing of any extra components you're using) + +| Comment | Footprint | Quantity | LCSC | Cost | +|-------------------|------------------------------------------------|----------|----------|--------| +| 4.7kΩ | C_1206_3216Metric_Pad1.33x1.80mm_HandSolder | 1 | C15008 | 0.0682$| +| WS2812B-5050 | LED_WS2812B_PLCC4_5.0x5.0mm_P3.2mm | 35 | | +| XIAO ESP32C3 | XIAO ESP32C3 | 1 | | +| Photoresistor | GL5516 | 1 | C125626 | 0.049$ | +| Accelerometer | ACCELEROMETER MPU6050 | 1 | |will get myself + +Tell us a little bit about your design process. What were some challenges? What helped? + +The design process involved integrating a photoresistor and an accelerometer with the XIAO microcontroller to create a responsive lighting system. One challenge was calibrating the photoresistor to ensure accurate brightness adjustments in varying light conditions. The accelerometer required careful tuning to detect motion and tilt without false triggers. Using simulation tools like Wokwi and referencing datasheets helped streamline the process. + +Some images of your design (make sure to include both the PCB and Schematic!): +![alt text](image.png) +![alt text](imagecopy.png) +![alt text](image-1.png) \ No newline at end of file diff --git a/submissions/skateboardLights/image-1.png b/submissions/skateboardLights/image-1.png new file mode 100644 index 00000000..c3bf42db Binary files /dev/null and b/submissions/skateboardLights/image-1.png differ diff --git a/submissions/skateboardLights/image.png b/submissions/skateboardLights/image.png new file mode 100644 index 00000000..83b95beb Binary files /dev/null and b/submissions/skateboardLights/image.png differ diff --git a/submissions/skateboardLights/imagecopy.png b/submissions/skateboardLights/imagecopy.png new file mode 100644 index 00000000..e836c1e9 Binary files /dev/null and b/submissions/skateboardLights/imagecopy.png differ diff --git a/submissions/skateboardLights/production/Gerber_neopixel_PCB_neopixel_2025-04-14.zip b/submissions/skateboardLights/production/Gerber_neopixel_PCB_neopixel_2025-04-14.zip new file mode 100644 index 00000000..e142265b Binary files /dev/null and b/submissions/skateboardLights/production/Gerber_neopixel_PCB_neopixel_2025-04-14.zip differ diff --git a/submissions/skateboardLights/production/PickAndPlace_PCB_neopixel_2025-04-14.csv b/submissions/skateboardLights/production/PickAndPlace_PCB_neopixel_2025-04-14.csv new file mode 100644 index 00000000..bca8824d Binary files /dev/null and b/submissions/skateboardLights/production/PickAndPlace_PCB_neopixel_2025-04-14.csv differ diff --git a/submissions/skateboardLights/production/main.c b/submissions/skateboardLights/production/main.c new file mode 100644 index 00000000..e8fd791d --- /dev/null +++ b/submissions/skateboardLights/production/main.c @@ -0,0 +1,72 @@ +#include +#include +#include +#include + +// Photoresistor on A0 +#define LDR_PIN A0 + +// LCD pins: RS, EN, D4 +LiquidCrystal lcd(2, 3, 4); // GPIO2, GPIO3, GPIO4 + +// Accelerometer +Adafruit_LIS3DH lis = Adafruit_LIS3DH(); + +void setup() { + Serial.begin(115200); + + // LCD init + lcd.begin(16, 2); // Assuming a 16x2 LCD + lcd.print("Init..."); + + // Accelerometer init + if (!lis.begin(0x18)) { // Default I2C address + Serial.println("No LIS3DH found"); + lcd.setCursor(0, 1); + lcd.print("Accel fail"); + while (1); + } + lis.setRange(LIS3DH_RANGE_2_G); // +-2g + + lcd.clear(); + lcd.print("System Ready"); + delay(1000); + lcd.clear(); +} + +void loop() { + // 1. Read photoresistor + int lightValue = analogRead(LDR_PIN); + float voltage = lightValue * (3.3 / 4095.0); + + // 2. Read accelerometer + lis.read(); + float x = lis.x_g; + float y = lis.y_g; + float z = lis.z_g; + + // 3. Display on Serial Monitor + Serial.print("Light: "); + Serial.print(lightValue); + Serial.print(" | Voltage: "); + Serial.print(voltage, 2); + Serial.print(" V | Accel: "); + Serial.print(x, 2); Serial.print(", "); + Serial.print(y, 2); Serial.print(", "); + Serial.println(z, 2); + + // 4. Display on LCD + lcd.setCursor(0, 0); + lcd.print("L:"); + lcd.print(lightValue); + lcd.print(" V:"); + lcd.print(voltage, 1); + + lcd.setCursor(0, 1); + lcd.print("X:"); + lcd.print(x, 1); + lcd.print(" Y:"); + lcd.print(y, 1); + + delay(500); +}