The Wetterfrosch 2.0 or environmental data logger

Loading

A few years ago I presented a project in which a Raspberry Pi was working as a data logger. A few sensors were connected to this Raspberry, which recorded environmental data such as air temperature, relative humidity, air pressure and the current GPS position. The sensors mostly consisted of ready-made breakout boards that were connected to the RaspberryPi via the various buses (I²C, Serial, SPI …). Python scripts ran on the PI itself, which read out the sensors, summarized the data and stored it on a USB flash memory. I then built this hodgepodge of components into a plastic box with a size of 150x80x50mm.

But it’s also about a lot smaller. As part of a small project, the task was to downsize this sensor / data logger. My approach to realizing this was very simple: “Everything new”. So I changed the concept like this:

  • the RaspberryPi is replaced by a microcontroller
  • a circuit board is created on which all components are housed
  • the recorded data is saved on a microSD card
  • the board is reduced to the most essential components. The sensor electronics and the SD card reader are placed directly on the board
  • a GPS receiver (in the form of a breakout board) should be able to be plugged in as an option
  • the controller is programmed via an ISP interface
  • the power supply is 5V DC

From this I created the following block diagram:

Block diagram

As is so often the case, the central element is the Atmega328 microcontroller. As an external circuit, it only needs a quartz for clock stabilization. (More precisely, it also offers the option of using internal oscillators …) The microcontroller communicates with the sensors HYT939 and BME280 via the I²C bus. The level from 5V on the controller side to 3.3V on the sensor side is adjusted via the sophisticated bidirectional level shifter circuit using a BSS138 Mosfet with an integrated body diode. This circuit is used for both the SCL (Serial Clock) and the SDA (Serial Data) line.

The data is saved on a microSD card. A card slot is installed for this, which communicates with the controller via SPI (Serial Peripheral Interface). An adjustment of the signal amplitudes is also necessary here. This time, however, the TXB0108 chip from Texas Instruments takes care of that. This is an 8-bit bidirectional level shifter.

A button will start and stop data recording and a LED will display various status messages through flashing sequences.

The optional plug-in GPS module works with a 5V power supply and the levels of the serial data communication (RS232) are also 5V compatible.

Last but not least, the power supply must of course also be planned. Only an external, stabilized 5VDC source should be connected here to supply the logger. The 3.3VDC required for the sensors and SD card are generated on the board by means of an LDO (Low Drop Out) controller.

Once all components and their interaction have been defined, the circuit diagram is drawn from them. For my handicraft projects I mainly use the schematic and layout editor “eagle”. The circuit shown below results from the block diagram.

From the circuit diagram I created a layout with two layers, the floor plan of which has the dimensions 55x25mm. Except for the connectors, only SMD components are on the board.

In the layout tool there is the function to view an optical preview of the finished board. In this way you can check in advance whether the board corresponds to the requirements and, if necessary, optimize the position of the components. Once this is done, a package with production files (Gerber files) is generated from the design and this is then sent to the circuit board manufacturer you trust. Since it is also located very, very far away, production also takes a few days. But in the end the circuit boards arrive and are also impressive. 🙂

The two pictures above show the board from the TOP and the BOTTOM side. The next step is to order the components according to the plan and then assemble them.

I do the assembly by hand with a soldering iron suitable for the SMD components with a correspondingly small tip. For the very small parts, such as the BME280 sensor, a microscope or microscope camera is also used.

The two pictures above show what the board looks like after it has been assembled. The following photo shows the size difference of the finished logger with the attached GPS module compared to the old “weather frog”After completing the hardware, it is now time to start with the software. I tinkered it in a practical way with the Arduino IDE tool and flashed it to the controller via AVRISP mk2 via ISP. In order to get the AVRISP to work on a Windows 10 computer, a suitable driver must be installed. (libusb-win32-1.2.6.0 helps here)

program code created with the ArduinoIDE
controller flashed with AVRISPmkII

Data recording is started on the SD card after applying the supply voltage and pressing the button. The measured values ​​are written every second. If, as in this example, the GPS sensor is plugged in, the GPS data is also recorded. The software also records if the GPS sensor does not have a “fix” yet. (Since there was no GPS fix in the example log below, no valid GPS data is included.)

Example of the data log:

Luftdruck962.41
Luftfeuchte37.05
Temperatur26.96
-----------------------------
$PGACK,103*40
$PGACK,105*46
$PMTK011,MTKGPS*08
$PMTK010,001*$GPGGA,235947.799,,,,,0,00,,,M,,M,,*71
$GPGLL,,,,,235947.799,V,N*73
$GPGSA,A,1,,,,,,,,,,,,,,,*1E
$GPGSV,1,1,00*79
$GPRMC,235947.799,V,,,,,0.00,0.00,050180,,,N*48
$GPVTG,0.00,T,,M,0.00,N,0.00,K,N*32
$GPGGA,235948.799,,,,,0,00,,,M,,M

-----------------------------
Luftdruck962.39
Luftfeuchte36.72
Temperatur26.95
-----------------------------
Luftdruck962.43
Luftfeuchte36.66
Temperatur26.97
-----------------------------

Tabletop game console Galaxy II

Loading

“ASTRO WARS” or “GALAXY II” is the name of the table top game console that I am introducing here. It is the home version of the arcade game “Galaxian”, which was implemented as a small tabletop device for everyone at home. The manufacturer was Epoch, which sold the device in 1981. There was also a clone made by Grandstand under license from Epoch. The device was named “ASTRO WARS”

As was the case with many game consoles back then, the technical structure is a “stand-alone” console. This means that the device could be operated without any additional accessories. You only need four 1.5V cells or a 6V plug-in power supply. The display, i.e. the display, was implemented using VFD (vacuum fluorescence display), as LCDs were still expensive at that time and were only used as clock displays due to the low power consumption.

The screen is designed in such a way that a curved, transparent film, printed with space motifs, is placed over the VFD tube. A Fresnel Fresnel lens shows the display content optically enlarged. The display also appears in color or shows the game symbols in color. This was solved by sticking colored foil over individual areas of the VFD tube. This gives the entire design of the ad a certain 3D effect.

From the original advertising text on the packaging:

“Ultra-modern arcade excitement is now yours, as you defend your earth ships against a fierce invasion. You must dodge the enemy missiles and fire back at the squadrons of attaching fightes, warships and enemy command ships. If you survive, you can attempt the exiting DOCKING MANOUEVRE and earn extra points.”

Die hochmoderne Arcade-Spannung liegt jetzt bei Ihnen, wenn Sie Ihre Erdschiffe gegen eine heftige Invasion verteidigen. Sie müssen den feindlichen Raketen ausweichen und auf die Staffeln zurückschießen, in denen Kämpfe, Kriegsschiffe und feindliche Kommandoschiffe angebracht sind. Wenn Sie überleben, können Sie mit dem aufregenden Docking Manöver zusätzliche Punkte verdienen.

To the technical structure:
As already mentioned, the structure is based on a fluorescent display, which in turn is controlled by an NEC D553C microcontroller / processor. This 4Bit 42PIN IC in the DIP housing is one of the chips used very often in game consoles at that time, as it not only contains the game algorithm, but is also able to control the display directly. There is also sound that is output via a piezo. The chip only needs a power supply. The clock is generated with an external resonator … a more detailed description can be found in older articles.

  • Tabletop game console
  • Manufacturer EPOCH, Grandstand licensed
  • Distributed by Schuco Tronic
  • Space Invaders / Galaxian clon
  • Screen: VFD Display
  • Three game modes
  • Year of manufacture 1981
  • Power supply: 6V with 4×1.5V Cells or plug-in power supply
  • Size ca. 22 x 17 x 16cm
  • Sound output via piezo
  • Age recommendation according to sales: From 8 years

Photo gallery:

Update 2.2.2024: At the request of a blog reader, I measured the dimensions and shape of the “front screen” of the console.

Frontseite

 

Configurable plug-in power supplies

Loading

This short post is only intended as an aid to be able to look up quickly if necessary. Over time, each of us will probably accumulate countless power packs and adapters. Some are fixed voltage power supplies, others can be adjusted in the range of the output voltages. The output voltages of these power supplies can be adjusted with slide or rotary switches or with small plugs (jumpers) in which resistors are built-in.

The voltage that is set is always printed on the jumpers. There is a small catch, however. If you have several different power supplies (different in terms of performance and output voltage range), you quickly have a hodgepodge of different resistor jumpers. The problem now is that the jumpers all look the same and are also printed with the same voltage values. If you don’t sort them properly according to the respective power supply units, the mishap happens quickly. An example: A type SPS24-24W power supply unit has a jumper labeled 9V. The jumper has a resistance of approx. 9kOhm. Another power supply of the type SPS12-23W also has a jumper marked 9V – but a resistance of only 1.5kOhm. And so it quickly happened that you (or I) plugged in the jumper from the wrong power supply. In my example I put the 9V jumper with 1.5kOhm into the SPS24-24W power supply. Before I was with the test leads at the cable socket, there was a thud, a well-known cloud of smoke and the associated smell of a burst capacitor (electrolytic capacitor).

What happened? The value of the wrong jumper resistance was smaller than the smallest value of the correct jumper (24V = 2.42kOhm). So the output voltage was significantly higher than 24V and thus also significantly higher than the dielectric strength of the electrolytic capacitor at the output (which had a dielectric strength of 25V at 220µF).

To avoid this in the future, I measured the resistance values ​​to match the power supply models of the SPS series.


Model SPS12-12W-A (unfortunately I don’t have a copy of this model – if someone has one at hand, I would be happy to include the resistance values ​​in the list here)

Voltages:
3V ………….  0.00k
4.5V………..  0.00k
5V…………… 0.00k
6V…………..  0.00k
7.5V……….  0.00k
9V …………  0.00k
12V………..  0.00k

Model SPS12-24W-B
Voltages:
3V …………. 373.0k
4.5V………..  6.01k
5V…………… 4.51k
6V…………..  3.08k
7.5V……….  2.04k
9V …………  1.54k
12V………..  1.02k

Model SPS24-24W-A
Voltages:
9V ………….  9.09k
12V…………  5.75k
13.5V……..  4.97k
15V…………  4.29k
18V…………  3.39k
20V ………..  2.98k
24V………..   2.42k

Model SPS24-48W-B
Voltages:
9V ………….  17.38k
12V…………  8.27k
13.5V……..  6.78k
15V…………  5.48k
18V…………  4.20k
20V ………..  3.60k
24V………..   2.78k

edit 10.52021: Added pictures of the board of the power supply SPS24-24W-A: