On Wednesday, I spent some times implementing task notify on the sensor task, until implementing it on the h-bridge task. Then, I realize that it creates many memory errors and was not really useful since the thread should not call the function that change the multiplexer until the I2C communication was finished.
I also find the way to put some values in the esp32 that I used for the test as an I2C slave, and realized that it works with only 7 bits adresses whitout a read/write bit at the beginning, so I changed its adress and it correctely acknowledge to my communication.… Read more
On Tuesday, I realize that I need to make two tasks for the sensors. One that will enable the good sensor on the multiplexer, and another that will enable the sensor once the first one is finished. I would like to implement a semaphore, but the FreeRTOS manual suggest that I use a task notification instead of a semaphore. They use less RAM, but I still do not understand well how it works after a day at looking and testing it. I’ll sleep on it and hope that I will understand better how it works.
I also configure an ESP32 as an I2C slave device in order to have an ACK when I communicate with the STM because I have no other device that can do this job.
On Thursday and Friday, I spend some times coding the threads of the test PCB. I first debug and check if everything was ok for our thread that will read the state of all the box via the hall effect sensor. I used a logic analyser to check if everything was fine. I checked that the four pins that will be used for the multiplexer will not change until the end of the sending of an I2C message. Then I code a thread that initializes all the H-bridge by putting them at the 0 state.
I also realize that I have not seen a mistake in our scheme.… Read more
On Wednesday, I finished the PCB. I used one trick that found Alexis on our test PCB. We have two VCC, one for the coils and the other for all the other components. So, I create a two-parts plan. The VCC is in green and the VCC_COIL is in yellow.
I also have to route all the components. I found a way to make the routing easier, by enforcing a simple rule. When the route is horizontal, it must be on the top face, and when it is vertical, it must be on the bottom face. I also have to change the pins of the multiplexers in order to route them easily.… Read more
On Monday, I began to have a look at a 16×16 device scheme. For this, I took the 4×4 scheme, I copied it 16 times, and I added two multiplexers. One that will multiplex the SCL signal to the multiplex that controls the Hall effect sensor, and one other that will multiplex the multiplexer that controls the H-bridge drivers. Then, I had some questions.
Should I keep a pull-up or a pull-down between two multiplexers or not? My answers for this moment is to keep a pull-up in order to avoid a clock signal on SCL if there is some latch between the two multiplexers.… Read more