Difference between revisions of "Polyhedrone"
Brainsmoke (talk | contribs) (→Getting the (x, y, z) position of the leds) |
Brainsmoke (talk | contribs) (→Wiring) |
||
Line 178: | Line 178: | ||
[[File:Dhxdron-data-path.png|480px]] | [[File:Dhxdron-data-path.png|480px]] | ||
+ | |||
+ | == Driving the leds / Power == | ||
+ | |||
+ | For now I use a [[LEDLightDistrict#Raspi_GPIO_pin-out|Raspberry pi]] and an [[LEDLightDistrict#PSU|ATX PSU]] in the same way as for the [[LEDLightDistrict|ledwall]]. | ||
+ | |||
+ | When it is part of a quad copter I'll probably use a Carambola2. | ||
==pictures== | ==pictures== |
Revision as of 02:25, 13 December 2014
Projects | |
---|---|
Participants | Brainsmoke |
Skills | pcb design, Go, maths |
Status | Active |
Niche | Electronics |
Purpose | World domination |
Idea: make a quad copter with lots of addressable RGB LEDs
Contents
Stage 1: Ledball hardware (completed)
pick a shape
A Catalan solid is a polyhedron with faces which are all identical (but its vertices are not.)
This is a nice property for a ball made out of PCBs, as you only need to order one shape of PCB.
I Picked the deltoidal hexecontahedron because it looked pretty.
napkin calculation
As my ledball should become a flying Death^WDay star at night, I wanted to use lots of LEDs. Powering them over 5V would mean lots of amps. I chose to drive the LEDs per three by putting them in series. This allows the LEDs to be powered reasonably efficiently using 11.1V (3 Cell LiPo) or 12V (ATX PSU.)
This does preclude the use of WS2812B (neopixel) LEDs, so I went for external WS2801 driver chips
- The deltoidal hexecontahedron has 60 faces
- 5 WS2801 drivers per face
- 3 LEDs in series per driver
- max 20mA per colour, 3 colours
>>> 60*5*3*.02 18 # Amps >>> _*12 216 # Watt
Calculate pcb shape
The code I wrote to generate the PCB shape:
It generates an SVG shape based on a given radius (of the inscribed sphere) of the polyhedron and the material thickness. The material thickness is used to generate a notched edge which locks at precisely the right angle.
The script also generates slots for the tie-wraps that will hold the ball together.
Script to generate kicad module from SVG pcb shape
github.com/brainsmoke/pathtokicad
KiCAD PCB design
github.com/brainsmoke/polyhedrone
Schematic
PCB
Bill of materials
quantity | package | part | comment |
---|---|---|---|
60x | PCB | ordered 100x 2 layer, 10^2cm max, .6mm, white HASL @ Seeedstudio | |
300x | SOIC14 | WS2801 Led Driver | Ledsee |
900x | 5050 | RGB LED SMD | ordered: 1000x Samsung SPMFCT5606N0S0A1E0 (Nice color balance) @ Ledsee |
900x | 1206 | Resistor 33 Ohm | use 30 Ohm for 20 mA/color (max specced brightness) |
300x | 0805 | 100nF Capacitor | |
12x | SOT223 | AMS1117-3V3 voltage regulator | Ledsee |
1x | Raspberry Pi B+ | ||
1x | 200+ Watt (400 Watt) ATX PSU |
Soldering & Testing
< insert photo of test rig here >
Test program
#include <SPI.h> void setup() { SPI.begin(); SPI.setBitOrder(MSBFIRST); SPI.setDataMode(SPI_MODE0); SPI.setClockDivider(SPI_CLOCK_DIV16); } void fill_colour(uint8_t r, uint8_t g, uint8_t b) { uint16_t i; for (i=0; i<500; i++) { SPI.transfer(r); SPI.transfer(g); SPI.transfer(b); } } void fill_back(uint8_t r, uint8_t g, uint8_t b) { uint16_t i; uint8_t j; for (i=0; i<100; i++) { for (j=0; j<12; j++) SPI.transfer(0); SPI.transfer(r); SPI.transfer(g); SPI.transfer(b); } } void loop() { for(;;) { fill_colour(255, 0, 0); // Red delay(500); fill_colour(0, 255, 0); // Green delay(500); fill_colour(0, 0, 255); // Blue delay(500); fill_colour(255, 255, 255); // White delay(500); fill_back(255, 0, 0); delay(500); fill_back(0, 255, 0); delay(500); fill_back(0, 0, 255); delay(500); fill_back(255, 255, 255); delay(500); fill_colour(0, 0, 0); // Black delay(500); } }
Wiring
Driving the leds / Power
For now I use a Raspberry pi and an ATX PSU in the same way as for the ledwall.
When it is part of a quad copter I'll probably use a Carambola2.
pictures
Stage 1.1: Flight case
(generated with the same script)
pictures
Stage 2: Software (completed)
Python software: github.com/brainsmoke/dhxlamp (obsolete)
Rewrite in Go: github.com/brainsmoke/goled
Getting the (x, y, z) position of the leds
goled/polyhedron/polyhedron.go