Two days ago, we finally managed to flash the Gainspan Wi-fi module’s firmware and we can now talk to the module through the SPI interface and I managed to make it connect on a router which was in the room. I am now working on the driver to make it work completely.
As I had finished coding the PD algorithm, Pierre-Hugues worked in order to enable us making real tests of balance with Ball-E. Therefore, I build a system to put the robot on the ball while hanging in the air so that it couldn’t fall on the floor (you may see it on the pictures). We made some tests with several balls and it appeared that we needed to have a center of gravity higher. That’s why you can now see Ball-E with a tall structure. Today we are going to buy a bigger ball to make new tests, it should be easier for the robot to keep its balance with this one.
We hope that in a few days, we will post videos of Ball-E standing up and not falling !
During the vacation, I had a hard time coding the wifi driver using the SPI interface. Hopefully, we had foreseen a serial interface in case of problem. Through the serial interface, typing the command AT+SPICONF=0, 0 (taken from the reference manual) gave us the answer ERROR: INVALID INPUT. Therefore, we concluded that it must be the firmware of the Wifi module that doesn’t handle the SPI interface. However, to download a new firmware, I had to firm a NonDisclosure Agreement and send it to Gainspan and fortunately they answered us quite fast and we now have access to all the firmwares available. Today’s objective is to flash the Gainspan module and code the Wifi driver through the SPI interface.
While I was waiting for Gainspan’s answer, I studied the PD algorithm in order to control Ball-E’s balance and I coded a function that should (if I didn’t make any mistake) make Ball-E keep its balance. We will only be able to test it on Wednesday when we receive the external motor control card.
Today, we worked on the bootloader 0. We updated him in order to be able to switch in recovery mode after a cold boot.
Just to remind this bootloader is for cards of trafic light, switch and remote control. The last version switch in recovery mode only if firmware 1 and 2 crash. So if the update function have a bug, it’s impossible to update the card.
Moreover, the recovery mode is a very simple firmware which is able to listen CAN Bus and update or remove firmware and reset the card.
EDIT : A light optimization we reset after cold boot and without recovery instruction.
See you soon,
Since Monday, Brice work on the protocol CAN to be fully compatible with the NMRANet standard while Guillaume and me work on the can bootloader and how to update firmware of the boards over the CAN.
Two schemes about our work :
On this first, you can see that we have make a static repartition of the 128kB ROM. At the begin we have the Bootloader with a recovery firmware, then some flags and at the end we keep 2 firmwares and 2 configs.
With this procedure we are able to check after n steps if the last firmware fail, and then back on the previous. And if the previous fail after n steps we jump to the recovery firmware and are able to flash over the can.
In conclusion, we think that we have to be very bad programmers if we want to brick our cards.
Reply in next weeks .
We started the week by working on Ball-E. I am very happy with the protoype that Matthieu & PH built on Monday afternoon, it gave us an idea on what motors we need and we had the chance to check that the system works (the mechanical part). While baby Ball-E was being built, I have been digging for information on the Kalman filter applied to problems of inverted pendulum. Dan Simon’s “Optimal State Estimation” gave me a better understanding of the mathematical context. Apparently once we have our kinetic model we can implement the filter. I still need to clear up some thoughts on applying it to Ball-E (sensor fusion… in which order, what defines the state -acceleration, orientations, how will we process data from the IMU).
Meanwhile yesterday I finished my PCB. I was satisfied about the final placement. I hope the routing is good. Still there were some ground vias missing in the end and I had forgotten the command that would have enabled me to perform the final corrections.
Today I worked on the paper on firmware and bootloader. It was the chance to use Latex after a long pause. Writing required re-reading some of the papers we studied for the presentation and searching for new information. Brice and Jeremy worked on their parts as well and we discussed in the evening on the paper’s structure, content and what each one of us has written.