Polyhedrone

From Technologia Incognita
Jump to: navigation, search
Projects
Polyhedronprojectimg.jpg
Participants Brainsmoke
Skills pcb design, Golang, maths
Status Active
Niche Electronics
Purpose World domination

Idea: make a quad copter with lots of addressable RGB LEDs

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.

607px-Deltoidalhexecontahedron.jpg

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:

github.com/brainsmoke/dhxdron

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.

Dhxdron-pcbshape.png

Script to generate kicad module from SVG PCB shape

github.com/brainsmoke/pathtokicad

Positioning the LEDs

Dhxdron-ledpos.png Dhxdron-ledposall.png

KiCAD PCB design

github.com/brainsmoke/polyhedrone

Schematic

Dhxdron-one-driver.png Dhxdron-board.png

PCB

Kicad-polyhedrone.png

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

Dhxdron-tester.jpg

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

Dhxdron-data-path.png

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)

  • 8x Deltoidalhexecontahedronflightcase faces 8x.svg
  • 2x Deltoidalhexecontahedronflightcase split faces 2x.svg
  • 1x Deltoidalhexecontahedronflightcase locks 1x.svg

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

goled/model/ledball.go

pictures

Stage 3: Make it fly (planning stage)