torsdag den 1. juli 2021

Mains power alarm

Our refrigerator must run at +5C at all times. But one day, the security relay of the house flipped and cut the power off. The power outage lasted 6 hours, and the temperature within the refrigerator rose to +15C. To avoid this in the future, I decided to build a mains power alarm, so I can take action if the power relay flips again.

Figure 1. Mains Power Alarm.

The PSU is connected to the mains and generates 12 V which energizes the relay coil. The relay is in position NO. If 12 V is lost, the relay changes to NC and activates the buzzer. SW1 can silence the buzzer.

The PSU in figure 1 is an AC adapter which is plugged into a 230 V AC wall outlet. The secondary of the AC adapter delivers 12 V DC. The green 12V lamp is on when 12 V DC (and mains) is present. Relay1 is active and breaks the buzzer circuit. The relay is a 12 V type. Any voltage transcients from the relay coil are bridged by D1 and will not damage the PSU.
 
The 12 V buzzer sounds when the coil of Relay1 is powered off during a mains power failure.   

Figure 2. PSU and metal box.

 The metal box in figure 2 measures 125 mm x 80 mm x 50 mm. The blue relay is taped to the wall.  


Figure 3. Front view.

Figure 3 remarks. Labels are in the Danish language. 

ALARM TIL means "Alarm is on".
LYSNET OK means "Mains Ok".

73 from OZ1BXM Lars
Homepage: oz1bxm.dk

torsdag den 17. juni 2021

Reading I2C addresses

Many electronic modules are controlled by the I2C-protocol. I2C builds upon the concept of masters and slaves connected via a 2-wire bus. There are two pull up resistors. Each of them should be higher than 1 kohm. Vdd is 3.3 V DC or 5 V DC. The wiring is shown in figure 1.
Figure 1. Wiring of I2C.

I2C bus speeds range from 100 kbit/s in Standard mode, 400 kbit/s in Fast mode, 1 Mbit/s Fast mode plus, and 3.4 Mbit/s in High Speed mode. Each master and each slave has its own, unique 7-bit address.

The I2C scanner is shown below in figure 2. The scanner software is running on my Arduino UNO R3. There are 4 wires connected to the slave unit.

+5V is connected to Vin on the slave
GND is connected to GND on the slave
A4 is connected to SDA on the slave
A5 is connected to SCL on the slave

The UNO is powered via an USB cable.

Figure 2. I2C scanner with Arduino UNO.

Figure 3. Output from the I2C-scanner

Output from the scanner is displayed in the Arduino IDE. Select Tools > Serial Monitor. An example output is shown in figure 3. 

The Arduino I2C address scanner was created by Arbi Abdul Jabbaar and it is described here:

73 from OZ1BXM Lars
Homepage: oz1bxm.dk

lørdag den 1. maj 2021

DC-receiver 0.1-100 MHz

Fig. 1. DC-receiver seen from the front.

Building your own equipment is not difficult if you buy ready-made modules and connect them together. I wanted to to build a DC (Direct Conversion) receiver with a broad frequency range. 

Fig. 2. Direct Conversion concept.

The concept of Direct Conversion is shown in figure 2. Four modules make up a SSB/CW receiver, and all modules can be obtained ready-made!

HF-filters are usually sold as kits or ready-made. I decided to make my own filter using a piece of Veroboard. The filter's circuit diagram and the Veroboard are shown below. 
Fig. 3. The 7 MHz bandpass filter.


Fig. 4. The filter is build with leaded components on a piece of Veroboard.

The mixer is a ready-made board centered around AD831. AD831 is an active, double-balanced mixer from Analog Devices and it runs on 10 V DC at 100 mA. The required LO level is just -10 dBm and max. input on the RF-port is +10 dBm.

Fig. 5. Active mixer 0.1 - 500 MHz.

The AF-amplifier is the well-known LM386 having 46 dB amplification. I tried to find a modern substitute, but that was difficult. Many audio ICs amplify something like 26 dB, and that is too low for DC-receivers which require 40 dB amplification or more.

Fig. 6. AF-amplifier with LM386.

The VFO is the ARDU-5351 kit sold by qrphamradiokits.com. The kit includes an OLED display, a rotary encoder, a frequency generator module (Si5351A), and the Arduino Nano. I soldered all parts onto the motherboard except the Nano, which is fitted using sockets. There was no soldering of SMD-components.

Fig. 7. The VFO kit.

As the VFO output is 7 dBm, I've added a 20 dB attenuator to lower the output and comply with the LO port level of the active mixer.

Components for power distribution and the S-meter rectifier are fitted on a piece of Veroboard as shown in figure 8 below.

Fig. 8. The 10 V power supply and the S-meter rectifier.


Fig. 9. Circuit diagram.

All modules are fitted into a metal enclosure which I acquired from Conrad Electronics (item 522953). The enclosure's front is seen in figure 1 above, and the rear is seen in figure 10 below. Figure 11 shows the open enclosure.

Fig. 10. Rear side of the DC-receiver.

Fig. 11. The DC-receiver with lid removed.

Vy 73 from OZ1BXM Lars

Homepage: http://oz1bxm.dk/