Categories

BreathUp: I2C, IMU, LoRa, Qualification, Cipher

Hi,

During the end of the week I worked mainly on the IMU. It uses I2C, and I had never worked on it. Therefore I first needed to make myself familiar to this protocol. And this is done.

Then I had to send correct requests from the MCU, and this is also done and checked with a logic analyzer.

But the final part, is to receive correct responses from the IMU. And this is still not the case and I still don’t know why and will therefore investigate on it during the beginning of the week.

I also implemented on our PCB the LoRa driver (not tested since we don’t have a LoRa chip for the moment), the qualification and the cipher part that had been prepared.

Eventually during the next week I will work on the IMU and on the LoRa.

Have a nice week,

Xavier Chapron

Makahiya – server, capacitive sensor and Wi-Fi

Hi everybody,

The beginning of this week has been quite productive. Indeed, I managed to have different tasks reaching a functional state.

First, I worked on the server. I added several pages to provide an interface that allows the user to trigger all the actions that the plant can perform. I also improved the login/logout functionality. For the front-end, after some discussion with my classmates, I chose to use Bootstrap. It allowed me to have an acceptable-looking website in a short time.

On Tuesday, we received the new FDC evaluation board (for the capacitive sensor). This time, I connected the pins very carefully, entirely reviewed my code and tested it. After some minor correction, I was able to configure the sensor and to read data by polling it. After that, because polling is a bad thing and that in that case, it can be avoided, I implemented the part of the driver that waits for an interrupt (that signals that a new set of data is available). With this, the driver seems operational to me. Next step will be to connect it with the detection algorithm I wrote a few months ago.

Finally, I also worked on the Wi-Fi module. I greatly improved the websocket part of the driver and after the corrections made by Tanguy on the server side of the websockets, it worked very well. Like with the capacitive sensor, it was done by polling the module. And in this case also it was possible to avoid it by using an interrupt. So I tried to implement this part of the driver. I had some problems to find a pin on which the pulldown resistor worked (because on the 2 first  I tried, there was a pull-up somewhere on the board…). And I had also some (stupid) mistakes on my code that make me lose some time. But it forced me to carefully review my code and thus to improve it, so it’s been useful. So now, websockets are fully operational. I also improved a lot the management of the errors and started to implement the decoding of the commands that will be received through the websocket. As one of these commands is to play a music downloaded from the server, I tried to re-use the code I’d already written for this. And the last error re-appeared unfortunately: the Wi-Fi module takes too much time to answer to my requests. And I don’t have any idea of possible origins of this problem. I will try tomorrow with another Wi-Fi network to see if it changes something, but I don’t hope too much.

The end of the week will be dedicated to solving the problem with the music and to connect the detection algorithm with the capacitive sensor driver: assembling several parts together in fact. It’s the beginning of the integration phase and this is a good news.

BreathUp, Bluetooth interfacing and Post Request

Good Evening!

During this end of the week, I spent my time to interface the Bluetooth Application with the code which made by Alexandre in order to connect the smartphone to the Bluetooth unit and do long exchanges. After some problems and tests, the two devices are interfacing.

Since yesterday, Xavier has changed the encryption’s algorithm and the server request. I have began to switch the two Get requests to Put requests, but I will finish that next week.

Before the interfacing of the Bluetooth, I spent few times on the IMU driver to understand how the I2C communication works .

Have a nice week,

Benoît

Makahiya – I2C, a burning solution

Hi everybody,

First of all, Happy New Year. I hope that 2017 will be a wonderful year for you (or at least a not too bad one).

Since the beginning of the week, I’ve worked on… I2C ! Following the advices of Samuel and Alexis, I finally added the pull-up resistors and spied the communication with an oscilloscope. But this doesn’t help me to find the problem. And finally, I put the pins on OPENDRAIN mode, and it solved my problem. Such a stupid reason!!! It was due to an assumption I made during my first tests on the I2C: I thought that this parameter (opendrain) only deactivated the internal pull-ups. And in fact, it’s two completely different things… So yesterday evening, I managed to read and write registers of the capacitive sensor.

So this morning, I started to search for the proper values to set and implemented the initialization code. In parallel, I helped Tanguy on the Bluetooth module (because he also had communication problems). My initialization code was not perfect on the first try and I encountered strange behaviors, with the capacitive sensor sometimes suddenly not responding anymore. So I plugged and unplugged it many times. And once, I made a mistake on the connections. As I was solving problems, I didn’t see this one immediately. But after some time, I felt a strange smell, like smoke: the capacitive sensor was very hot. So I unplugged it, made some tests with Perceval’s help, and I’m quite sure that the sensor is dead… Less than 24 hours after the first communication, I lose my sensor… Bad news.

During the end of the week, I will work on the server, and I hope to have a working version before we receive the PCB (probably next Tuesday or Wednesday). For the capacitive sensor, I don’t know if it’s better to wait for the PCBs and continue the tests directly on the PCB or to buy a new evaluation board to finish the tests. This will be discussed tomorrow or Friday.

Makahiya – IFTTT & I2C

Hi everybody,

Just few words to write down what I’ve done since last Sunday. First, I had a look on the ways to interact with our flower. At the beginning, we envisaged to connect it with IFTTT. So I had a deeper look on how to do it and discovered that we have to pay 199$ to do it. For no more than 2 weeks and without any guarantees on the use because it’s possible that we won’t have time to do the connection, I think that for now, we can put this solution aside. So I propose 2 interfaces: a web page and an Android app. These 2 interfaces are quite simple to implement. And if finally, we have time, it won’t be too late to connect our plants with IFTTT.

Then, I worked a little on I2C communication with the capacitive sensors. Some tests allowed me to rule out the device address as the origin of the communication problem. Indeed, the sensor doesn’t respond to any message sent by my own code whereas it properly responds to messages sent by the demo program. And for now, I can’t see any differences… Pull-up resistors also doesn’t seem to be the origin because the bus behaves properly. Obviously, there is at least one difference between the demo board and my own arrangement, still hidden unfortunately. So more work is required.

During the end of the week, I will work a little on the I2C communication.

Next post will be next year, so enjoy the end of 2016 🙂

Makahiya – websockets & I2C

Merry Christmas to everybody,

I hope that each of you can enjoy a wonderful day with his/her family or his/her friends, and that Christmas father has been kind with you.

Just a few words on what I’ve done since last Wednesday. I spent some times working on connecting my Wi-Fi module with the websockets that run on our server. I managed to have first results: connection is established and I can send messages. As I don’t have access to the server and Tanguy doesn’t have Internet access, I can’t have any information on what is received by the server, thus debugging is quite difficult. So next steps will wait a bit.

I also had a look to the I2C driver, in order to talk to the capacitive sensor. I’m able to start a exchange but I don’t receive any ACK from the slave. As I don’t have pull-up resistors, it can be the origin of the problems (the internal pull-ups are said to be too weak). I will add pull-up resistors next week, once returned to Paris, and make new tests with them.

The 2 targets are thus in pause, and I don’t have more to say for now.

My goal hasn’t changed: having both Wi-Fi and capacitive sensors working by the end of the holidays.

Merry Christmas

pimp my git

hi everyone,

today we, all together, SwARM, like a family (with some issue maybe…) have entirely reviewed our git history of our features to clean our git deposits.
It was very painful but we learned a lot about git (like git rebase) I feel like an historian right now !!
We also started to merge our finish features in dev branch and use a pull request system to do so.

I’m quite exhausted but happy of this work. I also reviewed Paul’s push request which he restarted a few times before being accepted ^^

Also I’m progressing on the IMU part but I feel that I’m stuck with a little problem on I2C transmission : signal don’t appear on the signal analyser but the code seems correct. Even Alexis didn’t find why it didn’t work. Still digging…

And the surprises of today : secret Santa !
Paul organized of secret Santa party for rose attendant which was a very cool idea ! Benoît offer me a wonderful glass and I’m very pleased of

Paul organised also a dinner in a restaurant “café d’Italie” which was good. Thank you very much for your wonderful ideas

That’s all for tonight 🙂

SwARM back to work

So I finish my Athens week, which was great. I worked on I2C protocol : it helps me with the IMU communication.

I started to look into the IMU documentation to see how to create the driver in ChibiOS.
I would like to finish this by the end of the week.

Concerning the robots location detection we might need to re-introduce the camera and picture processing. So I will work on openCV maybe next week.

That’s all 🙂