As explained in the last article on PID control, the aim of the PID regulator is to compute a correction according to the error (the difference between the target speed and the actual speed), its integral and derivative, and 3 chosen coefficients : KP (for proportional correction), KD (for derivative correction) and KI (for integral correction). This week, Xavier and I made some corrections on the software (presented in this article) and choose the coefficients.
This coefficient was the easiest to choose by following the steps indicated in this article.
We took the smallest KP for which the system oscillates (called critical KP) and multiplied it by ⅔.… Read more
Yesterday evening, the whole groupe work together to test the power transmission through the ball bearings. Those tests are significant to determine if we need to add a 5V-regulator on the main board, and which regulator we choose for the bottom PCB to account for the tension drop.
Yesterday Sibille and I brought the Phyllo structure with the faulty motor (see this post) to the school mechanic, Mr Croullebois. We disassembled the structure, and it turns out the motor shaft goes slightly lower than the motor base, so when we screwed it tight it would scrape against the aluminum plate underneath.
Mr Croullebois bored a depression in the middle of the plate so we wouldn’t have this problem anymore, and then we reassembled everything with the other motor that we used for tests and knew to be working. The motor that was in the structure spins more freely now, and we managed to make it run, but there is a weird creaking sound from time to time.… Read more
I realized a synthesizable top module to test the Sync module and Led Band Controller together. The goal of this top module is to simulate the ticks sent by the Hall effect and the optical fork sensors. But also to send data to the Leb Band Controller to simulate the DMA Controller. In the output, one can read SCLK, GCLK, LAT, SOUT, row_en[3:0] (multiplexing), turn_tick, n_rst.
With @nathan-claudel, we decided to synthesize and test it on the DE1-SOC. The output signals are exited on the GPIO1. Then I used a Saleae device to probe the signals.
Problems of the top module
First, we have to fix several issues due to the implementation of the top module.… Read more
After more tries on Tuesday, I found a way to flip the marbles vertically. I tried to use again the plastic part, without results. I make a huge comparison of all the configuration we tried before and at last, I shift a little the marbles from the coils, and with this, they flip in an easier way, even vertically, with a hole of 9.9mm. After finishing this, we can now concentrate on the PCB and the other problems of conception and programmation.
The shifted box is a box with the coils, a disk of metal, a 2mm plastic plank, a 3mm plastic plank (in green) with holes of 12mm of diameter, shifted of 5mm.… Read more
On Monday, I tried many new configurations. One of them was to make an ellipse that would improve the result when I put the box vertically. But I have one big issue: with the painting, the marbles have a lot of friction and I cannot even flip them with some old configurations that were working. So we may have to make a choice: keeping a hole in the wood bigger than the diameter of the marbles and we cannot put the box vertically or finding a new way to paint or a new way to keep the marbles in the box.… Read more
Since Friday, I’ve been working on DShot generation with Xavier. As explained in his last post , we wanted to use only an ESP32 on the bottom PCB.
First try of DShot with an ESP32
So last Friday we tried generating DShot with an ESP32 DevkitC and starting our motor with it.
After familiarising ourselves with the ESP API reference, we managed to generate a DShot signal on the SPI bus of the ESP32 using DMA. The idea is to send a DShot bit as an 8-bit SPI frame with the first 3 bits high to send a 0 and the 6 first bits high to send a 1, as explained in this post.… Read more
Last Friday, I tried to improve the design of our box because we want it to be functional vertically. With a spacing of 8mm between the plastic plank and the wooden plank, I manage to have some result. But before having this result, I burnt the coil I was using, by energizing the power supply too much with an old configuration. So this coil increases its current consumption, and I need to test again with another coil.
I also tried to use an element made by the person in charge of the fablab, but the marble cannot flip in it, because it needs to have the possibility to move, it cannot just flip around its axis of rotation.… Read more
Last time, I made a prototype of a box, but there was a problem with the size of the holes for the marbles. They were bigger than the marbles, and they would fall if we put the box vertically. I tried to put the coils and the marbles at a lower level and to reduce the size of the holes. But with this, we have too much friction, and we cannot flip the marbles easily.
The person in charge of the fablab offers to make a printed support for the marbles in order to reduce friction.… Read more
The past few days, Xavier and I did some more IR tests.
The first thing we wanted to measure is the reaction time of the receiver.
By logging the times the emitter was turned on and off, we realised the receiver’s reaction to toggling the emitter was systematically delayed between 150 and 250µs. This is not surprising as it perfectly matches the datasheet specification. In any case it’s not a problem because it is short enough and also consistent.
Then, we set out to see whether adding 3D-printed materials between the emitter and the receiver would introduce a delay, and if so, measure this delay.… Read more