Electrical noise problem with PIC 16f84


Closed Thread
Results 1 to 12 of 12
  1. #1
    Join Date
    Apr 2007
    Location
    Southern Ontario
    Posts
    50

    Default Electrical noise problem with PIC 16f84

    If you look at my other threads you can see I am working on a slot car timer. basically I trip an IR beam through a photo transistor and this allows positive voltage to pass to the pin which I programed to turn on a led when the pin is high. This worked great on the bench but when I installed it in the track the led light flickers on when ever you rev up the car. I am not one to go racing to this forum at the first sign of trouble so I have been working on this for a week now and can not figure it out I have removed the IR circuit from the equation as well as plugged the track and pic into separate wall hydro lines. There is no connection between the track and the PIC ( I now trigger the led with a switch when it is off the light will flicker from the car). It only does it with high pitched whining cars (the really fast ones). This might be EMI or a grounding problem. Could programming be the problem? Is this common with small 20 volt dc motors?
    Any help is much apreciated.
    Thank you
    Snap
    Beer is proof that God loves us and wants us to be happy.

  2. #2
    Join Date
    Apr 2007
    Location
    Southern Ontario
    Posts
    50


    Did you find this post helpful? Yes | No

    Exclamation Wait to reply

    I was almost asleep and I remembered I have to check the programing I think in my haste I left some pins hanging with out pull resistors. This might make the unit very sensative to static or sound. Ill check tomorrow....back to sleep
    Snap
    Beer is proof that God loves us and wants us to be happy.

  3. #3
    Join Date
    Apr 2007
    Location
    Southern Ontario
    Posts
    50


    Did you find this post helpful? Yes | No

    Default I think I got it

    Ok, I cleaned up the program and pulled the input. This DID not work!, so I started to play around with different resistors and finally I think it works now. The pull down resistor was very big 197k and I did not put a pot on the IR detect. I will learn more about what happened suffice to say an off balance input pin is very suseptable to electric noise. Next time I will post a full schematic and program.
    Beer is proof that God loves us and wants us to be happy.

  4. #4
    Join Date
    Apr 2007
    Location
    Southern Ontario
    Posts
    50


    Did you find this post helpful? Yes | No

    Default It did not work!

    I can still get the light to flicker with DC motor noise. I give up. I hate electronics . I am going to be a carpenter and make matchstick rocking chairs.
    Beer is proof that God loves us and wants us to be happy.

  5. #5
    Join Date
    Jan 2006
    Location
    Istanbul
    Posts
    1,185


    Did you find this post helpful? Yes | No

    Default

    Put 0.01uF/275V X2 type capacitor across the motor terminals.

    =========================
    "If the Earth were a single state, Istanbul would be its capital." Napoleon Bonaparte

  6. #6
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Snap View Post
    I can still get the light to flicker with DC motor noise. I give up. I hate electronics . I am going to be a carpenter and make matchstick rocking chairs.
    Yeah, and then you will want to automate the process with a PIC.

    I bet when you "rev" one of these cars you can here it on a radio and see it on a TV.

    The amount of current going through these motors will also produce a far amount of EMF.
    All of this you know.

    Faraday Cage = Coffee Can

    Place the circuit board inside a coffee can with the open end pointing away from the race track.

    I say this because it is made of steel. Aluminum will work for RF, steel will work for RF and EMF.

    This should route the RF and EMF around the PIC. For the same reason I use only steel enclosures around projects that will be in machine/welding shops.

    Also, a capacitor to ground from the IR pin may help act as an RF filter.
    Dave
    Always wear safety glasses while programming.

  7. #7
    Join Date
    Apr 2007
    Location
    Southern Ontario
    Posts
    50


    Did you find this post helpful? Yes | No

    Default Thank you for the help.

    I can't modify the cars so I tried to make a faraday cage with a king sized beer can. First I had to empty the can and several others in case I wrecked the first one cutting the top off.
    I put the bread board in the can and covered the other end with foil. I poked a small hole so i could see if the light flickered and to let the power and ir detect wires in and set it up.
    It seemed to make no difference what so ever.
    I was about to try grounding the can to a wire attached to the ground on the outlet and desided to try the other idea of a cap on the ir pin. This greatly reduced the flicker.
    I used a 10 uf electrolite cap.
    The project works well enough to move in and start programming reset buttond and relays to start and stop the cars.
    Thanks for the posts
    Beer is proof that God loves us and wants us to be happy.

  8. #8
    Join Date
    Jan 2006
    Location
    Istanbul
    Posts
    1,185


    Did you find this post helpful? Yes | No

    Default

    What about the cap accross the motor terminals?

    Didn't you put one?


    ----------------------------------
    "If the Earth were a single state, Istanbul would be its capital." Napoleon Bonaparte

  9. #9
    Join Date
    Apr 2007
    Location
    Southern Ontario
    Posts
    50


    Did you find this post helpful? Yes | No

    Default cap on motor

    Thanks for the advice but these are vintage collector HO scale slot cars and I own about a hundred of them. I can't modify them.
    Snap
    Beer is proof that God loves us and wants us to be happy.

  10. #10
    Join Date
    Apr 2007
    Location
    Southern Ontario
    Posts
    50


    Did you find this post helpful? Yes | No

    Smile I think i got it!!!

    I tried everything I could think of, coffee can, caps on inputs and even caps on the rails them selves each one hellped a little bit more but not 100%. Finally I found another person who had the same problem. he suggested all the things I tried as well as explaining that the spikes were way faster then the cars. I programmed in a 7 us delay after the first signal is recieved and then wait and see if it is still there after and it worked. I could even take the board out of the coffee can. I am learning a schematic cad program and will post everything when I am done. Thanks to everyone who helped I am adding a relay start and programmed sound so Im sure I will be back .
    Snap
    Beer is proof that God loves us and wants us to be happy.

  11. #11
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Thumbs up

    Nice solution!
    Dave
    Always wear safety glasses while programming.

  12. #12
    Join Date
    Mar 2006
    Location
    Hyderabad (India)
    Posts
    123


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Snap View Post
    I can't modify the cars so I tried to make a faraday cage with a king sized beer can. First I had to empty the can and several others in case I wrecked the first one cutting the top off.
    I put the bread board in the can and covered the other end with foil. I poked a small hole so i could see if the light flickered and to let the power and ir detect wires in and set it up.
    It seemed to make no difference what so ever.
    I was about to try grounding the can to a wire attached to the ground on the outlet and desided to try the other idea of a cap on the ir pin. This greatly reduced the flicker.
    I used a 10 uf electrolite cap.
    The project works well enough to move in and start programming reset buttond and relays to start and stop the cars.
    Thanks for the posts
    Congrats-- But it is not proper to think like hating something, the moment it is teasing you. the challenge is only the to study, implement and overcome hurdles.

    Arts like carpentry etc are equally problematic to people like me - should have aptience and gain experience from failures

    All the best
    Regards,
    Sarma

Similar Threads

  1. SMS via pic
    By kenandere in forum GSM
    Replies: 15
    Last Post: - 10th March 2010, 10:00
  2. send data from VB 6 to PIC 16f84
    By win_832001 in forum Serial
    Replies: 2
    Last Post: - 9th March 2006, 14:21
  3. send serial data to PIC 16f84 ausing VB6
    By win_832001 in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 5th March 2006, 21:14
  4. how to send data from VB to PIC 16f84
    By win_832001 in forum Serial
    Replies: 0
    Last Post: - 25th February 2006, 16:15
  5. using PIC 16f84 at 315 MHZ
    By abood in forum Forum Requests
    Replies: 8
    Last Post: - 31st July 2005, 19:16

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts