Disconnect the isolated programmer and the issues stop - Page 1
Forum section: electronics / beginners

author: Simon
author_rank: Unknown
timestamp: April 04, 2024, 05:59:54 pm
content: So, I have a machine with 2 motors and drivers for each. I have been running my machine under test carrying out final development. The machine is connected to my laptop by a kvaser isolated CAN bus adapter and an atmel ICE that I used this £20 isolator from digikey with to isolate it.As soon as my motors get a bit jumpy or even when all seems fairly smooth with no sudden speed changes (high Di/Dt) the whole thing shuts down. These are can open motor drivers, the DS402 state machine just goes right back to power totally off with a fault that con only be recovered from by a power cycle.After looking for a needle in a haystack I found the emergency messages from each drive that state that the safety off torque or the torque enable was removed. I did no such thing. As the motor drivers have their own contactor I don't need this safety input so I disabled it.The safety input is isolated, the CAN bus for each drive is also isolated.Disabling the input still not solve the issue despite the very specific error. Then I realized, every time the thing shuts down the debugger session is disconnected preventing me from looking at any stored data from error messages.OK, so lets unhook the programmer/debugger.Works like a charm. The machine is running off a battery so is technically isolated from earth but could have a poor earth connection.

author: ebastler
author_rank: Super Contributor
timestamp: April 04, 2024, 06:12:10 pm
content: Could you give a link to the specific Digikey isolator you are using with the Atmel ICE?How strictly isolated are things, both on the ICE side and the CAN interface side and within your DUT? Any chance that there are shields and grounds which still connect to form a loop?

author: BennoG
author_rank: Frequent Contributor
timestamp: April 04, 2024, 07:13:02 pm
content: is your bus terminated (at least with one 120 ohm resistor) preferably 2Benno

author: Simon
author_rank: Unknown
timestamp: April 04, 2024, 08:10:16 pm
content: Quote from: BennoG on April 04, 2024, 07:13:02 pmYes, as I explained the CAN bus is the one that works just fine, but it is a Kvaser made isolated adapter.

author: Simon
author_rank: Unknown
timestamp: April 05, 2024, 08:25:53 am
content: This is the isolator:https://www.mouser.com/datasheet/2/306/USB_ISO-2891588.pdf

author: Simon
author_rank: Unknown
timestamp: April 05, 2024, 10:47:27 am
content: looks like I am not alone:https://www.audiosciencereview.com/forum/index.php?threads/olimex-usb-iso-isolator-mixed-experience.21119/

author: xvr
author_rank: Frequent Contributor
timestamp: April 05, 2024, 11:08:49 am
content: Try to add power adapter to Olimex isolator. Without external power it used builtin DC/DC, powered from PC side. Some glitches can penetrate through it.

author: tooki
author_rank: Super Contributor
timestamp: April 05, 2024, 11:09:13 am
content: If you’re already running a laptop — presumably off battery, no AC adapter connected — is an isolator actually needed? What happens if you continue to run isolated CAN, but run the debugger directly on the laptop?

author: Simon
author_rank: Unknown
timestamp: April 05, 2024, 05:52:16 pm
content: The laptop is powered, not sure if grounded, but it will have an amount of capacitance that will sink or source I expect.

author: Simon
author_rank: Unknown
timestamp: April 05, 2024, 05:57:32 pm
content: QuoteThis is from the manual, it does not sound terrific, if the computer and the power adapter supply current it can go up to 1A (and yes there is a typo where it says 750A instead of 750mA).So that sounds like the DCDC converter is not switched out when the external power is connected, unless it's doing some kind of current sensing.

author: tooki
author_rank: Super Contributor
timestamp: April 05, 2024, 08:12:53 pm
content: Quote from: Simon on April 05, 2024, 05:52:16 pmAnd if you run it off battery? At minimum as a diagnostic test.

author: JustMeHere
author_rank: Frequent Contributor
timestamp: April 05, 2024, 10:20:54 pm
content: Bus contention? Is the debugger trying to control any of the pins in you CAN?On the ESP32 one of the SPI busses and the JTAG share pins.If not, noise on the bus introduced by your debugger somehow.

author: Simon
author_rank: Unknown
timestamp: April 06, 2024, 06:34:09 am
content: Quote from: tooki on April 05, 2024, 08:12:53 pmI'll need to change laptop for that as this one has a dud battery.

author: Simon
author_rank: Unknown
timestamp: April 06, 2024, 06:42:46 am
content: Quote from: JustMeHere on April 05, 2024, 10:20:54 pmNo it's a SAMC microcontroller, the debug pins are separate and dedicated.Noise? well yes of course there is noise. We have 2 1kW motor drivers connected together and floating. They are generating bipolar square waves of fast changing current and I will not even try to guess exactly what is happening when both generate a pulse of the same or opposite polarity. This is why the CAN bus ports on the drivers are isolated from the driver power electronics.I could have a look at how many errors there are on the bus but I think the system will recover from missed messages.

author: JustMeHere
author_rank: Frequent Contributor
timestamp: April 06, 2024, 07:07:02 am
content: Is this your problem perhaps:Quotehttps://www.kvaser.com/download/?utm_source=software&utm_ean=7330130982239&utm_status=latest

author: Simon
author_rank: Unknown
timestamp: April 06, 2024, 07:12:14 am
content: Yes it is terminated. The need for termination is not due to noise in the system which clearly with 2 independent 1kW drivers I have. The termination stops standing waves and mis communications. I am not seeing CAN bus errors, not that I have looked but the CAN bus functions. What happens is that the drives seem to think that the enable input was removed. The enable input is connected via isolation also, but that also will have capacitance and then there is this dodgy olimax isolator....The thing that the drives complain of is not CAN bus related. It's quite illusive, if there was a CAN bus specific issue I'd be seeing lots of error registers flagging which I do not.

author: Simon
author_rank: Unknown
timestamp: April 07, 2024, 04:43:42 pm
content: I'm thinking of getting this board and using a power brick to power it as it has no isolated DCDC:https://uk.rs-online.com/web/p/communication-wireless-development-tools/8031598?gb=s

author: Simon
author_rank: Unknown
timestamp: April 08, 2024, 07:26:40 am
content: Or just go for it with this:https://www.mouser.co.uk/ProductDetail/Advantech/BB-UHR402?qs=F5EMLAvA7IBc33W3bPoW5w%3D%3DThe other consideration I guess is the capacitance in my isolated power supply. How could I test one of those? I have a spectrum analyser so I can use it's internal generator to see what will get through at what frequencies.