Radio Control Demystification Anyone?

Status
Not open for further replies.

Peter_wadley

New Member
Hi all,

Ive been researching Radio Frequency and Radio Control for the last couple of weeks and am looking for a couple answers and Opinions not found on google.

Basically I just finished making a PIC1684a door locker/unlocker...

The project was made so that I can simply and remotely trigger the circuit to lock/unlock my door..

Right now, it is setup in the following way:

-The PIC sits in an endless loop waiting for the trigger...

-The trigger is a light detecting comparator circuit made for a LM358 opamp

-Light is shone on the photo transistor and the comparator threshold voltage drops.. making the opamp output go HIGH..

-This HIGH signal is picked up by the PIC which goes into another endless loop, which waits until the light is shone away.. once this occurs the PIC pulses one of its outputs 60 times.. turning a small stepper motor a little over90degrees (I found that exactly 90degree (50 steps) sometimes does not turn the locking mechanism enough)

-The Pulses are turned into 1.8 degree steps and driven by a BIPOLAR stepper motor driving chip, the MC3479.

-The lock is now either open or close.

-The PIC then toggles an output, which changes the direction for the next turn.

-The PIC also turns the MC3479 off via NPN transistor.. saving power and allowing the stepper motor to turn freely (Ie when the knob is turned)

The above information is to give others idea..

Now then, Questions:

1) The photo transistor is easily falsely triggered by ambient light.. I REALLY REALLY want to work with radio control..

Can I make a radio (FM?) transmitter and Reciever that can control 1!!! PIC input On and off?

NO MODULATION NEEDED!! ALL ITS GOTTA SAY IS " HEY PIC OUPUT TURN THE HECK ON" or "HEY PIC OUTPUT TURN THE HECK OFF"

OR

Do I NEED to purchase premade transmitters and recievers?

**broken link removed**

I live in Canada.. as most of you no from my last thread

Can you recommend a CHEAP place or website to buy these?

2) Can I put the PIC into SLEEP then WAKE it up each time it is subjected to the trigger? Will this save any power at all? Do I need to use a Interupt to wake it up?

Thanks alot,
 
You NEED modulation, and to do the job properly - check my tutorials which have both RF and IR examples which would both do your requirement perfectly.

Basically you've designed it completely wrongly, with no regard for how it should be done - if you want to use IR (and it's perfectly fine), use 38KHz modulation and digital coding, and a standard IR receiver IC.
 

Considering I didnt even know what a transistor was 3 months ago, and that is not at all an exaggeration.. I think i am doing a pretty damn good job on designing circuits..

Are you saying the ENTIRE circuit is completely wrong ? It opens the door without me having to get up.. its a success in my opinion..

The only area that is weak is the communications...

Which IR IC should I get?

Where can I get the IC reciever? My electonics store does not carry any.

Do you think **broken link removed** will work? The only thing that conserns me is the inductor.
 
Brevor said:
http://www.abacomdirect.com/
These are made in Toronto.
Maybe you could go buy them in person and get some free advice.

Thanks Brevor I will contact this company.. There prices are very high however.

Nigel, I just looked up your IR tutorial again and remember why I didnt go through with it -the code seems VERY tedious/lengthy just to turn a PIC input on and off.
 
Peter. IR encoding can be as simple as starting a PIC's PWM output at the desired frequency (around 38khz) and then turning the PWM output on and off to modulate, which can be done with a 2nd timer. A detector can be a simple filter (no pic needed) fed directly into a digital I/O line of any type of device. The bulk of the code on Nigel's site is for the communication protocol and LCD interface.
 

You did not state the range you were looking for.
I have been using both RC micro cars and remote door bells as cheap and effective remote controls for digital cameras. There are no reason why they could not control a PIC. Take a look:
https://www.pbase.com/sinoline/rf_remote_control_for_d7xx
https://www.pbase.com/sinoline/rf_remote_new_model
You are doing fantastic in you electronic endeavor; there are usually many ways to achieve a certain goal and usually not any one is the absolute best, so don't let any of the rude so called experts discourage you!
 

Thanks for the encouragement Rolf!

You have a great collection of electronics! Thanks for sharing them!

there are usually many ways to achieve a certain goal and usually not any one is the absolute best

I completely agree with that.

Here are some pictures of the circuit..

Keep in mind that it was made from scratch today and is no where near complete.

I will repost pics after I sort out this communication problem aswell as make the PCB and placed it in its enclosure.

Pictures:

I used steel strapping to keep the motor in place.

The black piece used to attach the blank shaft of the stepper to the locking mechanism was made out of the same steel strapping .. i used black shrink wrap to ensure the strapping does not scratch the door knob.

The black piece was then bonded using Lepage Expoxy #11

Top chip = LM358n
Middle = PIC16f84a
Bottom = MC3478
Stepper motor = bipolar
Power supply is 12v wall wart.

You can see the photo transistor at top.. it is clear.

The red LED turns on when photo transistor is subjected to light. (Just an indicator)

The green LED lets you know when the door is unlocked.

I guess radio control would be over kill for this.. the range needed is at most 20 ft.

I would use like to use IR but the modulation is throwing me off.
 

Attachments

  • PC300004.JPG
    367.5 KB · Views: 162
  • PC300006.JPG
    356.8 KB · Views: 141
  • PC300007.JPG
    438.9 KB · Views: 142
  • PC300008.JPG
    467.4 KB · Views: 149
  • PC300009.JPG
    337.1 KB · Views: 138
  • PC300010.JPG
    332.5 KB · Views: 137
  • PC300011.JPG
    318.1 KB · Views: 146
Ok,

Nigel, after re-re-reading your IR tutorial, it doesnt seem that difficult at all.

Constuctive feedback: Possibly consider making the FIRST sample code just the bare bones of IR communication.. it makes it all the much harder decipher what is LCD code and what is IR code...

From what I have read at your site and others..

I need:

**broken link removed**

I just had one but I couldnt figure out the pinout, so I chucked it I went back to my electronics store but of course the owner didnt even know how to hook it up

The source, canadas equivilent to Radio Shack, doesnt seem to carry them either..

On monday I think I will go back to the store and ask the owner to call the head office for the pin out then buy another one..

So, if this is right :|, I will hook one of the three legs to GND and one to 3.3 or 5v (which?) I think I may have burned the other out with 5v..

ok the part I dont really get..

To send the modulated data.. I just use a PIC to blink an IR LED off and on at 38 000 times per second - right? :|

Then to code the 38khz signal I just turn it off (0) and on (1) for a certain amount of time.. right? am i getting this?

Then the 38khz detector will capture this from the IR LED and send it on its data line into ANOTHER PIC which will some how decode it into 1's and 0's then take action when the code is correct?

Thanks
 
Those kinds of modules are usually 5 volt. It's just like using a photo transistor except it only signals 1 or 0 when it detects the modulated light, which makes it harder to false trigger from ambient lightning. A non modulated IR receiver will trigger on all manner of light sources. They work exceptionally well and are very simple for on and off, or low bit rate data transfer, they're usually limited to between 2400 and 9600 baud. The center frequency has quiet a bit of leeway.
 
Depends on ambient light conditions, while the modulation makes them more or less immune to ambient light falsly triggering them it doesn't eliminate the 'DC bias' that it introduces. If the IR LED isn't bright enough to overcome the ambient conditions the receiver won't be able to detect it even if it is modulated properly. So range is pretty much limited to how big an IR array you put on the transmitter and line of site, an IR laser could probably trigger one at a distance of a few thousand feet at night.
 
Peter_wadley said:
Ok,

Nigel, after re-re-reading your IR tutorial, it doesnt seem that difficult at all.

It's not, it's just the initial idea which is hard to understand.

Constuctive feedback: Possibly consider making the FIRST sample code just the bare bones of IR communication.. it makes it all the much harder decipher what is LCD code and what is IR code...

The tutorials follow on, the LCD code is explained earlier.

From what I have read at your site and others..

I need:

**broken link removed**

That looks fine!.


Read and understand my tutorial, you need to understand the basic premise of how it works - the 38KHz is really a layer above what you need to understand, the receiver strips it off.
 
I just read throught this .PDF

Its from the Microchip site.

I think I understand IR Modulation now.

But just so I am sure..

The 38khz carrier signal is used so the reciever module can filter out ambient light and ambient signals right?

How sensitive is the module regarding carrier frequency? would it work properly if the carrier was lets say 32 khz (random number)

and lastly,

The 38khz module will only respond to a signal that is running at 38khz.. when this requirement is met the module outputs digital signals (0's and 1's) which the pic can directly decode. right?

Thanks again for helping out.
PW
 
38khz is approximate, it really depends on the number of poles and type of filter the module uses. The closer you are to the frequency the module uses though the better your results are gonig to be. How bad they are as you stray is really module and environment dependant, try it and find out.
 
Peter_wadley said:
I just read throught this .PDF

Its from the Microchip site.

I think I understand IR Modulation now.

But just so I am sure..

The 38khz carrier signal is used so the reciever module can filter out ambient light and ambient signals right?

Yes, and also the AC coupling prevents (or at least greatly reduces) bright light swamping the receiver.

How sensitive is the module regarding carrier frequency? would it work properly if the carrier was lets say 32 khz (random number)

In my experience they aren't very critical at all, but if you really want maximum possible range, then you should be as accurate as you can - but it's dead simple to generate an accurate 38KHz in software, even with only a 4MHz clock.

The 38khz module will only respond to a signal that is running at 38khz.. when this requirement is met the module outputs digital signals (0's and 1's) which the pic can directly decode. right?

Yes, but bear in mind that the pulses aren't exactly the same width as those fed to the transmitter - which is why you need suitable coding schemes.
 

I'll post my finding as soon as its done

I just emailed the head office of my local electronic store and they told me to check the internet for the datasheet.. they do not have it

Sure that would be all find and dandy but the IC doesnt even have a serial number or anything

How the hell can you sell something you know absolutly nothing about! rubbish.

Edit: Are there any tests I can preform on the chip to find the correct pinout?
 
Peter_wadley said:
How the hell can you sell something you know absolutly nothing about! rubbish.

More to the point, why would you BUY something wthout any information?.
 
Peter, do a Google Image search for IR module, there are pin outs for three common modules. Pick one that looks most like yours. The big thing you want to look out for I think is connecting the power in reverse, use resistors to limit current and you should be able to figure it out. Make sure you test it on a clean power supply though these modules are prone to noise on the power line.
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…