It seems I only find time to blog about the NG when new hardware arrives! You will find more about the new hardware below.
At first, I would like to tell your what happened since my last post from mid sommer! We were busy developing the NGOS further and we succeeded in supporting most parts of the hardware!
This means our RC-Controller now has control over the two DSL inputs and the sum-signal input. This also means we are now fully supporting up to 4 DSL receivers and two times sum-signal input for RC control. This will allow all forms of diversity, teacher/student as well as channel extension up to 4 times the number of channels you normally may have.
Furthermore the new RC-Controller firmware receives attitude data from the Flight Control's Kalman filters and uses it to do Servo Attitude Compensation for Pitch and Roll.
We implemented two servo operation modes, one where servo attitude compensation is done on servo 1+2 and servos 3-5 are available for other things, and another where the Flight Control has full control over all 5 servo channels. This will allow us to implement different Hardware Abstraction Layers (HALs) which not only use I2C actors but also those needing servo control like airplanes and helicopters.
Our SB-Controller firmware was completed as well. It now supports the MicroMag3 3-axis magnetic compass. To do that, it receives regularly attitude data from the Flight Control, uses it to do compass attitude compensation and then delivers the result to the Flight Control.
Looking at the device table on the Flight Control we now see this:
# show devices Detected devices: Addr Bus Description 0x16 I2C0 Atmel 644P RC/Comm Controller 0x18 I2C0 Atmel 328P SB Controller 0x02 ADC12 ADXR/MLX MEMS Gyroscope 12bit (nick) 0x01 ADC12 ADXR/MLX MEMS Gyroscope 12bit (roll) 0x00 ADC12 ADXR/MLX MEMS Gyroscope 12bit (yaw) 0x00 SPI0 LIS3LV02DQ 3-Axis Accelerometer 0x02 SPI0 ADS1255 24bit Analog Digital Converter 0x03 SPI0 AD7924 12bit Analog Digital Converter 0x00 SBCTRL MicroMag 3 Magnetic Compass 0x01 RCCTRL ACT DSL Receiver 0 0x02 RCCTRL ACT DSL Receiver 1
As you can see all our newly supported devices pop up, even those attached to peripherial CPUs. I had no actors attached, so it's normal that they do not show up.
These peripherial CPUs implement a new protocol called NGPP - The NG Peripherial Protocol.
NGPP represents a register based store/load framework allowing direct memory access on the slave devices. It's possible to implement it on most physical character based interfaces, which allowed us to implement it on top of I2C and which will allow us to use it on other serial devices like the UART. Those of you knowing the MODBUS protocol will recognize a lot of similarities.
NGPP is able to issue several read/write requests within one cycle. It's also able to read or write multiple sequential registers in one request allowing for a very efficient data transfer between slave device and host. Currently the NGPP implementation is built on top of our I2C physical layer, which by itself is a task based framework able to run several "state machine tasks" sequentially allowing NGPP to queue requests and get notified when the finish.
The RC-Controller as well as the SB-Controller both use the NGPP a lot to transfer data between slave and host devices several times per cycle.
Current RC- and SB-Controller NGPP statistics look like this:
NGPP RCctrl read: 16 ticks/100 cycle (max: 17, ngpp overrun 0) NGPP RCctrl write: 5 ticks/100 cycle (max: 6, ngpp overrun 0) NGPP RCctrl read: 66 bytes/100 cycle (max: 76) NGPP RCctrl write: 41 bytes/100 cycle (max: 45)
NGPP SBctrl read: 6 ticks/100 cycle (max: 7, ngpp overrun 0) NGPP SBctrl write: 5 ticks/100 cycle (max: 6, ngpp overrun 0) NGPP SBctrl read: 11 bytes/100 cycle (max: 13) NGPP SBctrl write: 31 bytes/100 cycle (max: 36)
As you can read from the above statistics data, we have no problems in transfering the needed amount of data. Since NGPP requests can be issued during the whole closed-loop cycle as well as from any user space context (meaning the shells and their associated processes) we are free to model our code according to our needs.
We can access the registers directly from any Flight Control shell:
# show ngpp sbctrl NGPP sb-ctrl registers: sb.devices 1 sb.nick 57 sb.roll -35 sb.mag.x -67 sb.mag.y 21 sb.mag.z 335 sb.heading 3164 sb.test1 42 sb.test2 43
And set them directly if they have a read-write flag:
# set sb.test1 44 NGPP: wrote sb-ctrl register 7 value: 44
To demonstrate the cooperation of the three CPUs in our distributed system, I made a small movie showing Servo Attitude Compensation:
Play on: YouTube
After having implemented support for most hardware devices on the new NG, our hardware developers also produced a new revision of the NG PCB boards.
The newest revision is called HW-0.22 and is a pure bug fix revision as all 0.2x versions were. The next feature revision will be HW-0.30 on which brainstorming and work already has begun.
We received the new boards today!
Here are the first pictures of the new HW-0.22:
Opening the packet and looking inside it seems that the boards look fine:
We also received a separate panel containing the 7 breakout boards which we will include with each HW-0.22 board!
We now have six accompanying MLX and ADXR610 gyro breakout boards (three of each) as well as a LISL breakout board:
A set of these 7 breakout boards will be included with each FC+SB PCB set.
We will start to investigate the new hardware and should everything be in order, we will release them to the broad public. Be sure to check our homepage in the next days.
We will open up the new UAVP-NG Shop soon!