View previous topic :: View next topic |
Author |
Message |
uneeb629
Joined: 21 Jun 2018 Posts: 3
|
PIC to PIC RF 433mhz working with LED not with Motor Driver |
Posted: Thu Jun 21, 2018 5:17 am |
|
|
Hello Sir, I have a difficulty in dealing with motor drivers from PIC to PIC. I have to PIC 16f877a one on a remote control having buttons other on a car having some sensors and L298N Module. Problem is checked my transmission on LEDs it works like a charm and when i mounted that pic on the car it fails to move the motors despite I have used motor drivers many time without wireless module. Although when I Program the car to move without module it works like a charm. There are no errors or circuit problems in both boards I have much experience in making them. Problem is with RF coding or RF reciving. Please can anyone help me. I cant drive the motors wireless but can run LEDs or even transfer strings or sensor readings. But when I try to run a motor it fails. What is the problem Can we drive PIC to PIC motors with RF 433 mhz. I had used both superhetrodyne receiver RX500 and other MK-XV-5v same results both work on LED not on motors |
|
|
temtronic
Joined: 01 Jul 2010 Posts: 9255 Location: Greensville,Ontario
|
|
Posted: Thu Jun 21, 2018 6:30 am |
|
|
From what I've read here and elsewhere those RF modules are a real pain to get functioning, that's one reason I bought the HC-12 modems. In less than 1/2 hr I had the greenhouse data being sent to my office.
This is one case where if you want reliable communications you have to pay for it.
You should check the 'code library' here, maybe someone has posted their working code. Also try Google "ccs c code rf433mhx" or something like that.
Jay |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19569
|
|
Posted: Thu Jun 21, 2018 6:46 am |
|
|
The comment that it works when there is no motor involved says one thing. Interference.
These are basic RF modules. No error checking or correction. You need to start by suppressing the interference from the motors, and then adding error checking to the code (belt & braces..). |
|
|
uneeb629
Joined: 21 Jun 2018 Posts: 3
|
|
Posted: Thu Jun 21, 2018 6:54 am |
|
|
Sir, But I have seen people driving motors from these modules as easily as I am turning on off LEDs. What you mean by interference ? I had tried L293D then I bought a L298N module, same problem. I had also tried darlington IC with RX pin input going to Rx pin of PIC still no effect. Will HC-12 work ? |
|
|
temtronic
Joined: 01 Jul 2010 Posts: 9255 Location: Greensville,Ontario
|
|
Posted: Thu Jun 21, 2018 11:38 am |
|
|
hmm, I kinda misread what you'd said and Mr. T is correct, noise from the motors is corrupting your wireless commands.
Since the wireless works for LEDS and the motors worked without RF modules, it does imply the motors ARE causing noise (EMI) that kills the wireless data.
You _might_ get lucky by putting 3 caps on each motor, say .1 mfd from +ve to motor terminal #1, cap from motor terminal #1 to terminal #2, and last cap from terminal #2 to gnd. NOTE: the value is a guess, maybe try 1 mfd or .01 mfd. Also use nonpolarized caps. You may also need to add additional caps to the PIC power supply, all I/O points of the PCB and the RF moduals as well.
Use Google to search for 'reducing motor noise' or similar, you'll get a LOT of hits.
While the HC-12s are fairly robust, you should always minimize all motor caused 'noise'. |
|
|
uneeb629
Joined: 21 Jun 2018 Posts: 3
|
|
Posted: Thu Jun 21, 2018 8:04 pm |
|
|
Hello sir, Regarding capacitors I have capacitors attached to main supply I.e 220uf, Currently I only have 220uf capcitors avaliable only I dont have 0.01mf or 0.1 mf will they do the task ? also have 22uf and 22pf as well, shall i try them ?
How can I upload images here? I am new to this forum, I show you my car.
What I understood is that connect 1 from positive supply of motor i.e 15v +ve to 1 let terminal A of motor then from terminal B of motor to ground ? Am i right ? |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19569
|
|
Posted: Fri Jun 22, 2018 1:02 am |
|
|
No.
Electrolytic capacitors have extremely poor HF (radio) performance.
This is why on standard supply decoupling, you will often see a 220uF with a separate 0.1uF 'in parallel'. The second capacitor is there to provide the high frequency performance the electrolytic lacks.
You should have a bag of literately hundreds of 0.1uF capacitors, and have one across every second chip on the board.
You can't use a large capacitor like 220uF across the motor. Especially since if the motor is reversible, you need an unpolarised capacitor.
You need better decoupling on the board itself, and motor decoupling to damp the arcs that will be occurring inside the motor as it spins. Your motor is currently acting as a 'spark gap' radio transmitter, and killing your radio comms....
Your 22pF will have better HF performance, but is too small to be much use.
Look at something like a PC motherboard. You will find all the IC's, and over at the supply the large electrolytic capacitors, but scattered across the board, dozens of small capacitors close to the chips. Manufacturers don't waste money/parts. These are _needed_. |
|
|
|