[bouLED] Triangles’ circuit diagrams

The electrical design of the faces is almost done. The triangles were first thought to be the equivalent of the LED strips:

78 APA102C

But then we chose to put one 14.8 to 5V regulator on each face:

The buck regulator

Add a few connectors and that’s all there is to these PCBs.

In addition to not being decided about the internal structure of bouLed, we also need to choose the enclosing transparent sphere. This constitutes an important size constraint, and we might have to reduce bouLED’s size by a few millimeters to fit it. More on that soon.

[bouLED] Designing the main board

I’m currently designing the main board. First, I had to create a routing table for the STM32H743VIT6 using one Alexis made as a base. We’re only able to have 5 SPIs, a SD card in 1-bit mode and an UART. Programming and debugging will be done over SWD.

The next step is the power supply, using an LT1765-3.3 buck converter. Using the datasheet, I started choosing ratings for its peripheral components, but it’s getting late so I’ll finish that tomorrow. Next step: drawing the schematic.

[bouLED] MARG

I worked on the programming of the MARG. We use Ultimate Sensor Fusion Solution designed by Pesky Product. It is made up of an EM7180 Sensor Hub coupled with an MPU9250 IMU. The EM7180 outputs quaternions. We tested with the Lucas’ simulation.

Simulation

We judged this model will be enough for us and bouLED. So we will definitely use it for the design of our PCB.

[bouLED] LED layout redux and component choice

LED layout

We settled for a layout with 78 LEDs per facet, with a slightly modified border clearance. It looks pretty great on the simulator:

Don’t pay attention to that triangle with white LEDs, it’s coplanar with the z=0 plane, as a reference. You’re seeing the icosahedron from above. The important thing is that the layout looks regular enough, without any weird stuff in the corners, where 5 triangles meet.

Next step: build a paper version of bouLED. Behold !

That thing is HUGE. It was a pain to build using only paper and scotch tape, but it’s really useful to get a better idea of how to design the inner structure. On the flip side, I messed the dimensions up when printing the triangles, they’ve got 21cm sides instead of 18.5cm. The triangles I showed in my last post had the right scale, though (but the LED-to-side margins are slightly different). Notwithstanding my clumsiness while building this, it gives a good idea of what the end result will look like.

Power supply

Choosing a battery

With Lucas, we thought that by limiting the LED brightness, we’d be able to downscale the power supply a bit. The 3D printed prototype triangle (103 LEDs) was already unbearably bright when drawing 1A in white, so we’ll avoid drawing over 20A for all the triangles, at 5V. The main board will run on 3.3V, and 3A is way more than enough for it. That’s 110 watts.

A 4S LiPo battery has a 14.8V output voltage, and for a 110W output it’d spit 7.4A out. That’s a very conservative discharge current for LiPo batteries, a 4S 3000mAh 35C battery like this one can deliver more than 90 amps continuously and its peak current is probably even higher.

With 3Ah, this battery could supply bouLED power (at full brightness !) for 24 minutes. We could have picked one with a beefier capacity, at the expense of its weight. This one weighs 308g.

Voltage regulator choice

Alexis suggested using a small regulator per facet (and another one for the main board), saying that’s it’s way easier than finding a big regulator.

What we need is a buck converter: it reduces voltage but increases current. The part Alexis suggested is a LT1765 from Analog Devices: it’s rated for voltage inputs up to 25V and the output current limit is guaranteed by the datasheet to be above 3A. It has fixed-voltage versions that can output 5V or 3.3V without having to add an external voltage divider.

My previous calculations for LiPo sizing didn’t take into account the fact that a buck regulator transmits constant (without taking efficiency into account, of course) power but at a different voltage. Basically, I did them as if I had a linear regulator. Now, the battery is one third of the price of the one I mistakenly chose, same for the weight.

[bouLED] Physical structure

Hichem got the MARG working last week-end, so we tested it with our simulation (see his post) and confirmed this model would suit us and go on our central PCB. With this and the voltage regulators chosen, we have almost all we need to design the PCBs. The triangular ones may be simpler to design, but before we want to know precisely the physical structure of bouLED.

For ease of conception and of battery management, it should be possible to open the icosahedron. One way to do it is to make five faces removable, as shown on this simple model.

Made with Tinkercad

The inner armature would support the electronics and the LiPos, ideally keeping the MARG in the center of the icosahedron. Thus the stick supporting the removable part should be moved, and probably replaced with something stronger. The faces would be connected to the central part with JST-like connectors, easy to plug and unplug.

We want to chain the triangles without using too long wires, and we want a removable part. This will dictate how we’ll position each face and how we’ll place the connectors on it, while keeping all triangular PCBs identical. The LED repartition we think we’ll use surely is even enough not to be considered when choosing the face’s orientations.

[bouLED] Choosing a LED layout

I changed the LED layout algorithm to allow us to set a number of LEDs for each row. To improve regularity, the algorithm only takes the bottom row’s number of LEDs, and the row above this has one less LED, and so on. There’s also a “margin” setting for the space between the outermost LEDs and the triangle’s edges.

Here are all the layouts I generated, printed on paper with a 1:1 scale, and a 5 cents coin for scale.

We’d appreciate your feedback on this: which variant is your favourite ? You can click on the images to display them in their full size.

[bouLED] Scaling the icosahedron

Wednesday afternoon, the teachers suggested that we make the icosahedron bigger while keeping the same amount of LEDs. This avoids packing the insides together too much, and holes in the PCBs will improve cooling, which is even more important than we previously thought because we messed up the consumption estimation (too low).

The new sphere will have a 35-ish cm diameter (triangles have 18.5cm sides now). I’m currently changing the way we place LEDs: before, we specified spacing constraints and our OpenSCAD program would then put as many LEDs as possible on the triangle. That’s no longer what we want: we want a fixed number of LEDs on the triangle, and the program’s job is finding the layout. For instance, one can specify a number of rows and a different number of LEDs for each row.

When I’m done with that, I’ll print the triangles on paper as a check and then perhaps build a full-scale model with them (thin cardboard will do the trick, I think). It’ll be useful for designing the inner structure, checking that the LEDs layout is uniform enough, and of course, cluttering our desks !

[bouLED] Update on power consumption

Following the suggestions of the teachers, we measured the maximum power consumption of the LEDs again. We may have misused the power generator the first time, or didn’t set the LEDs at full brightness. Anyway, under rigorous measurements, our first triangle of 133 LEDs uses 4.5A under 5V. This is at a blinding brightness, nevertheless this is a huge power if you have 20 triangles and we’re thinking about how to provide it.

After finishing the 3D visualization (though it’s not merged on master yet and one could argue it’s therefore not finished), I joined Hichem on his work with the MARG. We want it working ASAP, so we can be sure we’ll use this chip, and we can start designing the PCBs. We spent some time today debugging his code. We suspect the I2C timings are the reason why we couldn’t get an acknowledge from the MARG, and we hope to solve it tomorrow.

[bouLED] SPI benchmarking, architecture and component choice

SPI benchmarking

In order to maximize the refresh rate, we’d like the SPIs we control the triangles with to be as parallel as possible, which is done using DMA. For each DMA controller, we can run one SPI in parallel.

I wanted to benchmark this, but I ran into problems using ChibiOS’ HAL on a STM32F7 with 6 SPIs. All my SPIs are used in transmit-only mode, but ChibiOS allocates two DMA streams per SPI: one for transmitting, and one for receiving, which is suboptimal when doing simplex communication. There were stream conflicts: one of the SPIs (SPI1 if I recall correctly) uses the same stream for transmitting as another SPI’s receiver stream. What’s more, ChibiOS’ HAL has no unidirectional SPIs, so I couldn’t fix that easily, but on the other hand ST’s HAL supports simplex mode.

In the end, we chose to ditch ChibiOS for FreeRTOS and ST’s HAL (generated using STM32CubeMX). So far, all SPIs work in blocking mode but it’s not parallel yet (i.e, it doesn’t use DMA). When that’s done, it will give us an idea of the refresh time (and hence of the refresh rate).

Architecture & component choice

We’ve calculated that this project needs a 30A power supply. We obtained this figure by checking one strip’s consumption in the lab and multiplying by 20, and adding 4A as a safety margin. In practice, it should suffice if we avoid making the LEDs too bright. The natural choice is a LiPo battery. A 10Ah 5S (5*3.7V=18.5V) with a 15C (15*10=150A !) maximum current discharge will do, it’d last around 20mn. However, it’s expensive: around 150 euros. The LEDs need 5V and the other components 3.3V, so a regulator is needed.

The 3D printed triangles are annoying: there’s wire everywhere, the precision requirements are very strict and they fall apart without scotch tape. To circumvent this, the triangles should be PCBs, but dumb PCBs: electrically, they shouldn’t be more than a APA102 LED strip and a connector. That’s way cleaner in my humble opinion, but that’s more work.

The main board, inside the icosahedron, will host the main MCU, an ESP32 for WiFi communication, and an AHRS array (Hichem is trying one, we’ll see if it’s good enough). The STM32H743ZI seems perfect for the task at hand: it’s really fast (400MHz), it has more than enough cache, 4 DMA controllers (which means up to 4 parallel SPIs !), a 2MB flash and a 1MB RAM. There’s also a STM32 Nucleo devboard using this MCU. Delivery is due tomorrow !

The last 3D printing

After several tries we finally printed a triangle with the right size for the led strip.

Several tries : 3D priting (black) and laser cutter(brown)

I also used a laser cutter but the led strip could not fit within holes again. To use the laser cutter we need someone trained to insure the safety so it was simpler for us to use the 3D printing. The main issue was the fact that we didn’t have accurate enough data. I measured with caliper and re-written the placement of holes algorithme on openscad. After several tries I printed a triangle with the right size and the data were to be very accurate (~20 micron). I took some times because each printing took 2 hours.

The last triangle (orange because orange is the New Black) 

Lucas soldered the led strip, tied the triangle and the led strip together and we have our prototype.

Now I am working on the programming of the AHRS. We use Ultimate Sensor Fusion Solution designed by Pesky Product. It is made up of EM7180 Sensor Hub coupled with the MPU9250 IMU. The EM7180 uses a Kalman filter and provides in output quaternions.