I don't know how to do this with electronics and/or relays.
I have a new project that puts a Mega in the middle between a Card Reader and an Access Panel. Basically I want the Mega to capture TX/RX data and forward the info to the Access Panel. If the MEGA is up and running it will make decisions on what data to forward (IE modify a bit stream) If the MEGA has an error or has run out of power I want the data to flow through as if the MEGA wasn't there.
My initial thought was a relay where I power it like a gate and if power fails the gate goes the other way. However, I believe there is something a little better out there maybe something less power consuming?
Thanks
Kris
Quote from: KrisK on September 02, 2017, 10:03:45 AM
I don't know how to do this with electronics and/or relays.
I have a new project that puts a Mega in the middle between a Card Reader and an Access Panel. Basically I want the Mega to capture TX/RX data and forward the info to the Access Panel. If the MEGA is up and running it will make decisions on what data to forward (IE modify a bit stream) If the MEGA has an error or has run out of power I want the data to flow through as if the MEGA wasn't there.
My initial thought was a relay where I power it like a gate and if power fails the gate goes the other way. However, I believe there is something a little better out there maybe something less power consuming?
Thanks
Kris
The last time I saw a Card Reader, it was clattering away, running Hollerith cards through at 100s of cards per minute! Wow, it was fast! Very satisfying sound too. Clackety clack...
I'm assuming your RX/TX signals are 3.3V level Serial data from/to a UART of some sort?
If so, in principle, you can use the voltage on the Access panel's TX pin to power the small bias current you'd need to power an analog switch. You need to use a diode, resistor, and capacitor to make the bias power supply. You didn't mention what electronics packaging technology (solderless bread board, ASIC, high density packaging, jumper cables, etc) you're constrained to so it would be difficult to offer a meaningful solution without that.
Tom
Thanks TOM... I knew you would have something killer. I think you are correct. I believe I will have power I can get from the access panel and use it.
I was thinking of a "depletion MOSFET" But I have never stepped into managing that type of circuit design into an MEGA.
I will also look at better quality relay's. I am only used to using cheap sugar cube "Pololu" cubes but I know there are better ones out there.
Thanks again
Kris
Quote from: KrisK on September 04, 2017, 12:58:16 AM
Thanks TOM... I knew you would have something killer. I think you are correct. I believe I will have power I can get from the access panel and use it.
I was thinking of a "depletion MOSFET" But I have never stepped into managing that type of circuit design into an MEGA.
I will also look at better quality relay's. I am only used to using cheap sugar cube "Pololu" cubes but I know there are better ones out there.
Thanks again
Kris
I wouldn't bother with a discrete FET implementation or relay for this. You haven't answered about packaging constraints so I'll assume that you need something easily wired (like a DIP IC) so I would suggest something like a CD40257, which would work perfectly for this application.
The selector pin would be driven by the Mega, probably as a GPIO since this would be faster switchover than simply tying to the Mega's power pin. The Mega could set the GPIO high only when it's ready to handle the serial communications and BOD would reset the GPIO to off (you would need a resistor to ground, but a 3.3Megohm would suffice without creating a significant load on your Mega power supply).
Power for the CD40257 would come from the access panel, either directly or off its TX pin as I mentioned earlier. The rest of the wiring I'll leave as an exercise to the reader...
Tom
Thanks again Tom
" You haven't answered about packaging constraints so I'll assume that you need something easily wired (like a DIP IC) so I would suggest something like a CD40257, which would work perfectly for this application. "
I will need to talk to the product owner. I don't know what I have available to me other than they have a circuit from the access panel mapped to about 8 pins on the Mega. I will ask them for a detailed schema. But I bet your assumption is correct. I surely can get power from the access panel.
I will keep you updated. I really want to keep this simple and using the MOSFET complicates things plus the relay will wear out unless we use a non-mechanical relay but that usually adds heat. I will take a look at the CMOS chip you suggest. I found quite a few articles on it already.
Tom
You were "spot on" the product owner said it would be no problem getting power from the Control Panel. They use a RS432 connector so I should get power from that side of the MEGA. Now the big question is; will the product owner want to invest in a board redesign?
Thanks again
Kris