It remains less than 36 hours before final presentation and there are still some things to do, but I’m confident in the fact that we’ll be ready on time.
During the last few days, for the software part, I worked on the final debug and improvements of our code. This morning, I finally found why the server crashes so often: in fact, I never closed the SQL sessions I opened, because I didn’t know that it was necessary to do so. So now, the server doesn’t crash anymore. And we have added a timeout on the websocket connections, with a keep-alive message, in order to detect when the plant has been disconnected. And it solved many problems.
For the hardware part, I soldered several leds, tested several heatsink and tried to find a good solution for the servomotors. Indeed, it was hard to find a good place for them, one that allows the wires to freely move up and down. In fact, the problem was that the leaves didn’t have enough strength to pull the wire if this one went through the ground or in a pipe with angles. I finally decided to put the servos at the top of the pot, so that the wires only cross air.
Finally, I also prepared a first version of the slides that we will show on Friday during the presentation.
Tomorrow, we will prepare the show for Friday and finish to equip the plants.
NB: Tanguy has just implemented the code that allows the plant to tweet when a leaf is touched.
The last 4 days have been dedicated to integrate all the components of our project, bind them together and make the final corrections.
I’ve soldered several leds and with Tanguy, we made some tests with the leds container I had printed. The leds are really powerful, so powerful in fact that they heat too much and destroy themselves if we don’t put a heatsink. I’ve tried to add a small one, which improved a bit the dissipation, but a bigger is likely to be required if the leds stays turned on for more than a few seconds.
Yesterday, I’ve also added the mechanism that allows the user to program the reaction of the plant when he/she touches one of the leaves. It’s possible to control the leds, the servos and the alarm ring tone and to add loops combining all these elements.
Now, all the features that we wanted to have in our project seem to work, even though the touch detection doesn’t work as well as expected.
Next week, we will finalize the mechanical pieces, equip a plant with all our stuff and prepare Friday’s presentation.
During the end of the week I ended my work on the integration of the LoRa and the Bluetooth, and also worked on the way the configuration is download by the device, how it’s stored, what happens on a reboot of the device… All seems as functional as we want it to be.
Then we made some acquisition with the PCB and try to study them to find out why we don’t have breathing signals on them but on only a beautiful ECG.
Eventually, I made some more Python tool to process easily our acquisitions and to examine them.
During this week I will work on acquisitions, global integration and code cleaning.
During this week we eventually get the Objenious keys to register our devices on their LoRa network. Therefore I worked again on LoRa, and there are great improvements. Indeed, Over The Air Activation, ACK and downlink messages are now working. Sadly, there are still some difficulties with Objenious network and even with a LoPy device, the connection isn’t reliable and it is therefore highly probable that we will stay on the TTN network that is more reliable.
With the possibility to send downlink messages to a device, comes major improvement for our project because we will now be able to make it work fully without an Android device. Therefore we now need to integrate everything including the device initialization, the device reinitialization for a new patient, the configurations changes during the monitoring of the patient and of course the report upload with both Bluetooth and LoRa but with preference for Bluetooth witch is cheaper and faster.
Eventually, I will still work on integration during the end of the week.
On Monday, I started to review my code and clean it. I found that the touch detection algorithm was not adapted for 2 sensors, so I modified it (double the size of all the buffers, add one parameter to each function,…) And this day, we finally received our PCB. With Alexis, we made the first tests and discovered 2 mistakes: the power jack is connected in the wrong sense and the pins of the SWD aren’t mapped properly on the connector. For the first problem, Alexis inversed the wires coming from the power block, and for the second he made a patch.
After that, we flashed our program and began to test the components. The Bluetooth worked immediately, and the communication with the capacitive sensor was also immediately functional. Tanguy had to make some corrections for the LEDs and I spent some time trying to understand why I wasn’t able to communicate with the WiFi module. The problem was desperately stupid: I set the pins in the wrong alternate function (the alternate functions table was organized in a different way than the others I had seen but I hadn’t noticed it before yesterday). Now, the Wi-Fi works well (I’ve forgotten to test the reception of messages with websockets so I hope I won’t have any problems with that).
The next component I tested is the capacitive sensor. The communication worked well but I wasn’t able to detect any touch. I investigated a bit, reviewed the configuration values and decided not only to copy the one that worked for the demo board but to evaluate the appropriate ones for our board. First problem with that: we use the internal oscillator of these sensors and its frequency is used in the formulas. But the datasheet only says that this frequency is between 35 and 55 MHz, which is a rather large interval. The second problem I faced is : how to know the capacitance of a banana leaf? With Tanguy, we went to see a professor who could have helped us, but he didn’t find any relevant way to perform this measure. So I decided to redo some tests with the demo board and my own configuration to see if it worked. Then, I did some new tests with our board and this time, the values read were much more coherent. So, it was a good news. The problem now is that the algorithm I wrote some months ago to detect touches doesn’t work with these values so I will have to work a little on this to make it work.
During the end of the week, I will work on the touch detection algorithm, on the “mechanic” (container for the boards, the servomotors and the LEDs,…) and on the code that will run on the board during the presentation.
Hi everyone, this is a soft week for breathup, indeed alexandre is a little bit stucked on the ads driver so we must wait until he make it work.
Most of our job is yet integrated and work fine on our PCB like the LoRa, the bluetooth, the sd card, the FatFS, the filters, the qualification, the RTC and the IMU. Thus we need to fix little details like the coding colors of our leds, and how to use our buzzer but Benoit already implements something. After that and with the ads working, our project will be over !
During the beginning of the week, I helped Alexandre fixing some bugs on the ads driver but now I can’t help him anymore because I never read the ads datasheet and he will waste too much time explaining me. Thus, I’m cleaning out our code and I’m writing our integrated final code for acquisition routine.
Hope, we will soon acquire something ! Stay tuned !
Benjamin for BreathUp
During this end of the week, the project have seen great improvement, as we have put together all the different part of the project that was developed separately.
I first worked on LoRa, and we are now able to send messages to TTN network from a PCB. This wasn’t as easy as expected. Indeed, I encounter two major difficulties. First, an incompatibility between the SPI driver and the SD driver because of DMA shared channels witch forced us to make an hard version of the SPI driver. Then we (I was coding with Samuel) found out that there might be an issue in the stm32 because when we set the SPI configuration to send 8 bits, it’s sending 16, so we find a way to send our 8 bits by asking the stm to send only 4bit, but that’s quite dirty…
Then I worked on the complete integration of the communication from the PCB and to the PCB, containing the creation of a report, ciphering it, trying to send it via Bluetooth, deciphering it while on the server and all the way backward with a new configuration of the device coming from the server.
Then I worked with Benjamin on the integration of the SD drivers, the filters and the qualification algorithms. After some unexplained problems, we finally find a way to make it work. Then I worked on the test on the filters and the qualification, they are now tested with the code and configuration that will be put on the PCB, and not another file. We can therefore change easily some parameters and be sure that everything will be ok on the PCB.
Eventually, during the IMU driver development and during the implementation of LoRa and the qualification algorithms on the PCB, I have found an still unexplained issue, changing value when they are passed to a function as parameter. The dirty fix I found is to allocate them as static values. then they are stored in the bss and the issue doesn’t happen. It looks as a stack overflow, but we didn’t find any other proof of this…
This week will be the last week before the project evaluation, and therefore I will work again on the global integration. I might also try to use the Objenious network for LoRa instead of the TTN one.
God kveld !
During the beginning of the week I was supposed to work on the filtering integration with sd card and with the qualifying part on our board.
But on monday, I realized that I wasn’t able to write correctly on the card. Having some issues with buffers, eventually, it was a problem of variable allocation that was on the stack and not on the heap. I’m still a little bit confused about the reason which isn’t really clear ! But it’s working, so I cleaned a lot my sd code and made the interface with the filtering part. I tested it but I faced new problems, indeed, I succeeded in writing the first 5800 filtering results but after that it seemed it bugged, yet, I didn’t catch any error and when I stopped the running session, the processors was in the idle thread like if there wasn’t any problems…
So I’m still working on it !
benjamin for BreathUp 😉