Video of the Day

Tuesday, October 23, 2018

0

Low-Cost GPS Clock

Real-time clock (RTC) integrated circuits (ICs) are used for reasonably accurate time displays. The accuracy of RTCs mostly depends on the crystal. In a long run, a small-time deviation will be observed in the RTC circuit due to seasonal and atmospheric temperature changes. In case of a Global Positioning System (GPS) clock, the time/time stamp is received from the satellite(s) and is highly accurate. This project is based on a low-cost GPS clock using AVR ATmega8A microcontroller (MCU).

Circuit and working of Low-Cost GPS Clock

Circuit diagram of the simple and low-cost GPS clock is shown in Fig. 1. It is built around ATmega8A (IC1), NEO 6M GPS receiver module (GPS1) along with an antenna, 16×1 LCD (LCD1) and a few other components.

Circuit diagram of GPS clock

Fig. 1: Circuit diagram of GPS clock

NEO 6M GPS receiver module receives National Marine Electronics Association (NMEA) data continuously and transfers the same to ATmega8A MCU. The MCU processes the data and picks the date stamp from the received data string. The following data format is searched in the received data, which is used to pick the time stamp:

$GPGGA, 143621, .

The MCU checks for the keyword $GPGGA and reads the next six characters of the received string and displays it on LCD1. This process repeats in a cyclic process, and the latest time is displayed.

The time stamp received is always in Universal Time Coordinated (UTC) format, which matches with Greenwich Mean Time (GMT). To convert it to local time, add proper time constant to UTC time, which will depend on the country and city. In the program, the local time constant for Indian time is set to +5:30, but you can modify it to set a different value.

The local time constant is declared in C program as:

int ADJ[2] = {5,30};

Initial setup
After connecting the circuit, upload GPSclock.hex file to ATmega8A MCU using any AVR programmer through ISP port. Once the program is loaded, blinker LED1 will glow for one second followed by ‘NEO 6M GPS Clock’ message on LCD1. By default, it will display in UTC format.

To change to local time constant, press any switch (S2 or S3) to display the existing value. By pressing hours and minutes switch, the local time constant changes. If no switch is pressed for more than four seconds, the value is saved in EEPROM of the MCU.

The GPS module will initialise and try to connect to the satellite for data reception. This may take some time, say, three to five minutes. LCD1 will display “Connecting..” till the data is received from the satellite. Once the data is received, the time will be displayed on LCD1 in HH:MM:SS format continuously. In case GPS module is not connected, or is giving a connection error, ‘NO GPS MODULE’ message will be displayed on LCD1.

Use shorting jumpers SJ1 for 12/24-hour format and SJ2 for local/UTC time to be displayed. LED1 will indicate that the MCU is processing the received data. Potmeter VR1 is used for adjusting the contrast for LCD1.



Construction and testing
An actual-size PCB layout of low-cost GPS clock circuit is shown in Fig. 2 and its components layout is shown in Fig. 3.

Fig. 2: PCB layout of GPS clock

Fig. 3: Components layout for the PCB

Assemble the circuit on the PCB and connect 5V across CON1 to operate the circuit. Enclose the circuit in a suitable box and connect GPS1 across CON2. Connect the antenna to GPS1. Place the unit at a suitable location along with LCD1. Jumpers J1 and J2 shown in the PCB can be any conductor wires. Connect these before switching on the circuit.

Jumper setting
Connect SJ1 in 12-hour format, otherwise it will be set in 24-hour format by default. Connect SJ2 for UTC time, otherwise it will be set in local time (UTC+5.30).

For example, the time stamp received by the GPS module is 14:15:16, which is in UTC time in 24-hour format by default. Now, LCD1 will display the time as per the settings for SJ1 and SJ2, as shown in the table, assuming the local time constant as +05:30:00.


To change the local time, press minutes and hours switches (S2 and S3, respectively) during initialisation of the system when NEO 6M GPS message appears on LCD1. Change local time constant only once.



Sourced: EFU Author : Fayaz Hassan


0

Two Channel RC Car Receiver

Someone anonymous left me a comment in this post asking that, since I had analyzed the transmitter, I also described the receiver. The comment I deleted, for the lack of care of its editor, but the request seemed right. A typical receiver of a cheap car made in China does not have much crumb. This I present is one that cost me between 3 and 4 euros (for those who are more familiar, about 4.5 USD).

Current Radio Control circuits

  There are three types of low-end radio controlled cars. Of course they do not have to be cars, the external form can be any. What matters is the circuit. Of course we talk about radio control at 27MHz, there are other controls that work with infrared but I will not talk about that.

  As I say, in RC models today we find only three types of circuits. Because the manufacturers are the same and barely change the schemes. The scheme depends on the channels that the car has. Channels are the independent actions you can perform.

  Diagram of a channel: These are the most basic and only have a button on the remote. They are the typical ones that nothing else turn them on the car goes forward. When we press the button it goes backwards and at the same time it rotates, to continue advancing as soon as we release the button. The circuit is very simple: a transmitter in the control and a receiver tuned in the car. As soon as the receiver picks up the command signal, it switches the address. Often the signal is not even modulated.

  Scheme of two channels: These have three states: forward, backward and stopped. They have two push buttons, one for forward and one for backward that can be independent or joined in a lever. The transmitter is an oscillator that can emit two tones of different frequencies (250Hz and 1000Hz), we already described the operation in this input. As for the receiver, the scheme is usually based on the integrated RX-3 from Silan. That is going to be the one we describe today.

  Scheme of five channels: They are the cars with functions of back-forward-turbo and left-right. In this case it is no longer comfortable to use different frequencies for each option, so digital modulation is used. Both the transmitter and the receiver use dedicated integrated. The TX-2B and the RX-2B respectively. We are not going to talk about them today

  Of course there are many more schemes. But these and their variants are the most common you will find in the bazaars. For the mid-range and modeling, especially in airplanes, other not so simple circuits are already used.

Two-channel receiver

This is the receiver of an RC car with two channels: forward / backward and stopped in the absence of signal. First let's look at the plate to get an idea:

Two Channel RC Car Receiver

Two Channel RC Car Receiver

Two Channel RC Car Receiver


We could reproduce the circuit from the tracks, as we did with the transmitter. But it is very boring, in addition in the datasheet of the RX-3 comes a scheme proposed by the integrated manufacturer. It is to be hoped that ours does not deviate too much and in fact it is very similar, deleting some components to save costs.

Two Channel RC Car Receiver


I have colored some sections so you can see them better (click to enlarge). Let's see how it works.

Section A: Radio frequency stage.

It seems that it is a regenerative receptor. The feedback is done through the 5.6kΩ resistance. These circuits apply positive feedback almost to the point of oscillating with the input signal. For how simple they are, they have very good sensitivity and selectivity characteristics. They have known each other since the earliest days of radio. The first patent is from 1914, with valves, of course.

The transmission reaches the antenna, passes through the tuned tank circuit and is amplified with the transistor. One of the diodes of the transistor also acts as an AM detector. Detecting and re-amplifying the tone with which the carrier is modulated. This type of design was used much earlier, when the cost of the transistors was very high. And that cost less than valves. The first transistor radios that came out proudly announced 6 transistors. Today the remote control that we analyze has 7, and the computer with which I write and read has several millions of miniature transistors inside.

The extracted audio tone goes to section B to be amplified

Section B: Audio amplification.

The integrated RX-3 incorporates two inverting amplifiers ready to use. The outer pins connect with what would be the equivalent of the inverter inputs.

The resistors and capacitors that make up this section are the feedback networks of both amplifiers. The first of them has an amplification of about 30dB which is greatly reduced for high frequencies by the effect of the 500pF capacitor in parallel with the resistance.

The second stage is configured with a gain of 10dB. All this grossly without counting the losses by the coupling capacitors, in series with the input resistors, which separate the direct current and only let the alternating current pass through.

The entire amplifier stage has a gain of 40dB. The detected tone is applied to pin 4 of the integrated. This is the demodulated signal input. When a 1000Hz tone arrives at this pin, pin 11 will be set high -forward- and the car will move forward. On the other hand when a tone of 250Hz arrives, the pin 9 -backward- will turn on and roll backwards

Section C: Bridge H.

When we apply tension to an engine it turns in a certain direction. If what we want is that we rotate one way or another at will we have to use a special arrangement of transistors to feed it. This circuit is called bridge H.

When the integrated applies voltage to the pin 11 -speed- the transistor Q9 goes to conduction. With it as a cascade reaction they also switch Q11 and Q13, grounding the left terminal of the motor and supplying positive voltage to the right one. And the engine will turn in one direction.

On the other hand, when pin 8 is activated -return- transistor Q8 is activated which in turn activates Q12 and Q10. Under these conditions, the left terminal of the motor would receive positive voltage while the right terminal is connected to ground. Just the reverse of the previous situation, and the engine will turn in the opposite direction.

There are variants of this scheme. In the scheme there are 5 NPN and 1 PNP transistors. However on the plate we have there are 4 NPN and 2 PNP. There are multiple possibilities but the idea is the same.

Section D: Food.

Finally, section D is the circuit power. There is not much to emphasize here. There are components that are missing in the commercial plate, for example the diode D1, which prevents against inversion of the batteries, they have saved it. As well as some filtering capacitors.

We see that the part that feeds the stage A is decoupled by a resistance of 100Ω and a capacitor. It serves so that no residual RF signal can leak into the power line and interfere with the integrated one.

In some circuits this part is not well designed, and the RF is coupled with the power supply, it can also pass through the parasitic capabilities between the tracks for example. In many cases of erratic behavior, especially with micro controllers this is the problem


Social Time

Google Plus
Follow Us
Pinterest
Follow Us

Subscribe to our newsletter

(Get fresh updates in your inbox. Unsubscribe at anytime)