Brick Firmware Update

We just released new Brick firmwares that fix three important bugs:

  • Fix RS485 timing bug. This is a very old bug that we were not able to figure out for many years. Bricklets that use I2C (for example Temperature Bricklet) would somtimes give false values every few 1000 messages if RS485 was used. This was caused by a mix of I2C/RS485 timing constraints. We now use DMA for I2C Messages to fix this.
  • The handling of the initial enumeration (the enumerate callback with enumeration type = CONNECTED) has been completely reworked. Double enumerations don't happen anymore and the enumeration also works if a USB cable is connected to an already powered stack. This also fixes some other strange behavior. For example: In a RS485 network, if you restarted the RS485 master stack you had to restart the slave stacks as well, otherwise they wouldn't enumerate again. With the update the RS485 slaves will automatically re-enumerate if the RS485 master re-enumerates itself.
  • We will now never do a real hard reset if triggered by USB. USB has reset/suspend/resume messages that triggered a hardware reset (internal messages). There are several possibilities, when a PC can trigger these messages. For example on startup or when the USB hardware detects EMI. So far the Brick firmware simply resets the hardware. With the new firmwares the USB state machine will be properly resetted (as requested by the PC), but everything else will keep on running. So the Bricks/Bricklets will not loose state and for example a stepper motor will keep running until the request is fully processed. From the PC perspective the Brick will disconnect and immediately connect again. A new initial enumeration will be send. If you have problems with unwanted resets (for example if a relay switches an inductive load) this will probably fix this issue! The PC will still reset the USB, but from the user perspective everything will keep running and working, no lost messages or similar.

Especially the last one (relay switching resulting in stack resets) is a problem that we have heard sometimes, but we where never able to reproduce that. A few weeks ago we finally were able to create a setup here where we could reliably reproduce this problem. After many hours of debugging it turned out that the problem is that the PC registeres an EMI event through the USB cable and as a result tells the Brick to reset itself (on Linux this happens if you get the dmesg message "disabled by hub (EMI?), re-enabling ..."). This reset will now not result in a real hardware reset anymore and everything will just keep running even if your USB hub does a reset.

To fix this we had to restructure a lot of code, we used this restructering to improve the hotplug/enumeration functionality a lot.

You can update your Bricks through Brick Viewer.

New Bricklets Part 3 - RGB LED Matrix Bricklet and Thermal Imaging Bricklet

Today we want to introduce the last two of our new Bricklets: The RGB LED Matrix Bricklet and the Thermal Imaging Bricklet.

The blog entries for the other Bricklets can be found here:

RGB LED Matrix Bricklet

The RGB LED Matrix Bricklet is equipped with 8x8=64 WS2812B RGB LEDs. Each RGB LED has three single LEDs (red, green and blue) that can each be controlled with a 8-bit value. The API allows for a control rate of up to 120Hz. If you turn all of the LEDs to their maximum intensity, the power supply needs 5V with at least 4A. You can find an appropriate power supply in our shop.

Thermal Imaging Bricklet

(Longer Video at Youtube:

The Thermal Imaging Bricklet is our new favorite Bricklet. It is equipped with a 80x60 pixel thermal imaging camera. The camera does have a radiometry function, i.e. you can read actual temperatures with the camera. To do this the Bricklet has a so called "Temperature Image Mode". In this mode each pixel corresponds to one temperature measurement. The temperatures have 16-bit resolution and a measurement range of -273°C-381°C or  -273°C-6279°C. The resolution is 0.01°C for the small range and 0.1°C for the bigger range. There temperature measurements can be used for monitoring (predictive maintenance etc). Alternatively the Bricklet has the a "High Contrast Image Mode". In this mode the camera calculates temperature distributions (cluster) und divides the measured temperatures into 256 cluster. For each pixel you get the cluster number. To make an image out of this data you can use a function that gives each cluster a color. A typical thermal imaging camera uses a mapping that has black/blue colors for cold temperatures and red/yellow/white colors for hot temperatures. You can see an example of this in the video above. The Brick Viewer offers different mappings.

This means that there are no temperature information anymore in the High Contrast Image. Because of this you can also define a spotmeter. The spotmeter provides a maximum, minimum and average temperature value of a user definable image region. All of this settings can be controlled through the API. You can find more information about tempertures, image modes, spotmeter etc in the API documentation.

Since the Bricklet can be used like any other Bricklet in the system of building blocks, you can use it as a USB thermal imaging camera. Together with the WIFI Extension or the Ethernet Extension you can also easily build your own network capable thermal imaging camera. We are excited to see what kind of thermal imaging projects our customers will come up with!

New Bricklets Part 2 - Motorized Linear Poti Bricklet and RGB LED Button Bricklet

Today we want to introduce two more of the new Bricklets: The Motorized Linear Poti Bricklet and the RGB LED Button Bricklet.

In the last blog entry we introduced the DMX Bricklet and the Humidity Bricklet 2.0. You can find it here.

Motorized Linear Poti Bricklet

Compared to the Linear Poti Bricklet, the Motorized Linear Poti Bricklet has a 100mm potentiometer that can not only be moved by hand but also with an integrated motor. Depending on the position of the silider the potentiometer gives values between 0 and 100. The API can be used to cause different behavior depending on the use case. It is possible to tell the potentiometer to retain a specific set-point (this can be manually overdriven). If it is not configured to hold a position, the Bricklet will only drive to the set-point once and after that the user can control the position again. The Bricklet is designed in a way that allows to use several of them next to each other with mimum space requirements. You can use the two inside threads of the potentiometer for mounting to the top of a panel or the mounting holes of the Bricklet to mount at the bottom.

RGB LED Button Bricklet

The RGB LED Button Bricklet is a big button with integrated RGB LED. The cap of the button can opened and an inlay can be inserted. The inlay can either be a printed foil or even a simple piece of printed white paper. Each color channel (red, green, blue) can be controlled with 8-bit resolution. This means that any color can be shown and the brightness is also controllable. As always you can use callbacks to react to changes of the button.

New Bricklets - LEDs, Motorized Poti, Thermal Imaging Camera

As you may have already noticed, we have some new Bricklets in the documentation since last Friday. They are:

The system of building blocks is still growing! Like the Bricklets that we released lately, all of the new Bricklets are co-processor Bricklets again. Today we want to present two of them in detail:

DMX Bricklet

DMX is a standard for digital communication networks that are commonly used to control stage lighting and effects.The DMX Bricklet can be used as a DMX master to control other DMX devices (slaves). Each slave can use one or more DMX channels. The DMX protocol can be used to control up to 512 channels a the same time. The Bricklet can also be used as a DMX slave. In this case, the Bricklet will receive all 512 channels at the same time. The user can decide to either monitor the whole bus or to only react on specific channels. If you always wanted to create your own stage light effects the new DMX Bricklet is for you. For the connection to a DMX bus the Bricklet has one three pole XLR make connector and one three pole XLR femaile connector. The Bricklet is very easy to control through the new Streaming-API.

Humditity Bricklet 2.0

The successor of the Humidiity Bricklet has a new sensor. The resolution of the utilized humidity sensor is increased by a factor of 10 (0.01% vs 0.1%) and also the accuracy is notably increaed. The Bricklet now also integrates a high precision temperature sensor that is used to temperature-compensate the humidity internally on the Bricklet. The user can of course also access the measured temperature. Another highlight is the integrated heater. It can be used to automatically dry the sensor in extrem wet conditions. The new 2.0 Bricklet replaces the old Humidity Bricklet 1.0.

RED Brick Image 1.10 Beta Test

Today we enter beta phase for RED Brick image 1.10. Normaly, we would release a new RED Brick image right away, but this time we want to test the new image in a public beta test, because it contains several big changes (e.g. new Kernel and Debian version). You can find the new image here: You'll also need the current Brick Viewer 2.3.11.

Changes include:

  • Update to Linux Kernel version 4.13
  • Update to Debian version 9
  • On-Demand CPU frequency control
  • Network management with Network Manager for faster response time in Brick Viewer
  • Support for more WIFI USB sticks (with better support for Access Point Mode)
  • Support for Bluetooth LE/4
  • Many software and programming language updates: Node.js 8, Nagios 4, Octave 4, openHAB 2, etc
  • Update all Brick/Bricklet Bindings for all languages to lastest version

Known problems:

  • Stack communication in Brick Daemon is currently not DMA-accelerated and uses more CPU power. This will be fixed for the final version.
  • The display resolution cannot be changed at runtime. We're looking into it at the moment. It's unclear if this can be fixed.
  • No support for 3D/OpenGL hardware acceleration. The necessary Mali drivers are currently not yet ported to the newest kernel versions. We will release a new image as soon as we can add the drivers again. 2D hardware acceleration (for normal desktop environment usage etc) is working fine!

There is a forum thread for your feedback.