Go Down

Topic: Help with circuit isolation issue ... (Read 3759 times) previous topic - next topic


Hey all,

I'm a programmer by trade- I'm fairly new to electronics, I know the basics and can throw together simple circuits but I am in need of some guidance with this problem ...

I have built a circuit to control an automated locker unit. The brain side of the circuit is comprised of an Arduino Mega2560, which is plugged into a FOX G20 Linux Box http://www.acmesystems.it/foxg20/doku.php via USB. I've written some C code that's running on the FOX, which communicates with the Arduino. The Arduino is also being powered via the USB. The functional side of the circuit consists of a solenoid (lock mechanism), an ID-20 RFID card reader (read user access-card swipes), and an alphanumeric LCD (pass instructions to the user), which allow a user to interact with the locker. These components are connected up to the Arduino via reed relays, and run off the same power source as the FOX and Arduino (via the FOX), a 5V 4A power supply- apart from the solenoid which has it's own 12V supply.

I have tested the circuit by substituting my laptop for the FOX, simulating the comms the Arduino would normal receive. Everything works fine and the ID-20s achieve a read range of ~10cm. However, when connected up to the FOX, the system still works but the ID-20 read range is reduced to around ~2cm. I really need to increase this! From my basic electronics knowledge I would gather that this problem occurs because the ID-20 and the FOX are on the same circuit and are not isolated from each other, maybe the shared grounds are causing signal interference, or the circuit net inductance is reduced because they're connected in parallel, which might be reducing the current flow to the ID-20s? I apologise, I'm just throwing darts randomly. Anyhow, I believe it's an isolation issue.

Would you need more information to make a proper diagnosis? I could draw a circuit diagram.

What would be the best way of isolating the FOX from the rest of the 5V components in the system. Perhaps an isolation transformer, or an optocoupler?



A basic schematic would help. For example, I'm not sure how the reed relays fit in there.

The range issue could be due to interference. The FOX board is likely emitting quite a bit of radiation. How close is the board to the reader? Can you try some experiments in which you physically move the board farther away from the reader?

The Arduino Drum Machine: 14-track MIDI drum machine sequencer / groove-box


This is a common RFI (radio frequency interference) problem - move the FOX board well away from the RFID reader, its putting out loads of 'hash' (wideband digital RFI).  Your USB cable has ferrites both ends?  If not its probably just piping the RFI direct to your arduino.
[ I will NOT respond to personal messages, I WILL delete them, use the forum please ]


All good questions- hopefully I can justify all my design decisions...

A basic schematic would help. For example, I'm not sure how the reed relays fit in there.

I will put together a schematic and upload it tomorrow. I'm using these relays http://uk.rs-online.com/web/search/searchBrowseAction.html?method=getProduct&R=3492884 to switch the ID-20 and the solenoid lock on/off. Switching the solenoid off is necessary as I don't want it unlocked all the time. I need to be able to cut power to the ID-20 as well, as I intend to add more RFID readers to the circuit (inside the locker itself) to monitor whether an object (tagged) has been deposited or not. I cannot get two RFID readers to operate at the same time, even if they're connected to different RX pins on the Arduino. I'm sure it wasn't a proximity issue, I tried separating them by several metres. As for the FOX rad interference, that is also positioned several metres away from the readers.

1) a) The USB power option is provided primarily as a programming/setup convenience. IMHO, it is preferable to use the Vin or +5V pins for "permanent" power arrangements.  (Which pin you use depends on what voltage is your power source.)

Would there be any problem with me keeping the USB connected purely for comms with the Fox board, and use a +5V to power the Arduino?

b) The Arduino board is not meant to SUPPLY POWER to anything, only to CONTROL it. Power the RFID card reader and the relays and the display directly from an appropriate power source and NOT through the Arduino board.

I thought as much, which is why it is only driving the relays, and one at a time (~10mA). I thought I mentioned in my first post that the LCD and the ID-20 are being powered by a 5V 4A supply, not via the Arduino. Hopefully the schematic I will post tomorrow will clear things up a bit.

3) The FOX board seems pretty competent all by itself to talk to the RFID reader and the display and the lock solenoid. It is not clear why you even need an Arduino here?

It is necessary as this is only the first stage in the project. I intend to build a modular system, each module consisting of a single Arduino Mega2560 capable of managing 10 lockers- each locker will have an internal RFID reader (to monitor tagged contents) and a solenoid lock. Each module can then be plugged into the Fox board via a USB hub. The software I have written to sit on the Fox board can manage multiple serial devices- I have tested it with 4 x Arduinos (simple blinking LED program), and it works fine.

This is a common RFI (radio frequency interference) problem - move the FOX board well away from the RFID reader, its putting out loads of 'hash' (wideband digital RFI).  Your USB cable has ferrites both ends?  If not its probably just piping the RFI direct to your arduino.

The Fox board is well away from the RFID readers ~2 metres, but I'm not sure about the ferrites... just googled ferrite bead and nope, the USB cables don't have those either end. That's what you get for buying budget- I'll try with decent USB cable tomorrow morning. Thanks for the advice.

Cheers for the suggestions guys- very grateful.


Here is a schematic of the current setup.

Not clear why you need more than one RFID per locker?

I don't. Just the one RFID per locker. 10 x lockers per Arduino = 10 RFIDs per Arduino. These are assembled into a modular package which can then be plugged into a FoxG20 via a USB hub. I want to design the system in such a way that a faulty module can simply be unplugged and replaced. One of the modules will be able to control an eleventh RFID reader and an alphanumeric LCD, to be mounted externally on the locker unit, to act as a card reader and display.

I was merely trying to justify my design choices by explaining a little more of where I want the project to go. The current system is just a single locker, I am testing the set up before adding complexity.

Thats a problem here is that we don't see the whole picture so we can't tell what your design objectives or tradeoff decisions are.  How far away from each other are the lockers?  Are they metal or something that can form a natural Faraday shield to protect them from interference from other RFID receivers?

I apologise- I didn't explain everything in the first post as I feared it would have been a short novel and no one would have read it. I have explained my current set up, problem and supplied a schematic.

The lockers are next to each other, big enough to knee down inside, they are fully enclosed and metal, and I believe provide a perfectly adequate natural Faraday shield.

What is the startup time for an RFID reader?  It is practical to "multiplex" them?

I take it the startup time is how long it takes for the antenna to charge ... in which case I'm not sure, but I have programmed the Arduino to keep the RFID powered for 3 seconds. In my test set up (Fox removed from circuit, Arduino plugged into my laptop) the RFID scanner charges, reads the tag and transmits it to the Arduino in the blink of an eye, and will read tags upwards of 10cm. With the Fox connected the same process can take a few seconds, will only read tags closer than 2cm and sometimes doesn't read them at all.

Do you think it is likely to be RF interference from the Fox, passed through the USB cable? Or could the Fox be reducing the current flow to the RFID reader?

Using multiple Arduinos and USB and hubs just seems unnecessarily complex and overkill.  Extra development complexity, extra component cost and no apparent system benefit? Unless there is some other factor you didn't mention here

It's purely so I can separate the system into modules. For instance, if 10 more lockers are added to the unit at a later date I can simple plug another module into the Fox rather than rework everything. In any case, the problem is being caused when I add the Fox to the circuit. Discussing whether I should omit the Arduino is not going to solve that.

It is practical to "multiplex" them?

I have tested using multiple RFID readers muxed through a 74HC151N into a single Arduino Rx, which works fine, but my system requires RFID readers for two different functions. There are the readers inside each locker used to monitor contents- they don't have to be on all the time so so muxing is practical. There is an external card reader however, providing user access to the locker unit, which should be powered up all the time. I couldn't get two RFID readers to work at the same time on the same circuit, so resigned to powering down the card reader when a locker reading was required to scan for contents.


If you have to cover several modules, that could mean that the response time could be several seconds for any given module.  I would carefully consider this factor before proceeding. It seems like it could be a show-stopper depending on what kind of performance you need

Several seconds in perfectly fine. On average the lockers will only be accessed a few times a day. The Fox queues up locker scan requests and performs them one at a time when the unit is idle. It won't grant a user access to a specific locker until it has been scanned following its previous access. In a worst case scenario a user might have to wait a few seconds.

You still have not presented any design factors that would convince me that you need ANY Arduinos

You have made a good point and I will reassess the design before I take the project further. I am always grateful for input especially as I have no one here I can directly bounce ideas off, however none of the points above address the MAJOR problem I am having- why is the Fox board significantly reducing the read range of the RFID scanner, and how can I stop this from happening?!

I'm picking up some ferrite beads tomorrow, hopefully that will tell us whether it is an RF interference problem. Alternatively might a decoupling capacitor do the job?


why is the Fox board significantly reducing the read range of the RFID scanner,

Ripple on the supply to an RFID reader will severely reduce the range. As will running it under voltage. Are these 5V readers being connected to a 5V source or are they 12V to 5V readers in which case you are operating them at the low end of the range. An RFID reader will work best at 12V rather than 5V.

Also two RFID readers closer than about 1 meter will again reduce the range of both.

It is better to keep the readers powered and multiplex the inputs. Will the reader continuously produce readings in the presence of a card or is it a one shot. The one shot function is a function of the reader the actual token will get read all the time.

Two seconds is a long time (it feels a longer time) to wait to have your locker respond to a tag, do some tests before you get lots of readers.


Hey, sorry for delayed response, had a bout of food poisoning.

I tried the ferrites to no avail. I have now simplified the circuit as much as I can and the read range issue still occurs. It appears I may have blamed the Fox board prematurely, as the issue still occurs when the Arduino is plugged into my laptop via a powered USB hub (which is on the same supply as the RFID reader). Implying it is indeed a power issue.

In the simplified set up I have a single ID-20 RFID reader plugged into the Arduino Mega, which is connected to my laptop via the USB hub. When the Arduino receives an instruction from the laptop it connects the RFID reader to a separate 5V supply, for 6 seconds or until it reads a tag, then returns the tag code or a 'failed' message if it could not find a tag.

When the USB hub is not powered (only plugged into the laptop and the Arduino), the RFID reader range is around 10cm and returns the tag code to the laptop very rapidly.

When the USB hub is powered (on the same 5V supply as the RFID reader, in parallel), the RFID reader range drops to around 2cm and takes a few seconds to return the tag code.

I have tried fitting ferrites in every combination I could think of without any affect. Could the hub be pulling the voltage down below 5V? Is there anything I could add to isolate them from each other. It's a 4A supply, it can definitely handle the hub and the ~65mA required by the RFID reader!

Ripple on the supply to an RFID reader will severely reduce the range. As will running it under voltage. Are these 5V readers being connected to a 5V source or are they 12V to 5V readers in which case you are operating them at the low end of the range. An RFID reader will work best at 12V rather than 5V.

They are 5V readers, recommended voltage range of +4.6 to +5.4 http://www.corerfid.com/coreDocs/CoreIDSpecs.pdf - see core20. How could I check whether it is a ripple on the supply? And how could I isolate the RFID reader effectively from these ripples.

Thanks guys.


I got myself a mutlimeter and measured the voltage at various points around the circuit, with and without the microcomputer and USB Hub included.

When the Arduino is plugged directly into my laptop and the RFID reader is the only component using the independent 5V supply the voltage across the supply is 5.60V and across the reader it's 5.50V. I presume the drop is due to the length of cable.

When the Arduino is plugged through the USB Hub into my laptop, and the USB Hub is being powered by the same supply as the reader, the supply voltage drops to 5.34V and at the reader to 5.25V.

Then adding the microcomputer to the 5V supply drops the supply voltage further to 5.30V, and at the reader to 5.22V.

And finally, removing the laptop from the equation by plugging the Arduino through the Hub directly into the microcomputer (the desired circuit layout) ... supply voltage drops down to 5.17V and at the reader to 5.05V.

That's nearly a 10% voltage drop!!

This tutorial is probably one of the most-cited as a reference for helping people with the kinds of symptoms you are reporting...

I read the tutorial, very informative. I did a fair amount of research on the subject and the problem is making more sense to me now.

I am still unsure how to approach fixing it though. I can only think of 2 solutions, fit decoupling capacitors to the RFID reader, or fit them at the microcomputer end. But there are problems with both of these approaches. Everything I have read suggests that the caps need to be placed as close to the Vin and GND pins as possible, with the shortest leads possible. There are two Vin pins on the RFID reader and they're both a good 15mm away from the GND pin- plus they're already soldered to a breakout board, so I'd have to solder the caps directly to the pins on the back of the breakout board.
Fitting decoupling caps to the microcomputer is even more daunting, as it's being fed power through a centre-pin-positive plug. Would fitting the caps before the plug be sufficient?

Even if it were easy to fit them I'm still not totally sure what size / type capacitors I should be fitting. The microcomputer has a 400 MHz processor, and I read somewhere that you should try a cap equal to one over triple the crystal frequency, which would give me a 1nF cap. I read somewhere else that a 100pF would be suitable for a 166 MHz processor, suggesting the 1nF would be too big to filter out ripple from a 400 MHz.

I don't want to risk a trial-and-error approach to this and blow something up but this seems to be a problem where practical experience trumps theory, and all I have is theory.

Does anyone have any recommendations regarding cap size and where to fit them? Does the voltage of the cap matter at all ?


Does the voltage of the cap matter at all ?

Only that it must be bigger than the voltage you are putting it across.

and I read somewhere that you should try a cap equal to one over triple the crystal frequency,

Sorry that is rubbish. Miss understanding of the third harmonic and all that probably lead to some uninformed thinking. Using 0.1uF ceramic capacitors along with a large one like a 100uF will probably be fine.

Processors that run at those sorts of frequency don't have crystals anywhere close to it, they use internal oscillators and lock them to the crystals.

fit decoupling capacitors to the RFID reader

Yes treat it as if it were a motor load, use an inductor and a capacitor either side.

I don't want to risk a trial-and-error approach to this and blow something up

No chance of this, the wrong component values won't do any harm, they just won't do much good.


Just a quick belated message of thanks to all who posted suggestions.

I took Grumpy_Mike and KE7GKP's advice, experimented with a few different inductor+capacitor combinations and soon fixed the problem.

In the end I found simply the addition of a single 150uH inductor on each RFID reader Vin was enough to allow several readers to operate simultaneously off the same supply.

Go Up