LEDzep – Android app and nRF51822QFAAC0…

Hi everyone,

This last week, I worked on nRF and Android. First, I implemented all the missing services. I can write or read data from a characteristic using the UART. I implemented a simple protocol to communicate between the nRF and the STM:

A frame is composed of:

  • start delimiter: 0x7E, 1 byte
  • type of message: 1 byte
    0x10: battery level
    0x11: altitude level
    0x12: compass level
    0x13: collision status
    0x14: left motor thrust
    0x15: right motor thrust
    0x16: left servo level
    0x17: right servo level
  • data: 1 byte

We don’t need an escape byte as we have only one byte of data every time.

We also need a software flow control. The nRF chip we use (nRF51822QFAAC0) has a 1 byte Rx buffer. Each time the nRF receives a byte, it sends an ACK back to the STM.

I also improved the Android app. The priority was to be able to command the balloon as soon as possible using the 2 servos and the 2 motors. Then, using Android, we can control the balloon and do many tests.

Here’s a screenshot of the current state of the application:

 Screenshot LEDzep app 

The 2 vertical seek bars are used to control the motors and the horizontal seek bars are used to control the servos. The app also displays data coming from the balloon.

The “Send command” field is obsolete for now.

I am now working on flashing our nRF software to the LEDzep board. It’s not as easy as expected because we developed the software targeting the nRF51822QFAAG0.
Unfortunately, our supplier made a mistake and gave us a nRF51822QFAAC0. This is quite a problem because I had to switch the SDK from 5.2.0 to 4.4.2.

I’m able to flash our card but it doesn’t advertise BLE advertisements yet.

More to come soon!

LEDzep – More nRF51 and Android!

Hi everyone,

Since last time, I continued to work on Android. I am now able to exchange any kind of characteristic using read, write or notify operations (we won’t need indicate) between the nRF and Android. The Android app is still very basic, it is able to connect to a selected BLE device and it contains some buttons and text fields to let the user exchange data with the nRF.

I then began working on the nRF chip. It took me some time to get started as the code is quite complicated. I was able to create the localization service and to add the compass and altimeter characteristics. I am now working on transmitting the data coming from the UART to Android through BLE.

We also received our PCB today! Thomas also did a great work on the balloon’s structure. Hopefully, we’ll have some remote controlled flying balloons by next week.

Stay tuned!


LEDzep – Progress on Android


I have made some progress on BLE and Android. At first, I tried to exchange simple values like  the battery level between the LEDzep’s Android app and the nRF81822. It helped me to understand how the Android API works with BLE.

Then, I decided that we should establish all the services we are going to need to exchange data between the balloons and the operator.
After some thinking, I came up with this first draft:

  • Battery Service : to exchange the battery level
  • Generic Access : to exchange balloon’s name and some other useful information
  • Link Loss : to be alerted if we lose radio link with a balloon
  • Immediate Alert : to be alerted if a balloon collides with something
  • Tx Power Level : to exchange data about the Tx power level

Those services are the standard services defined by the Bluetooth SIG (see We also have to add some services because they are not standard:

  • Command service: to exchange command data for motors and servomotor
  • Altitude service: to exchange data provided by the altimeter
  • Compass service: to exchange data provided by the compass

As I said, this is an early draft and it is very likely that we have to change it a bit.
Thanks to Alexis’s mail, I was able to set up a BLE sniffer. It’s going to be really useful for the upcoming work on Android and nRF51822.

More to come soon!

LEDzep – BLE and Android


This week, I mostly worked with my team on selecting the right components, eg. the microphone, the battery, the altimeter, the BLE chip… Thomas did a great schematic to sum it up. We are now focusing on the PCB design to be able to send the PCB to production as soon as possible.

This weekend, I worked on my nRF51822 evaluation kit. I was able to flash a proximity app example. I can connect to it using my Android smartphone (Samsung Galaxy SIII / Android 4.3) and the app nRF Toolbox from the Google Play Store. I can light up a LED on the board from the phone or ring the phone from the board, all using Bluetooth Low Energy. It works really great!

I also started to work on the Android app. More to come very soon!


LEDzep – motors!

Hi everyone,

This last week has been really eventful and I didn’t took the time to post on the logbook. On friday, we had the communication challenge. I prepared for it by working on my lab work during the week. Unfortunately, it didn’t go as well as I expected.

At the beginning of the week, I spent some time with Felix to choose the components we are going to use on our balloons, the motors for example.
We started by looking at brushless motors. Brushless motors are quite interesting because of their low weight and high efficiency compared to brushed motors. We talked about this possibility to our teachers but they told us that brushless motors have a minimal rotation speed. This could be killer for us as we need to be able to control the speed of the motors precisely.
Another solution would be to use sensored brushless motors (as opposed to the sensorless motors we found), but we didn’t find any interesting motors.
That’s why we are going to use brushed motors. We are currently discussing about which motors and H bridges to buy.

This week is Athens week and I will have a lot of time to work on LEDzep as I’m staying in Paris. More coming soon!


LEDzep – Some news!

Hi everyone,

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.


LEDzep – Some work on infrared sensors and presentation


On saturday, I mostly work with the group for tomorrow’s presentation. We had to define exactly what we want to do with our project, what it could be useful for and establish a timetable.
I also had time to do some tests with infrared sensors.
In order to get familiar with infrared technology, Thomas lended me his webcam so that I could remove the infrared filter. I also borrowed an infrared proximity sensor from Telecom Robotics club.
It worked really well as I was able to see the infrared light emitted by the sensor with the webcam.

Tomorrow, I might be able to work with a digital altimeter. It could be really nice to check if these sensors could be used to determine the altitude. Alexis hopefully has some so I could just plug one of them on my Olimex STM32P407 board and try to move it around the room.

Stay tuned, there’s more coming soon!


LEDzep – Proximity sensors

Hi everyone,

Today, I took a look at different proximity sensors. I started on Farnell’s website but they were all extremely expensive.
At the same time, Thomas was trying to dermine the distance separing a baloon from the ground. Alexis responded to his email with a link to SparkFun’s proxmity sensors.
One of them has a range from 0 to 765 cm. It’s an ultrasonic sensor: It only costs $50 (relating to Farnell).
I didn’t find any information about the weight of this kind of sensors. It’s not on the website nor in the datasheet.
We still have to decide what we will use to determine the balloon’s altitude. The sensor sounds good but it might still be a bit too pricey…

After that, I continued working on my presentation about PWM and H bridges with Yann.