Jump to content
shadow_rusty

Arduino - Lost Connection With The Track

Recommended Posts

This issue has been very troublesome to find and fix.

Even now, it can still be an issue...

 

Here is some history from http://www.auslot.com/forums/index.php?/topic/12871-race-coordinator-software/page__view__findpost__p__230077

 

Had an interesting situation with my latest install...

 

 

Everything was up and running via arduino setup, and all seemed great.

Then we started running trucks, and RC kept losing connection to the arduino.

 

Checked all connections, and everything seemed to be ok.

Swapped out the arduino itself with a different brand one, and it all worked ok.

 

Turns out that the trucks (and most fly vehicles) have no noise suppression fitted, and the EMI from the truck motors was crashing the original Arduino.

 

 

Managed to resolve it though...

1. Fitted '104' ceramic caps (Same as on a SCX motor) accross the rails on each lane.

2. Fitted 200uF capacitor between ground and +5v on the Arduino to reduce brown outs.

3. Grounded an unused, but wired up, 4th lane input.

4. Fitted a ferrite core to the sensor harness.

 

 

Now the timing runs flawlessly back on the original Arduino...

 

 

Anyway, hope that helps someone else who may be having random issues with RC losing connection with the Arduino.

 

Note. This issue is in no way a problem with RC, and is an enviornmental issue with the Arduino itself.

 

Rusty I ran the Oz Rally on my Ardunio with no problems, may just be a problem with that particular board, or combination of that board and that PC.

But at least filtering it solved the problem.

 

With the signal interrupts you're getting, what PSU are you using on the Arduino? I got a few odd problems when I was using a crappy old mobile phone wallwart - seem to have cleared up since I went to a smoothed unit I dug up in my odds and sods box.

 

I am running my Ardunio with no external supply.

 

Interferance was most likely caused by the unfiltered truck motors as the light bridge is very close a braking zone.

I believe that a capacitor on the rails was probably all that was required, but put the rest in place anyway just to be sure...

 

When the issues were occurring, I switched to a different Arduino, and there were no issues.

Seems like this Arduino is just a little more sensitive that the other.

 

And like Phil, no power supply needed...

 

USB ports can easily deliver 500mA, and at worst, my rig is using 350mA.

 

Hi Rusty, with respect to "4. Fitted a ferrite core to the sensor harness.", how exactly did you do this?

 

I am seeing some false lap counts myself and since the Arduino doe snot have any input filters, I would like to add some noise suppression.

 

Greg are you using IR sensors or dead strips?

False lap count is usually caused by having a common earth and not using separate earth for each lane.

 

Hi Rusty, with respect to "4. Fitted a ferrite core to the sensor harness.", how exactly did you do this?

 

I am seeing some false lap counts myself and since the Arduino doe snot have any input filters, I would like to add some noise suppression.

Basically I used one of these at each end of the cable...

http://www.jaycar.co...w.asp?ID=LF1292

 

productLarge_1639.jpg

Share this post


Link to post
Share on other sites

Usually most time this problem can be fixed by adding the Ferrite Core and the small 104 capacitors.

I have posted Rusty's on other Forums and it seems to be the answer to the problem.

 

This problem seems more pronounced for those using Difalco controllers with blast relay.

Edited by kalbfellp

Phil

 

Hobart Miniature Car Club

 

Tassie Resins

 

Email

 

 

 

 

 

 

Logos%2016_17.small_zpswkcwjf0q.jpg

Share this post


Link to post
Share on other sites

Usually most time this problem can be fixed by adding the Ferrite Core and the small 104 capacitors.

I have posted Rusty's on other Forums and it seems to be the answer to the problem.

 

This problem seems more pronounced for those using Difalco controllers with blast relay.

I have a few cars that are worse than others.

Interestingly, one of them is a carrera with capacitors fitted to the motor.

 

Also, are the Difalco controllers mosfet (Pulse width modulated), or transistor (variable voltage)?

Share this post


Link to post
Share on other sites

Some more history on this issue...

 

'kalbfellp' Sent 17 January 2015 - 06:51 AM

The suggestion has been made on another forum that the USB chip on the generic boards might just be the problem.

 

Seems the USB chip varies from board to board. Do you know what chip is on the board you had problems with?

 

'Shadow_Rusty' Sent 19 January 2015 - 11:17 PM

I bought 3x Non Genuine Arduino's from Core Electronics.

 

There only one of these that I can get to at the moment, and it's not the 'faulty' one.

I believe that it is using a surface mount "Atmel Mega16U2" for the USB comms.

 

My brothers (MattB) Arduino is also a non genuine one, and it was rock solid on the track that had glitches.

After installing the capacitors and filters, the other 'faulty' one is now also flawless.

 

'MattB' Sent 31 January 2015 - 11:22 AM

The USB chip on mine is an Atmel Mega16U2, the other numbers on the chip are: 1416 PH and 3Y5368

 

http://www.atmel.com...ges/doc7799.pdf

 

'kalbfellp' Sent 31 January 2015 - 12:37 PM

Thanks Matt. But I think we may still not have found the problem.

I have loaned my Genuine board to Ben Murphy and he is having lost communication problems.

The board had been on one if my tracks for some months without any problems, unplugged and sent to Ben and now looses communication.

All we can do is keep documenting all the info and see if anything becomes apparent.

 

'Shadow_Rusty' Sent 31 January 2015 - 07:01 PM

It could be a USB chipset issue, and some boards are more prone to it.

It could also be that every track emits it's own unique electro mechanical field...

 

Still think that the biggest change for me was in adding the filter caps to each of the lanes...

 

'kalbfellp' 03 February 2015 - 09:41 AM, said:

I removed the USb cable I have been using to find that it has a ferrite core moulded on the end!

I now wonder if the has been the reason I never seem to hsve any problems.

 

'Shadow_Rusty' 03 February 2015 - 10:50 AM, said:

From memory, it's only the original era USB 2.0 cables that had Ferrite cores on them...

Whilst they may be helping, I'm more inclined to believe that some tracks are just more prone to interferance.

 

Cable routing under the track would also play a big part too.

 

Still it's very nice that a simple cap seems to fix the majority of the issue.

(I've seen it occur just once in 10+ nights racing since fitting the noise suppressing caps / ferrites).

 

'Shadow_Rusty' Sent 10 March 2015 - 10:54 AM

Had an SMS from another track owner who is now experiencing this issue.

It has run fine for Tony for several months. Ran a club meeting last Friday with minimal issues, but the following day, the Arduino keeps losing connections.

Now, this track currently does not have the noise caps fitted, and I've advised him to do so, so hopefully this fixes his issues too.

 

But, I did have another thought.

 

Phil K, are you using switchmode power supplies, or are you still using traditional transformer supplies?

Also, are you using the Jaycar sensors?

 

I'm wondering if it's the pulsing on the rails from the power supply affecting the cheap Jaycar Photo Transistors.

I also think that PWM controllers also seem to crash communications faster than transistor / resistor ones tend to do.

 

I do know that some motors are just 'noisier' than others.

My Parrallel port setup, and my Digital powerbase (in analog mode) will both 'glitch' and report a lap (with NO connection between the 2 systems, and at the same time no less, and usually for both lanes too), when certain cars are being driven.

 

'kalbfellp' Sent 10 March 2015 - 11:22 AM

We only use transformer regulated supplies.

Never thought about the power supplies,will start asking anyone having problems.

 

I have tried several sensors, original Dick Smith, Sharp ones I sourced from Syd in WA, and two unknow from Ebay. All work OK with no problems.

Peter McGill contacted me last week he is having communication problems some times,I sent him your info,so he is going to try one thing at a time.

He has a ferrite core USB cable so is fitting that and see if the problem re occurs.

If so he will then try the caps.

He only has the problem some times so it may take him a while to test. But he is prepared to be patient.

It would be great to find the actuall cause.

Share this post


Link to post
Share on other sites

'Shadow_Rusty' Sent 11 March 2015 - 09:03 AM

I do believe that it could very well be related to the SwitchMode power supplies.

 

I know Bob and Tony (Both Canberra), who were/are having issues, are both using a "PowerTech" (or rebadged) swithmode supply similar to the ones supplied by ArmchairRacer (http://www.armchairr...-25amp-0-16-vdc).

Phil (Canberra) also has the same supply, but isn't currently using it on his track, or using Arduino for inputs.

 

Matt (Canberra) is using a MrSlotcar provided supply (http://www.mrslotcar...5vdca-0-15-amps) but is currently using Parrallel port, not arduino.

 

I'm currently using my Scalextric APB in analog mode, which runs on 2x Scalextric 4A Switchmode supplies, and occasionally get 'glitch' laps as per above.

 

My dad (Canberra) is using 2x SCX kit switchmode supplies, also by parrallel port, but experiences the same glitching I do from time to time with laps triggered when not near the start line, usually on both lanes at ones, but only with some cars (unfiltered internally are worst).

 

Alistair (Canberra) also uses an Arduino setup, but I'm not too sure if he has already fitted Caps, or what power supply he is using.

 

Not too sure what power supply Ben (Goulburn) is using, but his issues were fixed by fitting the capacitors.

 

Interesting though that only some Arduino's are affected.

Nice though that I believe that it's the '104' 0.1uF capacitor accross the track rails that resolves it.

 

Also, do you have a Jaycar anywhere near you?

if so, can you please try a couple of their Phototransistors (http://www.jaycar.co...sistor/p/ZD1950)

If not, please let me know, and I'll send you a couple.

 

'kalbfellp' Sent 11 March 2015 - 11:48 PM

I have to call into Jaycar this week so will test a couple if their sensors.

Interesting thing is that Ben M was using one if my boards and sensor! I removed it from my rally track and sent it up to him.

I will ask about his supply.

 

'Shadow_Rusty' Sent 13 March 2015 - 09:14 AM

As Ben has indicated that he is using a transformer type supply, that doesn't leave a lot of variables...

 

One other alternative is that some PC's USB ports are more sensative to EMI than others.

 

On Bob's track, the PC (HP DC-7700) is on the floor under the track.

On Tony's track, the PC (Generic Parts Built Machine) is right next to the main straight.

On my Fathers track, the Laptop (Compac E500) is on the track table ~20cm from the track.

On my track, the Laptop (Compac E500) is on a shelf ~50cm above the track.

 

First 2 are Arduino, last 2 are Parrallel port, but do still get false lap glitches, which could be what is causing the issues with the Arduino's.

Both setups use the same 'Cat5' harness and Jaycar sensors.

Share this post


Link to post
Share on other sites

After months of trouble free operation, I started getting the glitch lap issue with a select few cars at home.

Previously, I had fitted a 0.1uF cap to each lane, but they were ~2 metres from the sensors.

So, I have fitted another 0.1uF cap, but this time, right next to the sensors, and the issue has now gone away again.

 

In total, my track now has 3x caps fitted to each lane under it.

1x 0.01uF at the powerbase track piece.

1x 0.1uF at the sensor track piece (next too the powerbase piece)

1x 0.1uF approximately 1/3 of the way round the track from the sensor track.

 

Also, my father has since upgraded his laptop and switched to an Arduino setup, and he has 1 car that will crash his arduino.

Interestingly, it's a carrera with the factory 3x filter caps fitted directly to the motor.

His track also has the caps fitted 1/2 way round the track from the sensors.

He has yet to either just add another next to the sensor, or move the existing ones.

 

---------------------------------------------

 

So, in summary...

  • At least 3x different brand Arduino's have had the issue.
  • Affects both laptops and desktop pc's.
  • Multiple brands of sensors have been tried.
  • Both switchmode and transformer type power supplies are affected.
  • Unfiltered motors are more likely to cause issues (fly truck seem the 'best' for causing this issue).
  • Fitting a 0.1uF (104) ceramic capacitor accross the rails near the sensors fixes this issue most of the time

Edited by shadow_rusty

Share this post


Link to post
Share on other sites

One very important thing that has been overlooked is that the " blast relay" does not have a " free wheeling diode" across the coil.

 

It is good electronics practice to fit these diodes to ANY relay coil. The diode is connected in reverse Across the coil,so and voltage generated by the collapsing coi is shorted does not feed into the circuit.

 

IMO all track relays should have these fitted, also fitting the diode across the controller plug should be close enough to the controller relay to work.

 

http://www.electrotechnik.net/2009/09/freewheeling-or-fly-back-diodes-and.html

Edited by kalbfellp

Phil

 

Hobart Miniature Car Club

 

Tassie Resins

 

Email

 

 

 

 

 

 

Logos%2016_17.small_zpswkcwjf0q.jpg

Share this post


Link to post
Share on other sites

Hi guys, I had this problem when developing the original arduino interface but only about 1 in 50 laps. I managed to debug the issue once and I was pretty sure it was noise on the usb, which seems to be a know issue with the usb interface. I found references to it happening in robotics and machining especially around motors, one suggestion to reproduce was stop and start an old drill the usb interface.

 

On my main track my issue went away when I switched to a longer powered 6m usb cable, so couldn't debug anymore. Another test track I built to test a standalone timer using deadstrip had the problem which allowed me to debug a little, here's what I found if it helps:-

 

1 - A decent shielded longer usb cable fixed it completely.

2 - a cap on the deadstrip helped

3 - different boards make no difference

4 - in standalone mode I never had an issue only when using usb

5 - moving pc away helped.

 

So my ideas to fix this which I haven't tried are:-

1 - put the arduino in a metal tin to shield it.

2 - ferrite core on usb

3 - check usb connector on board is shielded to gnd correctly.

 

Anyway hope that gives some pointers, if I can reproduce again I'll try some more things.

 

Kevin

Share this post


Link to post
Share on other sites

Still having issues here in Bonython. Phil ran my last round on his notebook, connected with a 2m USB. Wrapped the Arduino and isn in silver foil, and fitted some further electronics as well.

 

I've since moved the PC to the floor, though that is close to the Arduino. I noted the sub-woofer was under it too- not sure if that's the cause either.

 

Will test further during the week.

Share this post


Link to post
Share on other sites

@Difinity,

Have you tried a short usb cable?

I had this issue with a long cable and fixed it by powering the Arduino with a separate power supply. I could not move the PC closer.

 

Also check to make sure there is nothing conductive under the Arduino as even holding your hand under it can short pins and have unexpected results.


www.sydneyslotcars.com

Share this post


Link to post
Share on other sites

Lots of things have been tried to permanently resolve this issue.

 

 

Personally, I've tried all of the following, some with temporary results, some with no results.

  • short / long / thick / thin / ferrite filtered USB cables (Thick ferite cable seemed the best, but not really any difference).
  • Arduino powered from either the track power supply, the PC, and an external power supply.
  • ferrites on the power harnesses from the controllers to the relays.
  • ferrite on the sensor harness.
  • 104 cap (100nF) between the rails near the sensor
  • 104 cap (100nF) between the rails near the sensor and 50% round the track (Second best solution so far)
  • 104 cap (100nF) directly on affected motors (Best solution so far)
  • Tried both switchmode and analog power supplies
  • Tried both PWM, Diode, Resistor and transistor controllers (Whilst PWM are the most likely to cause the issue, all do cause it)
  • Tried lots of different motors (Unfiltered Fly 15k truck and SRP 16k motors seem the most likely to cause the issue)
  • Tried joining all of the ground planes (PC, Arduino, Track Power)
  • Tried different Arduino's (Some are definately more affected than others)

Annoyingly, the track that was most affected, is now working perfectly, so my testing is currently at a stand still.

 

 

I have noticed lately, that the USB socket on some arduino's can give a 'noisey' signal too.

Wobbling the plug arround was causing the relays to go nuts on my test setup, and that was with a high quality gold plated 1.2m usb cable.

Hmm, I wonder if Inox would fix that issue... lol.

 

 

The best fix is definately to fit a 104 cap (100nF) directly to the motor of the affected car itself.

This almost guarentees that the issue goes away, but it's obviously very hard to do when you have others bringing cars arround...

 

Keeping the braids clean and 'full' definately helps too...

Share this post


Link to post
Share on other sites

Oh, and my next test will be to fit a Scaley (Well Pioneer actually... Thanks Jules) digital 103 cap with it's ferrite (aka Ferite Man) between the sensor harness and the arduino.

 

Hopefully, this may reduce the 'noise' that is reaching the arduino causing the code (or usb chip) to crash.

 

 

 

May also test adding a 10ohm resistor between the sensor and the arduino to reduce the inrush current and voltage drop accross the sensor.

Edited by shadow_rusty

Share this post


Link to post
Share on other sites

Difinity seems to only be having problems when the controller relay and OR the lane relays operate,so I would have though the free wheeling diodes would have sorted it.

 

I agree with Rusty that so USB cables are very loose in the socket. I have found that good cables do seem to fit better.


Phil

 

Hobart Miniature Car Club

 

Tassie Resins

 

Email

 

 

 

 

 

 

Logos%2016_17.small_zpswkcwjf0q.jpg

Share this post


Link to post
Share on other sites

The arduino relay board on Difinity's track should already have the diodes fitted.

Also, as far as I'm aware, no one in that club uses blast relays.

 

QRPhil will be able to give a little more info as he has been helping Tony out with this issue...

 

 

It should also be mentioned that Tony's track ran really well up to the point his pc failed.

After that, these issues have started...

Share this post


Link to post
Share on other sites

Mine started to drop out before the HDD carked it, but was particularly difficult to get going after the PC was repaired. (Actually, what I did was remove the dead, obsolete HDD's). The only other issue I had was that I don't know enough about these things to fix them. Phil very kindly made a last minute dash across town before our last race. It had been not working for a couple of months before that. Just difficult to get the advice I needed, given people's various workloads.

I'm glad it seems to be working now though...

Share this post


Link to post
Share on other sites

Oh, and my next test will be to fit a Scaley (Well Pioneer actually... Thanks Jules) digital 103 cap with it's ferrite (aka Ferite Man) between the sensor harness and the arduino.

 

Hopefully, this may reduce the 'noise' that is reaching the arduino causing the code (or usb chip) to crash.

 

 

 

May also test adding a 10ohm resistor between the sensor and the arduino to reduce the inrush current and voltage drop accross the sensor.

Fitted the digital filter to each of the inputs of my current build for a friend...

The sensors still work with the filter fitted (as expected), so I will now have to see if he has any issues once the build is completed...

 

If this does indeed work properly, then there is going to be definate demand for these ferrite/cap filters...

 

 

ps. for those who are unaware, this is the 'ferrite man' that is fitted to most new scaley cars, all pioneers, and some slot.it's...

A lot of analog racers will have these in their parts box, having removed them from their cars...

gallery_11296_1731_27832.jpg

Share this post


Link to post
Share on other sites

those wee caps are cheap as chips, I bought 100 recently for less than the price of a decent coffee, and they were delivered from Thailand, the coffee is "pick-up" :)


Walks upright Unaided  *  Ties Own Shoelaces  *  Can Mispronounce Own Name In Five Languages  *  Mostly Aims Rattle Cans Away from Self
 My Track Oakland Raceway V2     Our Club  HMBRC     

Share this post


Link to post
Share on other sites

Yep, but finding the ferrite core in the right dimensions is not quite so easy...

Share this post


Link to post
Share on other sites

Michael, these ones any use ? - for 5mm cable, so would be a bit loose on some of the cheaper, small O.D. USB cables, good fit on better cables

http://www.ebay.com/itm/10-Pcs-Black-Clip-on-RFI-EMI-Core-Filter-Ferrite-Ferrites-For-5mm-Cable-/271805234800?hash=item3f48dabe70


Walks upright Unaided  *  Ties Own Shoelaces  *  Can Mispronounce Own Name In Five Languages  *  Mostly Aims Rattle Cans Away from Self
 My Track Oakland Raceway V2     Our Club  HMBRC     

Share this post


Link to post
Share on other sites

Are all the problematic setups using plastic track?

no, in fact I can't find a common denominator other than arduino running race coordinator.

Share this post


Link to post
Share on other sites

Michael, these ones any use ? - for 5mm cable, so would be a bit loose on some of the cheaper, small O.D. USB cables, good fit on better cables

http://www.ebay.com/itm/10-Pcs-Black-Clip-on-RFI-EMI-Core-Filter-Ferrite-Ferrites-For-5mm-Cable-/271805234800?hash=item3f48dabe70

they look like they would be close to the size of a stock ferrite fitted to early sub 2 cables.

They could also fit arround most harnesses too.

 

Not too sure of the added benefit, but they certainly can't hurt.

Share this post


Link to post
Share on other sites

Mark all the USB cables I use have that ferrite core fitted, simply because I had a supply of cables with cores fitted.

But I have only had one track with communication problems. Sorted with free wheeling diode and seperate grounds for the sensors.

We first thought it may have been the USB chip on some boards,but that has not proved to be the case.


Phil

 

Hobart Miniature Car Club

 

Tassie Resins

 

Email

 

 

 

 

 

 

Logos%2016_17.small_zpswkcwjf0q.jpg

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...