[LASMO] LASMO progress

Since our last posts, the project has evolved. Following the design of the schematic and PCB for the card, we started to develop the software. We have developed tests to test the board. So now we have tests that:
-allows to display a wave triangle on the exits of the internals DACs in the board F706 in order to send them thereafter to galvanometers.
– Send the value of various colors to the external DACs which will send to the laser what color to display.
-can read a file from the SD card.
– allow UART communication between the ESP32devKitC and the F706 board.
-allows to receive an IP address via the Ethernet port.
– display analog values input on the ADCS in volts ​.
We also wrote the board and the configurations for the LASMO board as we are currently developing on the board E407.
In addition, Pierre is currently writing the algorithm that allows to display a shell with the JLink that will allow us to test all functions in live.
Luc is writing the ilda file decoder which will allow us to send the information to the galvanometers as well as the lasers.
As for me, I am currently configuring the wifi of the ESP32.

[LASMO] ILDA decoder and SD card

Last week, while Pierre was working on the routing of the PCB, I’ve been working on software. What I’ve done is basically a function to get a file on the SD card, and a function that reads and interprets the file as an ILDA file. This is the first brick of our chain of programs, and the data will then be processed by the main program to send the appropriate commands to the galvanometers and the laser.

[LASMO] Making progress in PCB, basic I/O functions

Hi! Last week has been mostly about PCB design. We’re still waiting for our galvanometers and lasers to arrive… Hopefully we’ll have them soon. In the meantime we can’t make much progress about the PCB itself but we corrected some problems.

About the input of the galvanometers, I made a mistake in the voltage adaptation circuit: when the scanner is at its maximum angle, it should be either at -5V/5V or 5V/-5V (positive input/negative input). So we had to adapt the system so that when the ADC outputs 0V, it outputs -5V/5V; when 3.1V (max) 5V/-5V; when 1.55V, 0/0. That means we have to change the resistors values: R1 = 1kΩ, R2 = 2.21kΩ. As Mr Polti pointed out, we also have an issue with the component used: the ADA4941-1 has an output voltage swing of +/-2.9V, which isn’t enough to generate the desired signal. So we decided to make our own adaptation circuit with two ampops that will have the good characteristics (for example, the ADA4666-2 works). The circuit is as follow:

Voltage amplification circuit for scanner input

Meanwhile, I also worked a bit on coding the basic I/O functions of the main controller: I started with connecting the SD slot, testing my code on the development boards we use in practical works this year, OLIMEX STM32-E407. I haven’t been able to test it though, as the only microSD card I have is the on in my smartphone, and I failed to get it out of the phone.  

[LASMO] PCB progress

Externals Clocks

In my previous article, I talk about the STM32F7’s and the STM32F1’s clock.  However, according to the STM32CubeMX and after talked with Alexis, we will use for each controller a 8MHz external clock (for consumption questions) and rise the frequency using the PLL until 216 MHz for the STM32F7 and 72MHz for the STM32F103. According the oscillator design guide for STM32, we have 

with CL the load capacity of the clock wich is 18pF here and Cs the stray capacitance of the printed circuit board and connections wich is 10pF here. So, we have the construction for each controller : 

Also, we have a ESP32devKitC which don’t must to have an external clock because the ESP32 WROOM integrated has one.

XLR connection

We also work an the XLR connection but due to the phantom and the symetrisation we had some problem with the architerture, so we decided to use a jack connector. We talked about an architecture but we change again for RCA connectors which Pierre will talk about.   

DAC to LASER 

The drivers of the laser work with a balanced analog input ranging from 0 to 5V. Since the DAC of the MAX outputs a single-ended signal ranging from 0 to 3.3V , this is an issue we had to resolve. 

We basically had to convert an analog single-ended signal to a other one, and amplify it with a 5/3.3 ratio. We achieved this by using an ADA4500-2 amplifier with two resistances, as represented below.

This circuit is composed of a non-inverting amplifier (taking the out of the MAX5105 as entry), which, with the resistances of 1kΩ and 1.96 kΩ, multiplies the signal by 1+1/1.96 = 1.51 = 5/3.3 (approximately). Then an inverting amplifier with a gain of 1, create aa signal which is going to the input of the laser

After talking with Sam, we decided to delete the DAC_OUT signals from the MAX5101  to the F103 microcontroller because their are not essential. So, we configure the HREF of the MAX5101 at 5V, and not at 3.3 V. So, we don’t need this architecture for the lasers’ inputs.

Project architecture

We also decided about the architecture of our project and about the workflow. I put the configurations files of the STM32F4 controller that we use in TP in order to begin to code with the board that we have. Let’s begin !

[LASMO] SD card and galvanometers in the PCB design

Because finishing the design of the PCB is now the priority task, I’ve been working on several parts of it: namely, linking the SD card connector and the galvanometer drivers.

MicroSD connector

The microSD card connector we found in ExpeditionPCB is manufactured by JAE (Japan Aviation Electronics). The pins correspond to those of the microSD standard and are linked to one of the SPI interfaces available on the STM32F7. MicroSD cards can work on supply voltage from 2.7 to 3.3V, so we just use the same 3.3V supply as the F7.

Our SD card connector’s connections…
… and the pins it’s connected to on the F7 

Galvanometer drivers

The drivers of the galvanometer work with a balanced analog input ranging from 0 to 5V. Since the DAC of the F7 outputs a single-ended signal ranging from 0 to 3.1V (according to the datasheet), this is an issue we had to resolve.

We basically had to convert an analog single-ended signal to a balanced one, and amplify it with a 5/3.1 ratio. We achieved this by using an ADA4941-1 amplifier with two resistances, as represented below.

Signal adaptation circuit between the DAC’s single-ended output (GALVA_X signal) and the driver’s balanced input (GALVA_DRIVERX_IN – and +). The two resistors inside the ADA are of the same value.

This circuit is composed of a non-inverting amplifier (taking IN and FB as entry), which, with the resistances of 10kΩ and 6.2kΩ, multiplies the signal by 1+3.1/5 = 1.62 = 5/3.1 (approximately). Then a inverting amplifier with a gain of 1, create a signal symmetric to the OUTP signal with respect to the REF signal value. We set REF at 5V so that the signal can have a 5V range around the offset value of 5V. That’s also why we linked the REF signal to the GND port of the driver, so that the driver can see the signal as a balanced signal.

[LASMO] External clocks, and XLR architectures

For the two processors STM32F7 and the STM32F1, we need to use externals clocks. Indeed, for the STM32f7, the processor can use a 16MHz internal clocks, but in order to have the best performance STM32F7 can provide, we will add an external clock of 26 MHz. We will do the same for the STM32F1, but with an external clock of 16 MHz.

Also, we will use two XLR connections in order to have a sound signal wich the animation will be synchronize with. After find out about XLR connection and signals, I understood that a connector XLR has 3 pins, carry at 24 V, and receive two symetrics signals but out-of-phase. So, we have to desymetrize the sygnal. To this end, we will use an instrumentation amplifier: 

with

[LASMO] First try at FreeRTOS

I didn’t have much time last week to work on the project due to the Athens week. I had a wonderful time in Prague but I wasn’t able to work on the project.

On these last days I’ve been focusing on trying to make FreeRTOS work on a STM32F4xx development card, i. e. making the official demo for this board work. Sadly, the official demo is actually designed to be compiled with the IAR compiler, and we’d rather use GCC for our project instead  of a trial version of some non-free compiler. I’ve found a demo using GCC and a makefile on the Internet, but for some reason, once compiled using GDB will work even if the GDB server isn’t launched, which makes me think the Makefile already opens one (which is not good because it is not launched on our board). I’ll try for the next time to have a  more deeply understanding of how a FreeRTOS program works, and I’ll try to fix that issue.

[LASMO] Started PCB design

This week, I start to draw the design of the PCB.
I start to add the main components of the PCB, and decide the exact references we need :

  • For the STM32F7, all references available on the ST website are suitable, so I choose the one that was already in the Xpedition PCB library, the STM32F767vit6
  • For the ESP32, Luc choose the ESP32-WROOM-32: it has an embedded Wi-Fi antenna, an RMII interface for the ethernet, and an SPI interface to communicate with the STM32F7
  • For the security microcontroller, I choose the STM32F103RE. This MCU has to integrate 5 ADCs, one GPIO and an SPI interface. So, a very small STM32 MCU is enough.
  • For the triple 8bits-DACs, I change the MAX512 to a MAX5105 because the MAX512 don’t integrate three equal DACs. Moreover, the MAX5105 has an asynchronous MUTE input, which is convenient for the stop of the LASERs by the security MCU

Then, I work on the Ethernet connection. I add a LAN8742A and an RJ45 connector to make the physical layer. I never made design PCB, so I spent a lot of time to find and understand the different components to add to the design.

After finishing the Ethernet design, I work on the MAX5105 connections. This part was easy to make, but I’m not sure about the direct connection (cf figure 1) between the DACs’ outputs and the inputs of LASER drivers. I don’t have the LASER documentation yet, so it’s confusing for me to know how correctly connect these two parts.

(figure 1) MAX5105 connections

This is the newest version of our main components implementation :

[LASMO] Specifications

We have redefined the differents specifications of our project. To resume, LASMO is a displayer of a laser show. It will be able to display 2D ans 3D ILDA animations. All ILDA formats are supported. LASMO can display until 30 Kpps/s (at +/- 20° otpical) with a resolution of 4096 * 4096.  We use a RGB LASER in order to display until 16 millions colors.

Moreover, 3D animations are projected so that it looks 3D form from a certain point of view. This way, ILDA animations can be streamed either from internal memory (SD card) of from a PC via Wi-Fi or Ethernet.
Also, LASMO implement Art-NET protocoL in order to be controled by a standart light show controler thanks to Ethernet. So, it will be possible to synchronize on beat from stereo XLR input.

Furthermore, thanks to a picture, LASMO will be able to correct a deformed animation on a surface depending on the picture’s point of view and project a new one corrected always depending on this point of view.