Go Down

Topic: Not receiving serial data when 2 RFID readers are connected (Read 497 times) previous topic - next topic

Grumpy_Mike

I attempted to use 100uF capacitors on each loop, but they did not solve the problem. I added the new schematic to the first post, as well as here. maybe I am placing them wrong.
You have no inductors, and only two capacitors and they are too big to filter these high frequencies. You need a 0.1uF ceramic, for best results put the 100uF in parallel with them.
Did you read that link? Did you understand it?

Avram_Alter

I read through it, but i had a bit of a difficult time understanding it. i dont know a lot about circuitry other than very basic information. I have 2 0.1 uF capacitors (it has a little 104 on the side), but I dont know which side is positive or negative, or if that even matters.
"Throw your soldiers into positions whence there is no escape, and they will prefer death to flight. If they will face death, there is nothing they may not achieve."
-Sun Tzu

Grumpy_Mike

Quote
but I dont know which side is positive or negative, or if that even matters.
It doesn't matter, because ceramic capacitors are not polarised.

I keep saying I would use an inductor like this on the power input to EACH reader:-


There might be other things wrong with your set up as well, I haven't looked at your code yet because you need to get the hardware right first.

Avram_Alter

the thing is, i got one set up working without any capacitors or inductors. I know my code works, even if it is very crudely written.

I think I am pretty dumb. I have been strapping an extra pin to ground this entire time, and have been running my capacitors between the wrong pins. I have added the new, normal schematic in the  next comment, maybe that can clear things up. still is not working, however.

As you can see I don't have any running in parallel yet. I only have 2 capacitors available to use, the 0,1 uF and the 100 uF. I have some linear regulators and resistors, but not much else.
"Throw your soldiers into positions whence there is no escape, and they will prefer death to flight. If they will face death, there is nothing they may not achieve."
-Sun Tzu

Avram_Alter

"Throw your soldiers into positions whence there is no escape, and they will prefer death to flight. If they will face death, there is nothing they may not achieve."
-Sun Tzu

MorganS

Ok. Looking better.

Where are you up to now? Is it still the same problem where one works but two don't? Try hooking the 2nd one in one wire at a time: ground, data, power in that order. See what connection stops the first one.
"The problem is in the code you didn't post."

Avram_Alter

as soon as power gets connected, it stops working.worked through putting ground and data. putting power in without ground also works. but as soon as both are in, it doenst.
"Throw your soldiers into positions whence there is no escape, and they will prefer death to flight. If they will face death, there is nothing they may not achieve."
-Sun Tzu

MorganS

So the power source simply cannot power those 3 devices. Get a bigger power supply. A phone charger will work. Pick them up for pennies at the secondhand store.
"The problem is in the code you didn't post."

Grumpy_Mike

Never connect stuff together with the power on. It is the best way to destroy things. Always connect up power and ground at least before applying the power. Each time you want to change something, power down, do the change and power up.

If you are going to remove a component, like a reader also remove any input signals as well as th power. :)

Avram_Alter

I am going to try getting inductors, i can only find ones rated to a couple hundred uHenrys. what do you think is the lowest I can get away with? if th einductor idea doesn't work, what would be the next move?
"Throw your soldiers into positions whence there is no escape, and they will prefer death to flight. If they will face death, there is nothing they may not achieve."
-Sun Tzu

Grumpy_Mike

Well you could start addressing the software. The first thing I notice is that if there is one or more bytes in the serial buffer you read in three. Not a good thing to do. Reading an empty buffer gives you 0xFF.

Avram_Alter

I do get some weird unicode characters at the end of the bytes. it doesn't really affect the code, however. the serial data is read into a matlab code, which parses is properly and actually does the thing I need it to do. this rudimentary code I have just continuously outputs a string that looks like this:

Code: [Select]
Reader N: "Tag_String"

and when no tag is present, I need it to output

Code: [Select]
Reader N: 

that's it. thankfully the weird buffer issue hasn't effected that yet
"Throw your soldiers into positions whence there is no escape, and they will prefer death to flight. If they will face death, there is nothing they may not achieve."
-Sun Tzu

Grumpy_Mike

Quote
and when no tag is present, I need it to output......
Have you tried clearing the buffer after it has printed out the token?

Avram_Alter

clearing it using break or serial.flush()? I don't think I do. could that cause some of these issues?
"Throw your soldiers into positions whence there is no escape, and they will prefer death to flight. If they will face death, there is nothing they may not achieve."
-Sun Tzu

Grumpy_Mike

Quote
clearing it using break or serial.flush()?
Nether, they just do stuff with the serial buffer and they don't do what you think anyway. You have already read the contents of the serial buffer into a buffer that you display. That buffer, fill it with spaces ( 0x20 ).

Go Up