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.
So SwARM in a nutshell :
We are getting our PCB this week, we finished the board.h, we need to port some driver on ChibiOS, I’ve got a functioning driver for the IMU and a calibration algorithm. I started to design a real choreography with Paul : we wanted to make some mouvement with musics. And maybe a pong animation.
During the end of the week, I keep working on the SD card driver. It still doesn’t work but I made some progress! In fact, my sd card is recognized as an MMC one so that, the connection isn’t possible. I do not know why I have this behaviour… During a long time, I thought it was because of my SDIO initialisation but after checking it like 10 times, I’m quite convinced it’s right.
Afterwards, we met other problems with our PCB indeed, when we tried to flash for the first time our board, the outer oscillator didn’t start up… which is really problematical because without it we can’t use our usb to debug… But we will try to find another way !
Finally, on Friday, I worked on the qualifying part again, changing our filters to reduce the analog to digital converter rate from 2000Hz to 1000Hz. But after some tests, it seemed that it degraded too much the signal quality after algorithm. Eventually, we will keep the 2000Hz frequency.
For the next week, I hope I will end with this SD card driver and begin to work on folder management.
Stay tuned ! 😉
Benjamin for BreathUp
Since Monday, I have added a detection to know if the user switches off the Bluetooth of his smartphone when exchanges with the Bluetooth module were launched. I also fixed errors.
Today, BreathUp received the PCB. However, there were some problems. Indeed, when we have connected the battery on the PCB. There were components which became warm. After investigations, we found errors with the imprints of the LoRa component and the regulator of tension. For the second error, it seem to be not very difficult to correct it with a patch. But about the first, it will be more difficult 🙁 .
Now, I will begin to work on the IMU driver.
As already explained by Benjamin and Alexandre, we received our PCB. Sadly, they contain some mistakes that will need to be patched and the LoRa part is quite compromised because of that… But anyway, we will do our best during the end of the week to patched them and you will be able to find an update in next Sunday’s post.
I also worked with Alexandre to set up our ChibiOs project, including: configuring the board, the clocks, creating a basic test program…
Eventually, I worked on LMIC and AES. I concluded that we cannot use LMIC’s AES function for the Bluetooth communications and we will therefore create an other one.
For the end of the week I want to work on the patch of the PCB, the basic development on the PCB (LEDs, PWM, UART, shell…) and on LMIC implementation on RFM95W chip that we might use in our PCB patch.
Have a nice end of the week,
Buenas Noches !
We are back at school up to the end of january ! We had the honour to receive our PCB today but also the disappointment that they are not working ! Indeed, after some soldered joints, one of our PCB, when my mate tried its, overheated and it may be unusuable anymore. But they find the problem, it seems to be due to some errors of imprint that can be repaired on others !
Concerning my work, I’m a little bit stucked on ChibiOS SD card driver (SDC), indeed, when I’m trying to connect my SD card from my evaluation board, the connection failed… After a long moment of seeking, I found out that I may have an error in my board.h. I modified it taking into account one of ChibiOS example, but I still got the same result. I will work on it again and try to figure out what happens.
Stay tuned and I almost forgot, Happy New Year !
To start with the good news, the PCB are on their way! We hope to receive them before Christmas.
For the end of the week, I worked on a new LoRa module based on a SX1272 chip. With this chip, I managed to send messages coming from the uart and up to 30 char. I still need to work on the down way (ack and sending message from the server to the device) and on the Over The Air Activation.
I will then still work on LoRa during next week and I should work on its integration with the server.
Have a nice weekend.
Here is what I did during the beginning of the week:
- I worked on the BOM, because the library is quite outdated and therefore I needed to find real reference for each one of the 166 components of our PCB. That was a really boring task and as we can’t afford any error, I had to ask Benjamin for a check, then check again… And we found errors…
- I worked on the server, eventually, we are hosted by Scaleway because Heroku was too restrictfull for our project. As I changed the server from Heroku to Scaleway, Samuel tested it, and discovered some unexpected comportment that weren’t happening on my computer… But I fixed them! Damned JS…
- I worked a lot on LoRa, and still have an unresolved issue. The main chip register seems to change by itself, without any reason and obviously that’s not expected… As even with the help of Alexis and Samuel we didn’t find any solution, I will from now on work on an other module based on a real sx1272 and not on a Chinese one… I hope to obtain better results!
Eventually, for the end of the week, I really want to be able to send as many messages I want with LoRa. And If I have some time remaining, I will characterize the discharge of our battery.
Have a nice end of the week,
Since last Sunday, I worked on the PCB and on the server. First, on the PCB, I did a complete check of both the schematic and the routing, to find the remaining errors. Alexis also did it on his side, and we both found errors. After having corrected them, I gave my approval to send the PCB to the factory, and so did Tanguy. We should have received them in 8 working days. But as we don’t really need them during Christmas holidays, a longer delay is possible (which is good as it reduces the cost). So our PCBs have still not been sent. But we received 2 evaluation boards for the Wi-Fi module. Thanks to them, we’ll have the opportunity to develop the driver to control the Wi-Fi connection with ChibiOS. Alexis will also solder an evaluation board for the Bluetooth module, so that we can also work on it during the holidays.
After having finished my work on the PCB, I spent several hours on the server. I faced many problems with
git subrepo, and thanks to Perceval help, I manage to get rid of it. So now, it’s much easier to work with Heroku. I’ve added authentication to our server and I tried to add links between the tables in our database. But I faced several problems, some due to the facts that I didn’t wrote all the code (Tanguy is also working on the server) and that I assumed things that happened to be different (for instance, we use a Postgre database on Heroku but a SQLite one for Continuous Integration because Tanguy has the impression that it’s not possible to install a Postgre database in the test environment).
As working on almost the same thing at the same time seems to be a rather bad solution, I will probably start to work on the Wi-Fi module and let Tanguy continue his work on the server. So by the end of the week, I will learn how ZentriOS works and start to write the driver that will control the Wi-Fi module.
Anyoung haseyo !
This week, I’m back in the game ! Indeed, I started to work anew on our project !
I made two different things: first, Alexis asked us to look at distributor code for our PCB and to update them for resistors and capacitors. Xavier did it but I was in charged of verifying his work ! So did I this morning !
Then my only current task is to port our matlab algorithms into C code ! As I already chose the CMSIS/DSP library for our embedded system but I had to do some reducing complexity. Our algorithms were made with some finite impulse response filters with five hundred orders, so I implemented its with infinite impulse response filters. I decided to use butterworth filters for their stability in the bandpass, so I made a new algorithm on Matlab to see if the new output was right for what we need ! Of course, I made some modifications but it seems to be quite satisfactory right now ! Thus, our filters have orders included between twenty and one hundred twenty five (only for one filter!) and thanks to Matlab, I reached to calculate the filter coefficients.
As a consequence, by the end of the week, I now have to write the C code corresponding to our filters and to test them on our data base !
Stay tuned !