Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[SOLVED] Problem in Wireless Transmitter and Receiver

Status
Not open for further replies.
Here is a excellent and current thread on decoupling capacitors: https://www.edaboard.com/threads/212775/

Something like a 0.1 uF across the IC's and then 100uF plus 0.1 uF on power supply may help. You want a fast/low ESR capacitor (e.g, ceramic) for the 0.1 uF; for the 100 uF, just use any electrolytic type.

Gotta run to the farm and won't be back for 8+ ours or so.

John
 

Dear all,

I have almost completed the RF Transmitter and Receiver project with the help of you all. Now, I am facing little bit trouble sending/receiving data. Receiver correctly matches the address (A0-A7) and VT pin goes high. But, Address/data (AD8-AD11) some times work and sometimes not. If I pull down to ground the Pins TE and D8 of HT12E, the LED connected to AD8 pin of decoder HT12D is sometimes lights-up and sometimes not. I am nearly in the final stage. If any one help me to solve the issue I will be grateful to you. Plz. I have tried to put decoupling capacitor(0.1uF) between +5v and GND of both HT12D and 12E. But result is not OK. Any help?
 

How do you have your LED's connected to the decoder data pins? Are you using something like a 2N3904 interface with a 10K base resistor?

John
 

I have directly connected LED to the Data Pin of Decoder. I have not used any Diode of Resistor.

---------- Post added at 10:04 ---------- Previous post was at 10:03 ----------

Also, I have read the data pin of Decoder. It goes high only sometimes.

---------- Post added at 11:23 ---------- Previous post was at 10:04 ----------

I have tried connect LED to the data pin of encoder with 2N3904 Transistor and 10 K resistor. Same result. Also I have replaced old HT12E and HT12D with New pair. Same result. When I ground the TE Pin & AD8 of HT12E, the voltage on the pins of HT12E:

AD8 : -0.02
AD9 : 0.25
AD10: 0.25
AD11: 0.25
TE : 0.30

Any idea?

---------- Post added at 11:29 ---------- Previous post was at 11:23 ----------

Will there be a Antenna Problem. I am using ordinary wire (No. 1/22) as Antenna. The Length of Antenna is around 16 CM.
 

That may be the correct result.

Let's review:

@Post#8, the link says:
Suppose you pressed 'S4'. So the data transmitted will be 1110 and address will be of course 00000000.

HT12D receives the signals compares address thrice, gives high pulse on pin VT and then latch the data. Because data is 1110 LED L1 will not glow and rest all the LEDs will glow.

Same way if you press 'S2' data will be 1011. So now LED L3 will be off and rests are on.

@Post#16, you say:
But the result is same (All LEDs Lights-up except the pin where the Switch is connected (D0 to D3)).

That sounds OK. Then at @Post#22. you say:
But, Address/data (AD8-AD11) some times work and sometimes not.

That made me think there was something intermittent or interference, hence my recommendation to be sure the power supply and each IC is properly decoupled.

@Post#24, your results are:
I have tried connect LED to the data pin of encoder with 2N3904 Transistor and 10 K resistor. Same result. Also I have replaced old HT12E and HT12D with New pair. Same result. When I ground the TE Pin & AD8 of HT12E, the voltage on the pins of HT12E:

AD8 : -0.02
AD9 : 0.25
AD10: 0.25
AD11: 0.25
TE : 0.30

That result pattern is consistent with the link in Post#8, but the voltages are lower than I would expect them to be from the datasheet, if they were measured open circuit. Remember, each data pin can only source 1.6 mA max. That is why the reference I gave uses a transistor at each data pin to drive the LED's.

In sum, it seems there are two problems:
1) Is the pattern correct?
2) Is the pattern consistent?

Let's assume the pattern is correct, then the solution is simply to use normally closed switches on the encoder or invert the data output.

What about #2? First, I think the power supply and decoupling capacitors should be retained until you have it working 100% all the time. Can there be a connection between #1 and #2? Pulling too much current from the outputs could lead to unpredictable results. What current are your LED's rated at? Running them without a resistor would tend to make the 12D act as the current limiter, which may not be good. Try a resistor based on: (4.5V - Vf of the LED)/1.5 mA = R ≈ 2K. Your LED's may not glow brightly with that, so then use a transistor.

Please confirm whether the problem is the pattern of data or inconsistent results or both.

John
 
Last edited:

John, Now I connected 4 switches on AD8, AD9, AD10 and AD11 of HT12E. The result is almost OK. If I pressed S1, the corresponding pin (D8) of Decoder correctly switched-off and all other LEDs glow. But, If I press same switch (Say "S1") the same result. That is, I have to press many times to switch-on or switch-off LED. If I press "S2", then no problem. D9 LED glow and D8 Switched-off correctly with one press. This is happened to all Switch. Why?
 

If I understand you, it seems everything is working OK, except there is a latching problem. That is, once you turn off one LED, it stays off until you press its switch multiple times in a non-reproducible pattern or you press another switch. If pressing the other switch is very reproducible, then it is almost certainly the latch function of the outputs. Going back to your schematic (Post#'8'), the only way you can transmit is to press a data switch. Add a switch from TE directly to ground. Then you should be able to transmit a"clear" (i.e., all switches open).

Now, why do multiple presses of "S1" sometimes turn its LED on? My guess is that you have significant switch bounce and one of the bounces just happened to hit the timing correctly to give a null transmit. Let's get it working first and not worry about artifacts.

BTW, do you know how to turn off smilies so "D8" will show like it is intended and not like :cool: ?
John
 

Yes. You understand the problem correctly. I have connected the Switch to TE thro' diode as mentioned in the circuit diagram. Should I connect TE Directly to GND using Switch (NOT thro' AD Switches)? Am I right?

Note: I turned off Smilies in Text.
 

Yes, wire a switch from TE directly to ground. As it is wired on the schematic, the only way to transmit is to press one of the data switches and send data. You want to transmit with all switches high, 1111.

John
 

I have connected one extra switch between GND and TE pin of Encoder in order to send "clear" transmission. It works almost fine. Sometimes, the switches take two or three times to switch-off. As you guess, The data latching problem occurs. Is there any way to solve the data latching issue? Thanks.
 

So far as I know, latching outputs are a characteristic of that chip. It is shown that way in the block diagram and described on page 5 of the datasheet. You might use another chip as a one-shot, for example a NE555, or a microcontroller to send a "clear" when the button is released, but that is added circuitry. There are also other encoder/decoder pairs that may not latch.

John
 

What I actually want is to switch on and off the relay (+5v) thro' wireless. How can I achieve this? Now, the wireless unit works good but looks inconsistent. Some time works in a single press and sometimes it requires more than 2 or 3 key press. This is not good for practical application. Any idea?
 

In order to drive a relay, you will need to use a transistor switch from the data line. In post#8 you will see how the Vt is wired with a resistor to a NPN transistor sinking current from an LED. I think you should always use a transistor to drive any load from the data pins. The link I gave (unfortunately, it didn't quite copy correctly and is not exactly what I thought it was linking to) states emphatically:
The receiver section is incredibly simple, but you need to remember that you can't drive just any load directly from the output pins of the HT-12D. Quite a few people have tried to directly connect relays, LEDs, solenoids, and just about everything else you could imagine to the data outputs directly, and found out the hard-way that it simply doesn't work.

The data output pins of the HT-12D decoder IC, D0 to D3 will source/sink only 1.6mA @5V. While not quite enough to drive an LED or relay, this is more than enough to drive a transistor or the ULN2803 high-current darlington transistor array.

Tip: One thing to remember about the HT-12D data outputs is that when the receiver circuit is first powered-up, the data output pins default logic state will be logic 0. When the HT-12D receives its first valid transmission each data output will then go to whatever logic state is on the encoder IC (HT-12A) data pins.

One of your problems may still be that you are trying to over drive the data pins. It could also be cheap switches that aren't working reliably at such low currents or even breadboard problems.

I have to run again, but if you need the transistor circuit, I will draw it when I get back home. Basically, it's data ppin to resistor to transistor base. Transistor collector to relay coil. Transistor emitter to ground. Other relay lead to your +5V supply. Put a diode across the relay coil with the band at the positive terminal. That is to protect from inductive spikes. The base resistor can be calculated knowing your transistor and the relay's coil current. Not knowing those, try something around 1K.

John
 

Finally, I can give you the correct picture of my problem. That is, I have connected 4 switches on (AD8 - AD11) HT12E and 4 LEDs to the corresponding pins (D8 - D11) on HT12D. If I press "S1" (AD8), HT12E send the data as "0111". So, LED (D8) lights-off and remaining 3 LEDs (D9 - D11) light-on. If I press "S2", HT12E send the data as "1011" and so on. That is, Every time I press the new switch, new data arrives at HT12D so it acts perfectly. If I press same switch, there is no change in data input. So, it remains stayed the status where the LED it was. What I actually want is, I have to use only single button to switch-on/off the relay thro' wireless transmitter. How can I send different data ("0" or "1") using only one switch. If it can be possible, my problem will be solved. Plz.
 
Last edited:

I am pretty sure you can do it with a 555 as an oscillator (or other oscillator) rigged to repeatedly trigger the TE pin. Two 555's in some sort of monostable configuration might be "prettier." Can you get 555's? Have you used them before? How much time do you have? Have you solved the inverted logic (press button, LED goes out)? Will that affect what you want to do with the relay? Are you more comfortable with a microcontroller solution?

What is this thing for? Is it a one time device, like for school? How long after you release the button can you wait before the relay changes states? Most important, what was the problem that took you from this morning's "almost works" to "it now works perfectly." Was it just a faulty switch?

John
 

I have not used 555 IC yet. So, I have to study the datasheet and try to implement in my project.

Have you solved the inverted logic (press button, LED goes out)?

I cannot understand this. Can you please explain in detail. Now, I have decided to use the momentary output (VT) pin of Decoder. That is, I like to connect VT pin output to Interrupt pin (INT1) of PIC18F452 MCU. I have set the INT1 pin on PIC raising edge detect as follows:


Code C - [expand]
1
INTCON2bits.INTEDG1 = 1;



It detects the change if + power supply found on the pin. I have tested this by giving +5v power supply directly to the pin. But, When I connect the VT pin to this INT1 (RB1) pin, It did not capture the interrupt. I put LED in between PIC INT1 pin and VT Pin to know the power passes to the RB1 pin. It also did not glow. But, If I only place the LED between VT and GND, the LED glows. I want to know how to connect the VT pin to RB1(INT1) and capture the Interrupt. Pl help me. Thanks.
 

Once again thanks a lot John. Now, I have successfully interfaced the Wireless Receiver to PIC18F452 using VT pin of Decoder HT12D. I have used momentary output pin (VT) for trigger the INT1(RB1) pin of PIC MCU. Still, I have not find the solution to use data pins of Decoder to connect to PIC. If possible, pl help me. It will be helpful in the near future. Huge Thanks for your timely response and help to finish my project.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top