Author Archives: volker

ODroid GO Tricorder Project reaches custom PCB Phase

21 Oct 18
volker
2 comments

 

 

ODroid created a fantastic Product with the ODroid GO.

A nice compact device with an LCD, Buttons, Speaker, a ESP32 from Espressif AND an expansion board.

Although the Hardkernel Wiki already gives examples how to use the device for your own hardware projects, it seems that almost all people regard it as a “Gameboy Clone”.

For the Odroid GO Tricorder project I just waited for a device like the GO. The Idea was: Bundle a set of sensors and provide it with some nice interface.

The GO provides 2 Pins at the expansion board that can be used for I2C interfacing. All the sensors for the Tricorder had to have that interface.

Ingredients

Sensors

The following Sensors are built in:

BME280

A sensor that can measure ambient temperature, humidity and pressure.

VEML6040

It can measure light in red, green and blue, white , in lux and as color temperature

VEML 6075

Measure UV (A/B) radiation and provide a UV Index

BNO055

Measure Roll, Pitch, Yaw, Accelleraton in X/Y/Z, Gyroscopic measurements also possible (rotational forces)

CCS811

It meausures Gas concentrations (ppm, ppb) of CO2 (Carbon Dioxide) and VOC (Volatile Organic Compounds)

VL53LOX

A so called “time of flight” sensor that measures distances up to 120cm via laser

MLX90614

An infrared Sensor cabable of measuring temperatures in the range of -70 to 380 degree Celsius

Mics-6814

Another Gas Sensor able to detect carbon monoxide, nitrogen dioxide, ethanol, hydrogen, ammonia, methane, propane, iso-butane

I2C Switch

I decided to use the VEML 6040 and the VEML 6075 Sensors because their outputs seemed quite reasonable (realistic).

The drawback was that both sensors require I2C address 0x10. Because of this I needed a I2C switch TCA9543A (2 port).

I split up the sensors into two groups (according on how I wanted to place the sensors on a designed PCB  for easy routing)

Software

Platform IO (VS CODE)

Programming the ESP32 can be done via the ESP-IDF, an C/C++ SDK from Espressif. I personally regarded it as “too low level”, so I decided to go the Arduino way since I had more experience with this.

Years ago I stared with the Arduino IDE, but then Platform IO crossed my way. You can also code Arduino style with it, but it just looks better. It can be used as plugin for the MS VS Code Editor which I also regard as a very nice one.

For all of the sensors there are libraries that can be used under Arduino. Some of them I had to adapt since most libraries assume that the sensor they are made for is the only device on the I2C bus, and some are not directly able to deal with an ESP32.

DesignsparkPCB

It took some while to gather all the sensors from China (EBAY is my best friend now), and for quite some time a prototype on Breadboard was used to develop the software, but from the beginning it was clear that there has to be a PCB for the Tricorder.

Year ago I was searching for a good tool to design PCBs. My choice fell on DesignsparkPCB. You can draw Schematics and derive PCBs from it. A very important thing is to easily create your own Components, since it is very hard to get component libraries for all you need.

paint.net

The screens for the tricoder had to be drawn as background image. After having tried a few freely available paint programs I stuck with paint.net

Photo

The photos were taking with my Samsung S8

Stages of the hardware development

Breadboard

The breadboard was the first stage to put things together easily. In the picture all the sensors are removed already, only the wiring is left.

First soldering

   

In this prototype not all sensors were integrated. I just made it to get a feeling of the handling, holding the tricorder in hand.

 The PCB (Rev. 1)

        

As described above, the PCB was designed with Designspark. Since I am not a fan of having a lot of chemistry in my house, I had the PCB made by a company.

To make it cheap, I did not do it with solder resist.

Assembly

        

The assembly and a first test revealed that I did a mistake in the PCB design. I actually wanted to have the BME280 on the other side.This cost me one BME280 because it burned being assembled on the wrong side and I had to place the next one on top of the BNO055. Well, not really a big deal.

Plugin Time

The Software

As mentioned above, my choice to develop the software was PlatformIO as a plugin for the VS Code editor. The code is written in “Arduino” using C++ for some of my own libs to handle the screens.

As a tricorder it should look like Star Trek, so I got me inspired by some screens I found via google, just search for “Star Trek LCARS”

LCARS = Library Computer Access / Retrieval System ( for the non Trekkies)

I devided the Sensors into several screens that can be switched via the A/B buttons of the GO.

Init

      

The sensors (at least some) need to be initialized before we go. (Uhhh, should have cleaned the screen before making the pictures).

Ambient

The first screen shows some ambient values (Temperature, Humidity, Barometric Pressure, Light intensity in Lux, UV Index) those Values come from BME280, VEML640, VEML6075

Light

For Light measurements LUX is not the only interesting value. The composition of the light might be interesting (percentage of red, green, blue as bargraph), the color temperature can be derived from that distribution of the base colors.

Gases

The various gases are presented here. all of them (except VOC I think) are given in PPM (parts per million).

Since the names of the gases did not fit on the screen I took their chemical formulas.

As described by the datasheet the MICS gas sensor needs a heat up phase before its values become accurate. The Values for C3H8 and C4H14 (Propane and Butan) still are too high. There are no such gases in my home I hope.

The page combines 8 Gases from the Mics and 2 Gases from CCS811 (CO2 and VOC)

Distance

The distance is given in centimeter. The VL53LOX is capable to go for 120cm MAX. I must say, the precision is quite accurate accoring to my ruler.

Having the distance given in Inch requires some config or button to switch it. Currently the project is only for mebeing European => The Metric System RULES!

Temperature

The Temperature is not the one from the BME 280 (Environmental) its the temperature directly ahead of the tricorder. Its more or less like one of those Pistol shaped thermometers.

Units are Celsius.

Orientation

The display for the orientation is the hardest to design in 320×240 Pixels.

How to display Roll/Pitch/Yaw?

I am not really satisfied with it, but for a first shot it seems ok.

 

Playing around with Odroid-GO

10 Sep 18
volker
No Comments

Odroid GO is a fantastic device for those dealing with espressif chips (8266/ESP32).

While the big focus is on gaming, the device also got a 10 pin expansion header to support I2C and SPI.

Having a build in graphical LCD and several buttons, this makes the device an ideal playground for own projects including own hardware.

 

Checking out on Docker Swarm

28 Jul 17
volker
No Comments

I am currently checking out on Docker Swarm. All not really hard. Tricky part is to get Hazelcast to work there. Another story is to get some logfiles generated within a container be visible all over a network

Checking out Hammock

31 May 17
volker
No Comments

I am currently checking out Hammock as a base for Microservices.

see 
ws.ament.hammock

Stumbled about platformio.org

21 May 17
volker
No Comments

An alternative to the arduino development environment. Support for different platforms like ESP8266, ESP32, AVR…..

Good support for including libraries.

Start to love it. Based on the Atom Editor (Well, not my primary choice of editor because its too slow, but for that environment fine)

check it out here…

http://platformio.org/

Alternatives to Owncloud

14 May 17
volker
No Comments

Currently checking out on alternatives to owncloud… tried cozy… hmmm nice but not too much more functionality to owncloud

Server Update

12 May 17
volker
No Comments

Updated this server to 24GB (actually Hetzner did, I just payed).

Additionally updatged wordpress, owncloud, gitlab

Clock with Timer

03 Jan 17
volker
No Comments

Another little project is this one:

clock1

An LED Clock driven by an ESP8266, using those 8×8 LED Matrix components:

https://www.amazon.de/gp/product/B01BUTAFW2/ref=oh_aui_detailpage_o00_s00?ie=UTF8&psc=1

In principle very easy. The ESP is programmed with Arduino, using a NTP Library and a Library for the Matrix LEDs. The only tricky part was to reprogram the Matrix Library because each of the 8×8 matrix elemens was turned by 90 degrees, so I had to programmatically turn them back. Otherwise I had to resolder all of the 8×8 components (too lazy for that).

Besides having a nice clock now I also implemented it to be controllable via UDP commands. So far 2 functions are implemented:

Clock and Timer. I also implemented a little App for those functions

 

clock_app

We have settings to specify the IP and port of the clock. 4 Buttons determine the functionality of the clock:

Set Timer => Set the timer to a given value (hour, minutes, seconds). After it is set the clock shows the timer counting down.

Cancel Timer => Already indicates that this resets the timer and displays the clock.

Show Time => While the timer is still counting down, the current time can be displayed.

Show Timer => If you decided to display the time instead of the timer, this brings you back to display the current timer value.

 

ESP32 arrived

03 Jan 17
volker
No Comments

I am an absolut fan of the ESP8266 in its various forms. It is really cool to build things with it. A device with Wifi, several IO Pins and programmable via C or Arduino is a perfect match for small devices.

The biggest drawback of such a device is: In order for the Wifi to work, you need to connect it to a Wifi Network. In most cases this is the one of your home. So you provide the code with your WIFI SID and passphrase (hardcoded).

If you want to use the device in another WiFi network it needs to be reprogrammed. This is not really portable. Bluetooth for controlling devices is suited way better. You pair the device, then you communicate with it. Bingo.

Espressif must have noticed or they just took the next logical evolutionary step of the their 8266 and created the ESP32. It is more powerful, has more IO lines and bluetooth.

It was long announced. Now you can buy it. So did I. thanx to Watterott I ordered and got 5 of them. Now I am looking for some projects to fit.

esp32

RS232 / Bluetooth Adapter

30 Dec 16
volker
No Comments

This is the first prototype of a RS232 / Bluetooth adapter. Its design is quite simple:

Use a standard MAX232 circuit and connect the ttl out/inputs with an HC05/06 bluetooth transceiver.

Although some MAX232 seem to work with 3,3V I had bad experiences with it so I drive the MAX with 5V and the HC05/06 with 3,3V.

2 bridge diodes reduce the 5V to about 3,3V to power the HC05/06. A level shifter transforms the TTL signals between 5V and 3,3V. MAX would understand 3,3V, but the HC05/06 most likely will sooner or later die from the 5V.

In this picture of the prototype the level shifter is missing.

Since the RS232 does not have a power pin, the 5V have to come from somewhere else. Usually there is a USB connector around => take it from there (see the grey little cable go away from the board, thats the link to the USB power).

 

bt_rs232

Then I bought this in the internet.

bt_rs232_bought

I had a lot of touble with it. No manual available so I had to search the whole internet for info about it. First I attached a Mini USB to power it, easy. A red LED indicated operation and a blinking blue LED indicated the will to pair.

Pairing was also not really hard to do. Device could easily be found and be paired with my mobile and a tablet.

Then the trouble started. The BT connection was lost latest after 2 minutes. All the time. It drove me crazy. As experiment I unpluged the USB power and used the BAT connector to provide it with 5V. Wow. No connection losses anymore.

Next I had to find out how to increase the default of 9600 Baud. In order to do so it is as it is with all HC06: Connect a TTL Terminal to the HC06. For that there are four PCB Pads you have to provide a 4pin hreader row ( you can see it in the picture between the HC and the switch).

After the Baud change was done the real life test with a RS232 device had to be made. That is where I currently am. In principle it works, but even with 115200 Baud it is slow and has lags. I had this effect with other HC05 “compatible” transceivers as well. Well, I will hang on to that.

Would I buy it again? No ! I am thinking about getting my prototype to a PCB and make 4-5 of it.

What do you need RS232 interfaces anyway? Good question: MY purpose for them is to control Measurement devices (like from “Rigol”).