Tiring day, very tiring indeed! This morning: ADC, ADC, ADC. I re-read the datasheet of our STM32 board and saw some examples of code. Then I implemented my own code which… doesn’t fully work yet… but it sure will very soon
The rest of the day up until now, Gleison and I spent time thinking about the 12V DC motor in our locomotive. The more we thought and the more we raised questions and potential problems. Fortunately, we managed to find solutions to almost all of the questions we encountered. I’m not positng them here since we’re not fully sure yet. I’ll work on it again tomorrow and put some order in all we did today. We’d also like to discuss this with Alexis and Sam before going too far!
That’s about it for today!
Yesterday, we did our first test with our self-made coil and it was enlightening. Many thanks to Alexis and Félix for their cooperation
We were also given our BLE kit. I worked on it this afternoon. I’ve mostly set my tool-chain and got an example (which was given with the BLE sdk) to work. Here is a quick video for you
Some useful links :
‘Till next time.
So, today was an epic fail.
I try to work on the trimmer (potentiometer on my STM32 board). After considering datasheet a long time, and trying to implement how it works, there were still some parameters I did not understand. That is why I thought it would be appropriate to see an example, and so I decided to flash a ChibiOs ADC example on my board. That is how I lost my JTAG sond and my STM32…
I did not understand what had happened.
I lost several hours trying to reconnect my STM32. Now, that is done, and I understand that I lost hours for… nothing, because it was obvious since the very moment I lost my JTAG sond that it was because the ChibiOs board used in the ADC example do not allow JTAG use, and so, I have to reboot my board with the right configuration.
It is just…. I had forgotten one step : I had to keep two buttons pushed while I reload openocd and gdb.
Just Two buttons pushed. I am not very proud of myself, just now.I think I will keep on working on my STM32 tomorrow. I need some rest.
I mostly worked on the stm32 lab works at the beginning of the week (where i discovered ChibiOS/RT events, its EXTI and ADC drivers), this allowed me get a better understanding of ChibiOS/RT and the technical challenges we will have to face, or at least implement. It also helped me to get more motivated about ROSE, as it was something I was (relatively) good at, and i didn’t know where to go with the project.
Fortunately we recentered the project Thursday and got a far better vision of where we are heading !
We chose to get rid of the localisation part of the project, as it was far to constraining and diverted us from the core of our subject, and chose to focus more on its artistic part. Our main application will thus be having them float and dance on music in indoor or outdoor. I think it is a great idea and hope that we will be able to get close to the idea of urban prototyping (I discovered this movement in drix hackster page and was rather fond of it).
For my part I started working on the FreeImu module with Nicolas in order to obtain the balloon’s altitude, we are currently having issues on how to communicate with the module (Nevertheless we managed to use ChibiOS/RT’s I²C driver), but I hope that we will be able to get good results at the end of the Week End, but a more realistic estimation would be for Wednesday.
I also had my first PCB class and even though I had a few troubles handling the software at first, it eventually seduced me and made me rather eager to design the project’s PCB (as everyone else in the group).
This week my group and I had some questions to answer in order to best define our project.
First, let’s see a schema of our project :
As we can see we proposed that our Central Station be composed of a Raspberry Pi with a Dongle BLE. This way we can offer a built in product at the end of our project. Even if in the first part we will work from an usual computer.
Regarding the BLE communication
According to the document Creating Bluetooth Low Energy Applications using nRF51822 provided with the evaluation kit of Nordic, we assumed that our PCBs will first advertise in order to enable the Central to connect to them. (cf “For a Central to be able to connect to a Peripheral, the Peripheral must be advertising.”)
Then, they will be in connected mode even if the PCB is able to decide to ignore some connection intervals in order to reduce the consumption of energy. ( cf “However, if current consumption is important and a Peripheral has no data to send, it can choose to ignore a certain number of intervals.”)
On Friday, Noemie and I have made some research in order to fine a LED strip which fits to our needs. We’ve found this one which enable us to control each LED easily. We still have to make some precise calculation in order to know if we can modulate the light fast enough to enable the train to detect his position. A first rough calculation made us think it’ll be too short.
So on Alexis’ advice we are going to look for an other kind of detection. Theses ones would be composed of coils which are going to emit a modulate magnetic field and the train will have a Hall sensor.
We’ve a to find an equivalent of this a bit cheaper on Alibaba website because we measured that we have almost 28 meters of rails to cover.
I’ve also enjoyed the Friday labwork with my first exercise on PCB and I hope we’ll soon manage to make our PCB.
Existential crisis of the project
We are dropping the indoor localization part of the projet (too complex, and we can do something great without it). So the balloons won’t be able to know where they are, so no autonomous choregraphy where we have a live feedback of what the blimps are doing. But it doesn’t stop us from doing an autonomous choregraphy mode, where the LEDs are controlled but the mouvement are random.
We now focus on an interactive sound and light balloon show, so it seems like a bigger part of the project will be high level software developpment.
What’s the state of things ? The FreeIMU system is being studied, as well as BLE and/or IR technology. We have motors and LEDS. The propellers are on their way.
We now have a second version for our PSSCs.
I enjoyed the PCB software class, and can’t wait to have to do it for the LEDzep PCB.
Meanwhile, I’m still designing a first draft of the blimp structure so we can print it and do some propulsion test as soon as we get the helium.
We finally have an emitter coil. It is not finished yet but we are already used it to make tests. (Pictures are coming as fast as possible).
We try to see the intensity of the fields generated by our system but it is very low at the moment. It remains for us to be able to generate the signal that we will use with the coil. Indeed a “classic” frequency generator is current limited and this poses us problem. We will use an H-bridge to power the coil during our tests.
On the other hand, we continue our inquiries on the shape of the coil and the number of laps that we need. Indeed, despite our 200 turns of wire, our system is less efficient than the Razer Hydra.
Moreover, these last two days, I worked a litlle bit on my lab work with my STM32. Now, I am able to use the potentiometer and the adc to have some fun with the led intensity. Actually, I’m working to implement a serial port to USB. My purpose is to use the correct driver of ChibiOS to configure the USB port used to power the card so that it is seen as a serial port. I hope to finish that as soon as possible.
Finally, today I re-started to use Expedition PCB. I missed it a bit.
I look forward to be able to map our project because I really like the idea that the placement / routing of components that does not happen randomly but must comply with all rules of signal integrity and electronics.
To be continued…
Flash a-ah // He’ll save everyone one of us
Our #1 objective for this week is to find the components we will use in our project. Basically, we have to find: a micro controller, a BLE chip (possibly integrated in the MCU), some memory and battery. For the micro controller, we already have a favourite (nRF51822), however we need to look for outsiders. I listed some possible competitors yesterday, and now I have to compare them. About the battery, Adele made some good research, I’m sure she will tell you everything soon.
Concerning memory, we discussed a lot about this subject with the teachers on Wednesday. They had advised us to use a FRAM, which is designed to consume a little energy. However, when I looked for FRAM modules, I found out that this technology was extremely expensive (about $15 for 2Mb). So the teachers told us to investigate the Flash technology (now you have understood the title of this post). And a Flash module we found was not so energy intensive, and above all extremely cheap (about $3 for 64Mb). However it was not available anymore, so I looked for other products of the same family and I found the same chip with a 32Mb storage capacity (AT45DB321E). Eventually, we have a champion!
And last but not the least, I kept on my STM32 lab and now all the semaphores, interrupts and events work all together! Two lessons to be learned: conditional variables must be used with mutexes (and never alone! It doesn’t work! One can spend hours on that problem figuring out why the hell nothing works! I know this! It happened to me!) and semaphores are not that bad. In the end, I can switch on and off my led with a button (yes, I know, three days to light a led…). Next item on my to-do list: change its intensity with a potentiometer.
May the force be with you!
This last few days, I mostly worked on my STM32 school’s work. I have finished led brightness controlled by the two pushbuttons so far. I am still working on the potentiometer.
On LEDzep’s side, I have a FreeIMU v0.4r3. It features a MS5611-01BA high resolution altimeter. I am trying to retrieve data from the altimeter to see if we could use this to determine the altitude of our balloons reliably. I’m using my Olimex board (STM32) and ChibiOS. The communication bus is I2C.
Today, we also have discussed as a group about the continuation of our project. More to come very soon.
This week I am in charge of answering all the questions we have about the LEDs we are going to put underneath the railway. Today, I answered some of them:
- How will we control the LEDs ?
After having discussed with Alexis, we found two solutions:
1. We can put independent LEDs underneath the railway and control them thank to PCBs ; each PCB would them be wired to one of the railway switches PCBs. This solution involves a lot of wires !
2. We can use ribbon of LEDs. Though the LEDs would we on a same line, each of them could be controlled independently thank to a ribbon controller. Each ribbon would then be linked to a railway switch PCB.
I personally prefer this solution, because it involves less wires than the first one … Moreover, I have looked it up on the internet and have found numerous models of ribbons with different number of LEDs per meter, and different caracteristics. We will choose the LEDs ribbon according to how many LEDs we want, the length of the ribbons, the colours and the way they are controlled.
- How many LEDs ?
It would depend on the ribbons we can find, but approximately one for 5 centimeters.
I will measure the total length of the railway tomorrow.
- Will the LEDs be used to determine the position of the train ?
In our game, the only moment when we need to know the exact position of the train is when the train rolls over a LED ; so that it seems logical to determine the position of the trains thank to the LEDs. We will put an optical sensor underneath the train which will be able to determine when the train actually rolls over a LED.
However, we need to know which LED a locomotive rolls over. In order to do so we will modulate the light of each LED differently so that they send the accurate information to the central station and the good LED is shut down. (We now need to make sure the ribbon we will find will enable us to modulate the light of the LEDs).
- In which colors ?
If we use LEDs ribbons, we can easily use LEDs which can change colour.
Today, I answered a lot of questions regarding the LEDs ; but the answers have brought a lot more questions!
All those questions should be answered by Sunday.
By the way, I also managed to light the LEDs in my STM32 thank to the buttons! I think I have finally understood the events in ChibiOS!