Homemade barometer on a microcontroller. The metro will mark the boundaries: when will the capital's transport introduce payment by zones?

Connecting a DC motor to Arduino (brush motor) is required when assembling a car or boat using an Arduino microcontroller. Let's consider various options for connecting DC motors: directly to the board, through a bipolar transistor, and also using the L298N module. The review contains connection diagrams and program codes for all of the options listed.

Motor control on Arduino

The commutator motor can be designed for different supply voltages. If the motor runs on 3-5 Volts, then you can connect the motor directly to the Arduino board. Motors for cars with Bluetooth control, which come complete with gearboxes and wheels, are already designed for 6 Volts or more, so they should be controlled through a field-effect (bipolar) transistor or through the L298N driver.


The diagram shows the design of a DC motor and its operating principle. As you can see, in order for the motor rotor to start spinning, power must be connected to it. When the power polarity is changed, the rotor will begin to spin in the opposite direction. The L298N motor driver allows you to invert the direction of rotation of the fa 130 motor, so it is more convenient to use it in your projects.

How to connect a motor to Arduino

For this lesson we will need the following details:

  • Arduino Uno / Arduino Nano / Arduino Mega board;
  • DC motor (Motor DC);
  • field effect/bipolar transistor;
  • L298N motor driver;
  • wires "father-father", "father-mother".

Before choosing a motor control method from Arduino Uno r3, check what voltage your motor is designed for. If more than 5 Volts of power is required, then a transistor or driver should be used. The pinout of transistors may differ from the example given (you should check the pinout for your type). The L298N driver will not only allow you to turn on the motor, but also change the direction of rotation.

Sketch. Connecting the motor directly

Connecting the motor to Arduino directly is the easiest way to turn on a fan on an Arduino or machine. The command to turn on the engine is no different from the command when connecting the LED to the microcontroller. The digitalWrite function turns on/off the voltage supply to the digital port to which the DC motor is connected. Build the circuit and download the program.

void setup() (pinMode(12, OUTPUT); // declare pin 12 as output) void loop () ( digitalWrite ( 12 , HIGH ); // turn on the motor delay(1000); // wait 1 second digitalWrite (12, LOW ); // turn off the motor

Explanations for the code:

  1. you can use any port to connect a motor without a driver;
  2. If the motor does not turn on, then perhaps there is not enough current at the digital output, connect the motor via a transistor to the 3.3V or 5V port.

Sketch. Connecting the motor via a transistor

Connecting the motor via a transistor to the Arduino will be required; if the motor does not want to be turned on directly from the board, then you should use the 5 Volt port on the microcontroller or an external power source. The transistor will play the role of a key, closing/opening the electrical circuit. The transistor itself is controlled by the digital port. Assemble the circuit as in the picture and download the program.

Connecting FA-130 DC motor - Motor DC Arduino void setup () ( pinMode (13, OUTPUT ); // declare pin 13 as output) void loop () ( digitalWrite ( 13 , HIGH ); // turn on the motor delay(1000); // wait 1 second digitalWrite (13, LOW ); // turn off the motor delay(1000); // wait 1 second)

Explanations for the code:

  1. if necessary, you can connect two FA-130 motors to Arduino;
  2. depending on the characteristics, the engine is connected to 3.3 or 5 Volts.

Sketch. Connecting the motor via driver

Connecting the motor to Arduino via the L298N driver or Motor Shield L293D will allow you to change the direction of rotation of the rotor. But to use these modules you will need to install the appropriate libraries for Arduino. In the example, we used a motor connection diagram using the L298N module. Build a circuit like the picture below and upload the following sketch using.

// set names for ports#define IN1 3; #define IN2 4; #define IN3 5; #define IN4 6; void setup () ( pinMode (IN1, OUTPUT); pinMode (IN2, OUTPUT); pinMode (IN3, OUTPUT); pinMode (IN4, OUTPUT); ) void loop () ( // rotate the motors in one direction digitalWrite(IN3, HIGH); digitalWrite(IN4, LOW); digitalWrite(IN5, HIGH); digitalWrite(IN6, LOW); delay(2000); // wait 2 seconds digitalWrite (IN3, LOW ); digitalWrite(IN4, LOW); digitalWrite(IN5, LOW); digitalWrite(IN6, LOW); delay(1000); // turn off for 1 second // rotate the motors in the opposite direction digitalWrite(IN3, LOW); digitalWrite(IN4, HIGH); digitalWrite(IN5, LOW); digitalWrite(IN6, HIGH); delay(2000); // wait 2 seconds digitalWrite (IN3, LOW ); digitalWrite(IN4, LOW); digitalWrite(IN5, LOW); digitalWrite(IN6, LOW); delay(1000); // turn off for 1 second }

Explanations for the code:

  1. The motor driver allows you to control the speed and direction of rotation of the motor, read more in the review - Connecting the L298N driver to Arduino;
  2. if the motors do not spin, connect a 6-12V power source to the driver.

In healthy people, a change in weather does not have much effect on their well-being, but weather-dependent people react very painfully to any change in weather or atmospheric pressure.
The barometer-alarm proposed in the article is intended to inform weather-dependent people in real time about the current value of atmospheric pressure, when the atmospheric pressure value goes beyond the established limits and its sharp jumps.
Appearance device is shown in Figure 1.

Figure 1. Appearance of the device

The user independently sets the boundary values ​​- minimum and maximum thresholds.
If the atmospheric pressure exceeds the maximum threshold or falls below the minimum threshold, the device will emit intermittent sound signals and “Threshold” light signals.
After the sound signals are repeated five times, the sound turns off, and the light signal will be given until the atmospheric pressure returns to the specified limits.

The user sets the magnitude of the controlled jump in atmospheric pressure for a set time interval.
In cases where the atmospheric pressure in a given time interval deviates by an amount exceeding the controlled jump, the device will give intermittent sound signals and light signals “Jump”.
After the beeps are repeated five times, the sound will turn off and the light will continue until the barometric pressure returns to a level where the surge is considered uncontrollable.
Atmospheric pressure values ​​are presented in the device in “mmHg”. Art."

Demo video

Schematic diagram of the device.

The electrical circuit diagram of the device is shown in the figure (Figure 2).
The device is assembled on an ATmega8 microcontroller.
Resistor R1 and capacitor C3 provide a hardware reset of the MK when power is applied.
Capacitors C2 and C1 protect the power circuits from high-frequency interference and power surges.

The atmospheric pressure value comes from the BMP1 sensor (GY68 BMP180).
The pressure sensor is controlled via the TWI (I2C) interface.
The sensor inputs are connected to the supply voltage by resistors R8 and R10.

The Nokia 5110's LCD screen is used to display information. The screen displays information about the current atmospheric pressure, as well as device settings.
Operational indication of the state of atmospheric pressure is carried out using LEDs VD1..3 (“Normal”, “Threshold”, “Jump”).
Sound signaling is carried out using a low-frequency amplifier using transistors VT1..2 and loudspeaker SP1. The sound volume can be adjusted using variable resistor R5.

The device is configured using the buttons SA2 ("Install"), SA3 ("+"), SA4 ("-").
When you press the SA5 (“Screen”) button, the main screen with the current atmospheric pressure value is displayed.

Attention! Fuses for tuning the MK: HIGH=0xD9, LOW=0xE1.

Figure 2. Electrical circuit diagram

Software.

The program for MK is written in C language in the AtmelStudio environment (Version 7.0.1006).
The program code is given in the Appendix (SignalBarometer.rar Archive of the Atmel Studio 7 project in C).
In order to reduce the power consumption of the device, the method of “falling asleep” of the MK in the “power-save” mode was used. At the same time, the current consumption in sleep mode is reduced to 20 μA.
According to calculations, this allows you to use two 1.5 Volt AA batteries for 4 months.
To wake up the MK from the “power-save” mode, an internal asynchronous timer-counter No. 2 is used, which runs constantly.
The counter timer master oscillator uses a quartz resonator Y1 with a resonance frequency of 32768 Hz.

Timer-counter No. 2 is configured so that every 8 seconds it overflows and calls an interrupt, which “wakes up” the MK.
After waking up from timer-counter No. 2, the MK finds out whether 10 minutes have passed since the previous awakening. If not, then the MK gives a light signal “Normal”, “Threshold” or “Jump” depending on the condition that developed after the previous measurement, and falls asleep again for 8 seconds.
If 10 minutes have passed since the previous measurement, then the MK sends a command to the pressure sensor to take measurements, receives a response from the sensor, processes the data, comparing the received value with threshold values ​​or conditions for recording a jump, and issues a light signal “Normal”, “Threshold” or “ Jump" and beep if necessary. And again he “falls asleep” for 8 seconds.

The second source of awakening the MK is an external interrupt at the INT1 input, which occurs when the “Screen” button is pressed.
MK, having awakened and found out that it was “awakened” by the “Screen” button, turns on the liquid crystal display of the Nokia 5110 and displays on it the current value of atmospheric pressure and other information.
The screen will display information until the Screen button is released. After releasing the “Screen” button, the MK turns off the display by issuing the “power-down” command to it, then the MK “falls asleep” itself.

The third and final source of awakening the MK is an external interrupt at the INT0 input, which occurs when the “Set” button is pressed.
MK, having woken up and found out that he was “awakened” by the “Install” button, turns on the liquid crystal display of the Nokia 5110 and displays the device settings parameters on it.
Clicking the “Set” button again moves the cursor to the next parameter. Pressing the “+” and “-” buttons changes the value of the parameter on which the cursor is positioned.
After pressing the “Install” button on the last parameter, the MK turns off the display and “falls asleep” until the next awakening.

Device design.

The device is made in the housing of a distribution box “Tuco 79x79x32, for open wiring, white (65004)” (Figure 3).

Figure 3. Tyco distribution box (65004).

The board is made on one-sided foil fiberglass. Board size 72x72mm. The location of the parts on the board is shown in Figure 4. There are 9 (!) jumpers on the top of the board. They are highlighted different colors. If you use a double-sided PCB, the jumpers can be converted into tracks.

Figure 4. Board. View from above.

The PCB layout is shown in Figure 5. The image is mirrored.

Figure 5. PCB layout.

The speaker is attached to the back wall of the device case. The assembly components are shown in Figure 6.

Figure 6. Device components.

Batteries (two AA cells) are placed in the battery compartment in specialized holder-beds (Figure 7).

Figure 7. Battery placement.

Device setup.

Figure 8 shows the controls for setting up the device.
To enter the mode, click the “Install” button. The display will show the adjustable parameters.
Use the “+” and “-” buttons to set the required parameter value.
To proceed to setting the next parameter, click the “Install” button.
To exit the setup mode, press the “Setup” button several times.
Top Options<порог>", "Lower<порог>» “Leap” are specified in mmHg. Art., the “interval” for measuring the jump is set in hours. .

Figure 8. Device settings controls.

The volume of the sound signal is adjusted using the “Volume” potentiometer. To make adjustments, you must use a miniature Phillips screwdriver.
If necessary, a potentiometer can be installed with an external handle for ease of adjustment.

Operation of the device.

After switching on, the device is ready for use and immediately takes the first measurement of atmospheric pressure. In this case, the screen is darkened, and the measurement results are displayed using the LED indicators “Normal”, “Threshold” or “Jump”.
The indicator corresponding to the measurement and analysis result produces five short flashes every 8 seconds.

When transitioning from the “Normal” state to the “Threshold” or “Jump” state, a sound signal is generated. The signal sounds for five 8 second intervals, starting with the interval following the state change.
For a detailed assessment of the current state, you must press and hold the “Screen” button. In this case, the information presented in Figure 9 will be displayed:

Current atmospheric pressure;
. the maximum and minimum pressure value measured over the time interval specified in the settings;
. magnitude of the jump in mmHg. as the difference between the values ​​​​indicated in the previous paragraph;
. text description of the measurement result: NORMAL, THRESHOLD, JUMP.

After pressing the Screen button, the series of beeps will be interrupted.

Figure 9. Controls and indications during device operation.

After releasing the “Screen” button, the display will go out, and the device will continue to operate in normal mode, displaying the measurement and analysis results only on the LED indicators.

Application:

SignalBarometer2.dch Electrical diagram in DipTrace format
SignalBarometer2.dip PCB in DipTrace format
SignalBarometer.hex Load file
SignalBarometer.rar Archive of the Atmel Studio 7 project in C

Good luck in your creativity and all the best!

Download the archive.


Summary"Radio" magazine No. 1:

Indicator of short-circuit turns in coils with ferromagnetic magnetic cores.
The device is designed to check for the presence of short-circuited turns of the windings of various electrical devices - transformers, direct and alternating current machines, magnetic amplifiers, etc.

Increased soldering iron power regulator.
The proposed device is designed to regulate the power of a soldering iron and other heating devices with a power of up to 100 watts. It can also be used to power lighting fixtures with incandescent lamps of the same power at reduced network voltage.

Interference simulator for testing network filters.
Schematic diagram and principle of operation of the original device, which can be used to comparatively evaluate the effectiveness of LC filters designed to operate in a 220 Volt alternating current network.

Dimmer with IR remote control.
The dimmer presented in the article is intended for use with incandescent lamps. They control it using a remote control from any household equipment. The device may be useful for people with disabilities.

LED lawn light includes electrical appliances.
The article describes the modification of an autonomous LED lawn lamp to automatically turn on networked electrical appliances, in particular lighting, at night. At the same time, the main function of the lamp is preserved.

Intercom.
This device is designed for conversations between two ordinary telephone sets. Communication via a two-wire line is provided at a distance of up to 1 km if its resistance does not exceed 500 Ohms.


Brief content of the magazine "Radio" No. 2:

Audio signal level indicator on ILT6-30M.
The author of the article shares his experience in using indicators from the Mayak MP-240S cassette recorder as a two-channel signal level indicator for an AF amplifier.

Ampere-voltmeter for laboratory power supply.
The device is designed to work together with any laboratory power supply. It not only shows the output voltage and current of the load, but also performs several additional functions that make the power supply more reliable.

Oscilloscope calibrator.
The proposed device is designed to calibrate amplitude and duration. The 1.999 Volt precision voltage source is based on an LM317T adjustable voltage regulator, and the duration calibrator is based on an ICM555IN integrated timer.

Network power supply based on a solar power battery.
The article describes an original low-power mains power supply with galvanic isolation from the network, in which the output voltage is created by a solar battery from a lawn lamp, illuminated by a garland of 14 white LEDs extracted from an LED lamp.

Chargers based on voltage stabilizer chips.
Detailed description, operating principle, as well as design features of simple chargers that are designed to charge lead-acid batteries.


Drawings, diagrams and assembly procedures for a microcontroller control unit, which was designed and manufactured to replace the standard control unit for the EVAN EPO-7.5/220 V electric heating boiler. It can also be used to control other electric heating devices.


Brief content of the magazine "Radio" No. 3:


The author of the article shares his experience in independently manufacturing a simple car stereo amplifier with a switching voltage converter.

Generator of a “drawn” signal.
A detailed overview of the manufacturing process of a signal generator based on the PIC16F873A-I/P microcontroller, which is capable of generating a signal literally drawn on a graphic display screen with a resolution of 128 x 64 pixels.

A device for experiments with Ni-Mh batteries of AA and AAA sizes.
The developed device makes it possible to identify batteries that have completely exhausted their resource, and to extend the life of the rest by selecting the optimal charging mode for each. The device is based on the ATmega8 microcontroller.


The proposed incubator allows you to automatically hatch chicks of four types of poultry: chickens, turkeys, ducks and geese. All actuators in it are powered by a constant voltage of 12 Volts, which allows the incubator as a whole to be powered not only from a 220 Volt household network, but also from a battery.

Control of an electric heating boiler.
End of the article published in Radio magazine No. 2 for 2014.

Running lights control unit.
The section “Electronics while driving” proposes the design of an electronic device that automatically turns on the running lights when the engine is running and turns them off when the low or high beam headlights are turned on.


Brief content of the magazine "Radio" No. 4:

Compact car amplifier.

The M-83x series multimeters are powered by a single battery.
The article offers options for powering popular multimeters of the M-83x series from one Ni-Cd or Ni-MH battery of AAA or 2/3 AAA size using a boost converter.

Low voltage automatic incubator.
End of the article published in Radio magazine No. 3 for 2014.

Radio alarm for hunters.
The author of the article shares his experience in independently manufacturing an original device that signals via radio about the movement of an animal in a controlled area.

Insect trap.
The proposed device can significantly reduce the number of flying insect pests. Several traps placed in the garden allow you to completely eliminate the use of chemicals.

Vehicle security system with satellite tracking of coordinates and transmission of alerts via GSM channel.
The article presents the original design of a car security system, which uses ready-made modules that have a rich set of functions and a design that allows installation with a conventional soldering iron.

QRP transceiver MA12.
A detailed description, as well as design features of the telegraph QRP transceiver for the 40 meter range, developed by the German shortwave DK1HE.


Brief content of the magazine "Radio" No. 5:

Stabilization of the mode of class AB amplifiers.
The article presents a method for automatically adjusting the bias voltage of push-pull amplifiers to stabilize the current consumed by the amplifier when the amplified signal passes through zero and at rest.

Audio player for MP3 and Opus formats.
The author of the article shares his experience in making a homemade portable player for music files of common formats from a microSD memory card. It is assembled on an STM32F407VGT6 microcontroller in a package from cell phone NOKIA 1100.


Detailed description, principle of operation, as well as design features of a matrix LED display for eight spaces. It can work with various sources of information, receiving data from them for display via the TWI (PC) interface.

Carbon monoxide concentration analyzer.
The proposed device is made on three microcircuits and five transistors. Gas sensor - electrochemical with liquid electrolyte TGS5042, visual indicator - three-digit LED LTD5122.

Stabilized voltage converter on the YX8018 chip.
The converter is designed to power various electronic devices that require a supply voltage of 2...5 Vol from one galvanic cell or Ni-Cd (Ni-MH) battery.

High precision thermometer with DS18S20 sensor.
A temperature measurement device is proposed, made on the ATmega8515 microcontroller and DS18S20 temperature sensor, characterized by simplicity of circuit and design with increased measurement accuracy (temperature readout resolution - 0.1 degrees Celsius).


Brief content of the magazine "Radio" No. 6:

The M-832 multimeter is powered by two batteries.
The author of the article proposes a method of powering 83x series multimeters from two high-capacity AA-size Ni-MH batteries, which can significantly extend the operating time of the devices without turning off the power.

Generator of two reference frequencies for broadcast transmitter synthesizers.
The generator is designed to generate signals of two switchable stable frequencies. It can be used as part of synthesizers for individual radio broadcasting when forming both a medium-wave broadcast grid with a step of 9 kHz and a short-wave broadcast with a step of 5 kHz.

Charging the battery using Peltier elements.
The device is based on the ATmega88-20AU microcontroller and contains, in addition to it, nine transistors.

Matrix LED display.
End of the article published in Radio magazine No. 5 for 2014.

Adjustable current stabilizer for powering high-power LEDs.
Design features and assembly process of the device, which is made on an integrated voltage stabilizer LM317T and transistor FMMT617 and is designed to power an LED assembly with a rated voltage of 12 Volts and a power of up to 18 Watts from a 15 Volt source.

Adjustable power supply.
Schematic diagram and operating principle of a homemade power supply, which is based on a unified step-down transformer TPP-251–220–50. The output voltage of the unit is adjustable within 0…12 Volts, load current 0.3…0.8 Amperes.


Brief content of the magazine "Radio" No. 7:

Two-channel stereophony - approaching the ideal. About playing stereo records through speakers.
The article presents a method for acoustic reproduction of stereophonic phonograms, which allows, without interfering with the sound engineer’s plan, to get rid of some of the shortcomings of this format and fully reveal its advantages in different rooms.

VHF range in VEF and Spidola receivers.
Description of the method of organizing the VHF range in radio receivers of the Spidola and VEF series using the TEA5710 microcircuit.

Device for monitoring EPS.
The device is designed to measure equivalent series resistance in two switchable intervals: in the first, you can test capacitors with a capacity of more than 1 μF (the ESR measurement limits are approximately from 1 to 30 Ohms), in the second - more than 10 μF (from 0.25 to 10 Ohms).

Portable MP3 player.
Design features and assembly process of a portable MP3 player, which allows you to play MP3 files with a digital audio stream speed of up to 256 Kbps and a duration of up to 99 minutes 59 seconds. The device is assembled based on a PIC18F4610-I/PT microcontroller and six microcircuits.

Welding machine "Malyutka".
A detailed description, principle of operation, as well as design features of a small-sized welding machine, which allows you to make welding connections of thin metal plates, work with it as an electrograph (“pencil”), and also make drawings of conductors of prototype printed circuit boards on foil-coated fiberglass laminate.


Brief content of the magazine "Radio" No. 8:

Automatic signal switch.
Drawings, diagrams and assembly procedures for a simple electronic switch that provides simultaneous switching of audio and video signals from two different sources.

Oscillating frequency generator with LCD indicator.
The article describes in detail the process of manufacturing a homemade device designed to determine the resonant frequency of an oscillating circuit or quartz resonator, the shape of the frequency response of an amplification path or filter in the frequency range from several hertz to ten megahertz.

Creeping line with text input using a computer keyboard.
This device is designed to display various advertisements and is intended for installation, for example, on the rear window of a car.

Laboratory power supply from a UPS.
The author of the article shares his experience in independently manufacturing a laboratory power supply from a faulty or outdated uninterruptible power supply.


A detailed overview of the manufacturing process of a simple device that ensures the stability of the soldering iron rod temperature set by the regulator when the mains voltage changes.

Clock-calendar on gas-discharge indicators.
The article talks about how to make an original watch with your own hands that shows the current time and date and has alarm functions. Their feature is the use of gas-discharge digital indicators IN-12.


Brief content of the magazine "Radio" No. 9:

Attachment to a frequency meter for resonant measurements.
Drawings, diagrams and assembly procedures for a homemade device, which is designed to determine the resonant properties of inductors, capacitors, and also determine capacitance p-n junctions varicaps, diodes and transistors.

Converter for powering a digital multimeter.
The article proposes a voltage converter option for powering a multimeter from one galvanic cell, as well as a Ni-Cd or Ni-MH battery.

Effective voltage stabilizer on the PIC16F684 microcontroller.
Design features and assembly process of the original device, which is designed for stepwise adjustment of the effective voltage value supplied to heating devices and incandescent lamps, and its stabilization during voltage fluctuations in the network.

Indication and control unit for a laboratory power supply and charger based on a computer power supply.
The proposed microcontroller display and control unit can be connected to any computer power supply that uses the TL494 chip or its equivalent, having previously modified this unit according to the recommendations of the article.

Capacitive liquid level meter.
The article provides a description of a device that measures the liquid level using the capacitive method. It is based on measuring the electrical capacitance between two electrodes placed in a reservoir of liquid that covers them to a greater or lesser extent.

Dependent switching on of electrical appliances.
The author of the article offers his own version of the device, which automatically supplies power to the slave device when the master is turned on.


Brief content of the magazine "Radio" No. 10:

Signal conditioner for subwoofer.
The author of the article offers a very simple and original circuit solution for achieving effective adjustments when generating signals for a subwoofer.

Low power high voltage source.
The presented high voltage source contains a relaxation generator based on a triac and a storage capacitor, a pulse high-voltage transformer and a rectifier using a voltage doubling circuit. The device is powered from the mains through a ballast capacitor.

Regulated power supply with protection.
The design of a homemade laboratory power supply, which provides for software setting of output voltage and current thresholds, exceeding which is impossible not only as a result of the most likely malfunctions of the unit, but also due to careless influence on its operational control elements.

Soldering iron tip temperature stabilizer.
The article presents a device, accessible for repetition, designed to maintain the optimal temperature of the soldering iron tip by measuring the resistance of the heater during short-term disconnections from the network.

Simple power regulator.
The device is designed to regulate power in a load with high inertia. The control method is to change the number of periods of the supply voltage supplied to the load.

Automation of the flush cistern.
The proposed device implements automatic, without any manual intervention, control of the flush cistern and ventilation in the toilet.


The chandelier is intended for general lighting of a living room or kitchen with an area of ​​10...14 m2 and creating decorative colored lighting in it. The brightness of the lighting and lighting effects are controlled using the IR remote control from the TV.


Brief content of the magazine "Radio" No. 11:

Welding machine with voltage booster and smooth current adjustment.
The article provides a description of a welding machine that is easy to manufacture and reliable in operation. It allows welding with both direct and alternating current, and in both cases stepwise and smooth adjustment is possible.

Aquarium control device.
The device measures water temperature with a DS18B20 sensor, and it is possible to connect two sensors and stabilize the temperature using the arithmetic mean value of their readings. It is also designed to connect LEDs that illuminate the aquarium.

SDU with ATtiny2313 microcontroller for 16 garlands.
The SDS is developed in two versions. The first controls only the LEDs located on its board and is intended for developing and debugging lighting effects programs. A microcontroller with a debugged program can be transferred to the board of the second version of the SDU, to which you can connect 16 lighting devices powered by a 220 Volt network.

LED chandelier "Rainbow".
End of the article published in Radio magazine No. 10 for 2014.

Bipolar voltage converter.
The schematic diagram and principle of operation of the device, which is built on the NSP1400ASN50T1 microcircuit, is powered by one galvanic cell or battery and provides an output voltage of +5 and –5 Volts.

Fan control device in a laboratory power supply.
The control device is made on the basis of an integrated voltage stabilizer KA78R12L-TF4-T, the peculiarity of which is the ability to turn it on and off by an external signal. IN in this case it powers the fan motor, which turns on when the temperature inside the power supply reaches a preset value.


Brief content of the magazine "Radio" No. 12:

Preamplifiers and adders on TL064 microcircuits.
The article proposes options for AF preamplifiers based on an economical quad op-amp microcircuit, suitable for use in devices with battery or universal power supply.

Probe for testing oxide capacitors.
Schematic diagram and principle of operation of a homemade probe, which does not have a dial indicator. Its functions are performed by a line of LEDs, the glow length of which can be used to estimate the equivalent series resistance (ESR) of oxide capacitors.

Built-in current and voltage meter on PIC12F675.
The proposed device is designed for installation in various regulated power supplies. It displays the output voltage of the unit and its load current on its LED indicators.

Washbasin with touchless control.

Another project of an advanced display meter, which includes measuring temperature, atmospheric pressure, air humidity and counting time with a calendar. In general, it includes all my developments in working with sensors over the entire period of my passion for microcontrollers, and all the purchased goods need to be used somewhere :) The result should be an improved temperature logger, the first version of which I abandoned. Well, that’s later, but now I’ll give a description of this board and test code to check the functionality of the sensors and microcircuits stuffed there.

The device diagram is below (click on the picture to enlarge), the USB-UART converter is shown schematically, its circuit is standard and has already been described here.

The heart of the circuit is the Atmel ATMega64 microcontroller, powered by an external 16 MHz quartz. The time is counted by a real-time clock chip; I have already dealt with it and therefore followed the proven path.

To measure temperature and humidity, a DHT11 sensor is used, although it is made in China pure water, but the readings are quite satisfactory. I also have SHT21 in my stash, but then the repeatability of the circuit will drop greatly, because it is more difficult to get and it will cost the same as the entire assembled circuit.

The next sensor, BMP085, measures atmospheric pressure. In addition, it can also measure temperature, so it will be possible to duplicate readings from it.

Since in the future it is planned to turn the device into a logger, there is a place for connecting an external EEPROM memory 24LCxx. To interface a 3-volt pressure sensor, a proven matching circuit based on field-effect transistors was used.

All elements (with the exception of two resistors) are located on the top layer, on the bottom there are roads that do not fit on the top. There is little interesting there, so I don’t include photos.

To be able to directly connect the device to a computer (for example, in order to download accumulated data), the board has a USB-UART converter on the FT232RL chip. You can also load firmware into the microcontroller through this converter if you first install a bootloader into the microcontroller. I wrote earlier how to do this.

To connect external sensors, just in case, outputs are provided from ports PA0-PA3. The SPI interface contacts are also displayed, in case you want to connect and organize a radio channel.

The test code displays the time and date from the DS1307 clock, with the ability to manually set (see video). The second line displays information from the DHT11 humidity sensor, and the third line displays information from the BMP085 pressure sensor. As you can see, the Chinese DHT is not inferior in temperature readings to its German counterpart BMP085 from Bosh. By the way, the Chinese also know how to give readings with tenths of a degree; later I will add this function to the code.

And finally, a video demonstrating the ability to manually set the date and time.