Shop OBEX P1 Docs P2 Docs Learn Events
Propeller resetting in race environment — Parallax Forums

Propeller resetting in race environment

JavalinJavalin Posts: 892
edited 2007-04-26 12:22 in Propeller 1
Hello all,

A question.

I have a propeller on a SMT pcb which is being used for data-capture and display within a race environment.· The circuit/code works fine when in the house, or connected to the car.· When the car is started the propeller starts to reset continuely.

The prop is in its own grounded box.· It is running of its own battery.

The problem goes away when you disconnect the RES, P30,P31 hookup to an external connector.

I've tried a 1k and 5k resistor pull-up/down on the RES line (cannot remember which way off hand) to see if its a "floating" issue.

Any other ideas?

Cheers,

James

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2007-04-14 20:16
    You're probably getting noise coming in on some of the sensor lines. Also, you may get noise induced on the RES/P30/P31 lines. For a start, use a 4.7K pullup on any or all of those lines. You could put ferrite beads over all the lines coming into the box. In a racing environment, you're not going to have the same kind of electrical noise filtering that is normal in a conventional automobile. You may have all kinds of noise spikes induced in wiring harnesses including huge ones induced from the ignition system. Basically, treat all of the wires going through the box wall as sources of noise until proven otherwise.

    If the battery is not inside the box as well, you'll need to filter those leads with chokes, small (0.1uF) and large (100uF) capacitors, ferrite beads, etc.
    Shielded cables are not a bad idea.
  • JavalinJavalin Posts: 892
    edited 2007-04-14 21:15
    Hi Mike,

    thanks for the reply!

    We have shielded cables - found that one last year!! I'll try the pull ups/downs and a choke or two for the next race.

    Thanks!

    james
  • JavalinJavalin Posts: 892
    edited 2007-04-16 08:44
    Mike,

    any suggestions as to the values to use for the ferrite beads?

    Looking at RS components (UK) they seem to be a frequency (25mhz) and a ohm type value (68 ohm) and a material type. Do you know of any simple guides to useage of

    Would you put a bead on each wire, or one per group. I.e. one for rpm hookup, one for programming header (P31,P30,GND,RES), etc, etc.

    James
  • BTXBTX Posts: 674
    edited 2007-04-16 12:00
    Javalin.

    I suppose that you have optoisolated all the lines that goes from the board to the sensors ?

    If not, that's could be the problem.

    If you've the board with his own box...you mean grounded it (where ?), or·a Faraday box ?

    Make a Faraday box, and NOT connect it to the vehicle ground, also don't ground it to the peopeller ground, then the sensors wires must be shielded, and the outs from the box with ferrite breads.

    I think that will solution the problem.

    Good luck !

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Regards.

    Alberto.
  • tekochiptekochip Posts: 56
    edited 2007-04-16 13:26
    I've had the same problem on my board using the serial connection for debugging, instead of the USB.

    http://www.parallax.com/dl/docs/prod/prop/SerialtoPropeller.pdf.

    It's so sensitive that simply getting out of my chair near the circuit board makes it reset because of the discharge to my chair seat.· Removing the serial cable makes the problem go away, so I'm certain it's the way Reset is handled.· I haven't dug into it because in the real application the serial cable won't be used, but I have noticed that grounding the serial cable shield helps.
    ·
  • BTXBTX Posts: 674
    edited 2007-04-16 14:22
    tekochip.

    In those cases I use optoisolated RS232 lines, and no more problems then.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Regards.

    Alberto.
  • JavalinJavalin Posts: 892
    edited 2007-04-16 14:51
    BTX, tekochip,

    the box is essentially a grounded faraday type cage. The box has to be grounded to the chassy as it has a common ground with some video camera's, which runs off the car battery.

    The rs232 shields are already grounded. The sensors are shielded and contained within shields as best as possible.

    Im looking into the ferrite beads - if not i'll have to loose the ability to re-program the box while "in" the car body by disconnecting the RES

    Bizzarly the sensors work fine without any existing EMI shielding - bar the shielded cables mentioned above. Its just the reset of the processor.

    Cheers,

    James
  • BTXBTX Posts: 674
    edited 2007-04-16 15:25
    Javalin.
    You're supposing that the propellers resets due the RES pin...perhaps that is not true, and you've a lot of moise causing a reset NOT in the RES pin.
    I think the best you've there is a dedicated power supply for the pchip, but if you don't optoisolated all, then ie: the camera wire gnd will be a big antenna for that, and also the sensors wires, altough you use a shield, and is poor !!

    Power the camera with his own battery or the car battery, optoisolated the video input in the board, optoisolate all sensors and the serial comnunication, and forget all problems.

    Don't ground the Faraday box !! isolated it from the car gnd !! only put a 0.001 uF with a 2.2 Mohm in parallel with it, and connect it to the 'box' and to the propeller gnd in the another side.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Regards.

    Alberto.
  • JavalinJavalin Posts: 892
    edited 2007-04-16 15:37
    Hi,

    Yeah, but it all works fine when you take off JUST the programming header (P30,P31,RES,GND). That is with the camera's, rpm, pedals etc, the box grounded etc. I suspect (though haven't tried) that if I cut the RES wire to the external connector it would still work fine. Only issue is then i loose the ability to re-program without disassembling the car and box.

    I dont have the money to remake the pcb and to edit the board to opto-isolate and don't want to end up with lots of seperate pcb's as then you'll get reliability issues.

    I suspect the 4.7k pull up/downs and ferrite choke will solve it. The RES line is only held high/low by a very weak internal resistor to the chip - so adding a meter or so of wire acts as a fantasic antenna!

    If not - i'll likely loose/seperate the RES pin and just re-connect when required.

    Cheers

    James
  • M. K. BorriM. K. Borri Posts: 279
    edited 2007-04-16 15:48
    I had a similar problem and ended up putting a 1 Farad DLC as a bypass cap for the Prop, it helped. (Yeah it's probably overkill, but you can get DLCs for $5 now)
  • JavalinJavalin Posts: 892
    edited 2007-04-16 15:50
    Also, forgot to mention - i've tried the board with combinations of cables attached - the only one that made and difference was the programming header......
  • tekochiptekochip Posts: 56
    edited 2007-04-16 16:05
    As a quick test I added a .01uF capacitor from DTR to ground and all my problems went away. I can shock the board with my finger (expensive test equipment) and it doesn't crash. I nicer RC filter would be better, of course, but give it a quick try, it worked well for me.
  • Paul BakerPaul Baker Posts: 6,351
    edited 2007-04-16 17:12
    James, have you tried recessing the header and placing a metal cap into the opening so that it becomes part of the faraday cage with the header fully inside?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Paul Baker
    Propeller Applications Engineer

    Parallax, Inc.
  • mirrormirror Posts: 322
    edited 2007-04-16 22:25
    Yeah, but it all works fine when you take off JUST the programming header (P30,P31,RES,GND). That is with the camera's, rpm, pedals etc, the box grounded etc. I suspect (though haven't tried) that if I cut the RES wire to the external connector it would still work fine. Only issue is then i loose the ability to re-program without disassembling the car and box.
    I think your observations are probably spot on. The Propeller seems to only need a very short pulse on the reset pin to cause it to reset. I'd suggest putting a filter/delay on the reset line, but·the Propeller·Tool expects the device to come out of reset a rather specific amount of time after the reset. If you put in too much filtering/delay, then the Propeller Tool wont see the device.

    As to the faraday shield etc - It seems you've done some testing, and the single problem is the reset line - I'm prepared to believe your observation.

    Here's my contribution. Add in·some bootloader / reprogramming software to your code. The EEPROM is not used while the Propeller is running, so it is safe to reprogram. The only real catch is that you have to write your own programming tool. Oh well. Al least you don't have to do any soldering. You can cut the reset line·once you've got your initial version of software loaded.
  • JavalinJavalin Posts: 892
    edited 2007-04-17 14:32
    Hi Paul, all,

    Thanks for the responses all. I've ordered some (lots of guess work) ferrite beads for this weekends race. We'll also try to make a metal cap on the db9 connector and do some testing.

    I'll post an update after the weekend.

    Cheers

    James
  • rjo_rjo_ Posts: 1,825
    edited 2007-04-18 03:29
    You might be draining your prop...

    I'd look at the grounds...

    go opto on everything.


    Rich
  • JavalinJavalin Posts: 892
    edited 2007-04-26 08:33
    Hello all,

    Update:

    Well ran at the weekend at Cadwell (in North-ish UK) - nice little circuit at the bottom of a valley! Bugger to cycle round but thats another story!

    Tried running the car engine in the garage with a makeshift cover for the programming DB9 (serial) connector which seemed to solve the problem. However on the first test session, you could see the prop rebooting (it has external LED sequences) as the car started / revved.

    For the second session I took the decision to cut the RES connector off from the programming DB9 connector - this solved the reboots but enough noise is present (comming to this bit in a tick) to cause the prop to log data with some gaps - assuming enough "serial" data seen to slow it all down...?

    Problem again solved with disconnecting the header completely - so a usefull exercise.

    With regard to the noise - we have a lipo battery exernally now (for ease of change) - and I can see on the data 1v transients as Mike mentioned above. Some shielding required - but usefull to be able to "see" noise.

    Plans:
    1) Use a VGA extension cable (its double shielded and has built in ferrite) to run the pins to the control box.
    2) Fully resess and cover the external connectors so when not in use!

    Will keep updates comming.

    James
  • QuattroRS4QuattroRS4 Posts: 916
    edited 2007-04-26 12:22
    Javalin,
    What type of filtering are you using on your i/o's ? I ask this because I have used 'DSS31055y5S223Z50' murata items
    (Radionics Part No.: 202-3471) in noisy environments with serial connections - and they have negated any nuisance noise..

    I place these in line with the supply and any I/O lines ... might be worth a look...I have attached a pdf . There are various versions available..

    Regards,
    Quattro

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    'Necessity is the mother of invention'

    Post Edited (QuattroRS4) : 4/26/2007 2:45:54 PM GMT
Sign In or Register to comment.