Author Archives: volker

Mini-Meditation-Lamp

13 Feb 21
volker
No Comments

A friend of mine builds Bascetta stars as a christmas decoration. This link gives you an idea what I am talking about: http://www.mathematische-basteleien.de/bascetta_stern.htm

Us together came the idea that a light source within the stars would look even better than the stars themselfes.

Since I like to play around with electronics, I developed a little circuit consisting of a little programmable controller and 3 LEDs. The PCB for it is quite small and fits easily into those stars. Almost all people who saw them wanted to have them and we indeed sold some of them.

I designed a little PCB (thanksto DesignSpark, great tool, guys)

Finally it looks like this:

 

I thought to myself that those stars are basically meant as Christmas decoration and not for the rest of the year. So I came up with the idea to create a mobile with different illuminated bodies (not only a Bascetta star). I googled and found out that some very interesting bodies are the so called Platonic solids=> https://en.wikipedia.org/wiki/Platonic_solid

I found a german company (Herrmann Lehrmittel) => http://www.herrmann-lehrmittel.de selling those solids as demonstration/illustration for students.

In order to be able to place my little PCB into those solids, I needed to get them in a way that I could assemble them myself.  Gluing them together surely is a very tricky thing so the best would be to get them as half shells. I wrote an e-mail to the company and the owner answered me directly. In a telephone call he told me that he also had the idea to bring some light into his solids. He even had talks with his supplier of the plastic granulate to try out some opaque. Mr. Herrmann then was extremely friendly and sent me some samples for free to check out how it could work with my LEDs.

Before I really assemble the half shells finally, I will do some tests like putting the shells together by some adhesive tape. I made a video to give you an impression how the first prototype looks like. It is not a beauty and just a proof of concept.

Click here to see the video

 

ESP8266 with Matrix Display

12 Feb 21
volker
No Comments

Some day I stumbled about 8×8 Matrix LEDs with an SPI interface. While I started with a single 8×8 Matrix for little test purposes, I found out that there are also quite cheap displays with 4 arranged displays offering 32×8 pixel. I combined 2 of them to implement a little clock, driven by the internet (via time server ntp).

The driver was a ESP8266. I created an extra little controller board to attach the esp directly to the LED. This worked out well.

Some day I developed the idea to couple the esp8266 very closely to the matrix display to create little nifty devices.

Phase one: Find out how are the 8×8 matrix modules addressed by the gadgets you can buy?

It turns out: MAX7219 ist the answer. One application for this chip is to drive 7 segment displays with 8 digits. By nature of the 8×8 LED Matrix modules you can buy, you can also use the chip to address a single 8×8 Matrix module. The MAX7219 can be chained. that way several 8×8 modules can be packed together.

The internet is full of schematics how to couple the 7219 with the LED matrix.

As said before the interface to the 7219 from the controler side is SPI and also quite simple.

The overall schematics for the little device ended up to be:

The schematics consist of a voltage regulator to transform 5V (most likely provided by an USB interface) to the 3.3V the ESP8266 likes. The regulator is a AMS1117 (3.3V).

The ESP got a programming interface J1 (details in the previous post). For the connection to the matrix SPI is used (CS, MOSI, CLK) MISO we do not need since the 7219 does not hand back anything to the ESP8266.

A little detail: As Matrix Modules “Common Cathode” ones are required.Do not ask me why they are called common Cathode since the anodes are also connected, so also common.

R2 seems to determine the current that drives the LEDs. The internet told me that 10k would be a good value. I tried and it works with red and blue matrixes. The brightness of the LEDs is handles via PWM by the 7219 anyway.

R3 and R4 and pullups for the programming adapter and I also chose 10k. R1 I found in a few schematics on the internet it is a pulldown for the chip select. In fact it did not seem to be necessary so on the pcb I usually do not solder any resistor to it.

To be able to maybe attach some extra “things” to the module I added a few additional ports (J4 could be used as I2C ) when 3.3V and GND istaked from J5. J6,J7J8 are just “extensions to the esp pins, since for a a through hole connector I just did not have enough space on the PCB.

J3 is the incoming Power supply. It does not necessarily have to be 5V since the LED Matrix also works with less voltage (e.g. 3.3V), but the primary use case is to have it attached to USB.

An option will be to drive the thing via LiPo. The AMS1117 is not the best choice here since it it not a good LDO regulator, but it will work.

J2 is an output connector that could be used to attach cascaded Matrix modules.

Although the schematic looks extremely simple, the tricky part was the size of the board. It must not be bigger than the dimensions of the LED Matrix itself.

So the layout required to be my fist 4 layer layout.

I started with burried viasuntil I found out that JLCPCB does not support that. Vias are always though. This complicated the design a bit.

The PCB came delivered and looks like this:

You can seeone pin of the ESP8266 is a bit longer. It is the analog pin. I should be able to solder directly to it if possible. As described before IO16 and IO12 are also not through holes for reasons of space. I should also be able to solder directly to then only on this side without a though hole.

When soldering the components to the board I alsway start to solder the ESP8266 part. Somehow getting MAX7219 Chips is harder than ESP8266. So if I screw something up in the ESP8266 area, I did not waste a MAX7219.

Voltage Reg and the pullups for Reset, Flash and the MAX7219 Current control are soldered.

Next time I will use the KiCad “Hand Solder Pads”for the 1206 pads. they are definitely better to solder.

Her majesty, the ESP8266 residing on the other side of the PCB. On top of it, the 2.54 Header for the programming cable.

After having done a test programming, the MAX7219 as soldered.

The Matrix LEDs will be plugged in to the one row sockets above and below the MAX7219.

 

The final result looks like this:

The one row socket connectors are optional. A replacement of the LED Matrix will not be possible so easily if necessary of course.

Very compact design.

 

Programmer / Serial Interface for ESP8266 and ESP32

12 Feb 21
volker
No Comments

On the Market you can find an incredible amount of boards with ESP chips on them made for Makers.

Using those boards in a Dev environment is easy because you can simply plug them into your breadboard and use the on board USB to directly program them via Arduino or PlatformIO.

When you leave the Breadboard Area and start projects where the ESPs are built into some case and you intend to reprogram the ESPs while in the case, it is very hards to design the case in a way so you can reach the USB of the ESP Board.

So I intended to split the functionality of programming and the actual ESP processor into 2 boads. Programming shall be easy to build into a case and the ESP also shall be able to end up wherever suitable in the case.

I had a look at the various USB to TTL solutions on the marked and did not find a single one fitting my needs because they ALL lack the necessary UART pins.

How to program a ESP?

Basically it is very simple: Pull the GPIO0 to LOW and reset the chip via a short Low on the Reset (EN) pin. After that, the chip is able to be programmed via TX/RX.

How to control the GPIO0 and Reset Pins. A look into the documentation of PlatformIO, they use the UART signals RTS/DTR for that. RTS is for Reset and DTR for “Flash”.

And exactly those signals are missing in the most UART adapters.

So I  designed my ESP boards in a way to have Reset and GPIO0 pulled up to +3.3Volts, and have RTS and DTR pulling them to low in the right sequence.

This is basically what the most ESP Prototype boards do. They usually have an additional logic (2 transistors) built in there because most of them also have pushbuttons to reset or flash the ESP. In my case I do not need that, so the simple pullup solution will do.

The next question to solve was: Which USB to UART converterchip to use? The defacto standard is the FTDI232 Chip. I tried it and I got it working, but it has a lot of pins and the TSSOP package has quite minimal distances between the pins (not easy to solder by hand).

A great alternative ar the CH3X0 chips. I used CH330N for projects not requiring DTR/RTS, just RX/TX. For DTRand RTS I switched to CH340C.

I directly went for 3.3V supply to the UART since ESPs like 3.3V. The 3.3V is generated by an AMS1117 for 3.3V.

Usign KiCAD leads to the folloging PCB

Get it manufactured by JLCPCB and you end up with this PCB in your Hands.

R1 by the way is an optional Resistor to couple Ground against the shielding of the USB. The internet was not clear how to handle shielding the USB. Some connect ot to ground, others don’t

 

 

 

RS232 <=> Bluetooth Converter

25 Oct 20
volker
No Comments

 

From time to time I deal with devices only offering a RS232 to interact with them in a “programmatic” way. Some of my multimeters only offer RS232 since they are old.

My computer does not offer a RS232 interface anymore, just USB. One solution I came along was to connect them via RS232 to Bluetooth. I checked out a few modules exiting on the market.

I was not happy with them. Connection problems, crashes, etc. made me think about my own solution.

I came up with this little board I designed:

It is basically very simple.

The RS232 connection is done via the DSUB 9 connector. Only RX,TX,GND is used since most of my devices do not offer CTS, DTR etc.

The RS232 signals are handled by the standard Chip MAX232 (bottom picture) and the typical  Caps to generate the required voltage levels for RS232.

The signals from the MAX232 are fed into a HC-05 module (top picture, lower part). A HC-06 would also have been possible, but I had several HC-05 at hand so I used them.

A few things I had to consider.

Where to get the power supply from. RS232 does not offer any type of supply voltage. Some people use DTR, CTS etc. signals to derive a power supply from, but I regarded this as too risky. So I choose to have a USB micro plug for the power supply. USB Power is typically always around where I use the module. Some internet sites say the HC05 is capable to run at 5V, but I tried to be sure and added an AMS1117 (3.3V) Voltage regulator to power the HC05. It is optional and by just shortcutting 2 pins, the HC05 would run on 5V.

How to configure the HC-05 for baud rate etc.? I decided to just have a jumper to connect the key pin of the HC05 to VCC. Several internet sites say that the “key” pin needs to be GND while powering up, but my modukles require VCC in order to go to AT Mode. Being in AT Mode allows you to send AT commands to control communication settings (Baud, Bits, etc.), the name of the device (BT Name) and the pin code for pairing. Just plug the jumper while powering up, then remove it again.

 

 

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