I’m setting up a device to go out to the field where I had issues with one yesterday. While programming and testing the unit here, one of our tests is to make sure we are getting 5VDC on the data pins, I’m only getting 3.22VDC on the ones in the field, so I assumed the photon was bad. This morning I have 3 others giving me around the same readings, so I checked the other boards we have that are working fine, they are showing the same voltage, between 3.2-3.7. Any idea why my voltage would be so low when the pins are pulled high?
@Mjones, the Photon is a 3.3v device and can only be pulled up internally or externally to 3.3v is the pin is to be used as a OUTPUT. As such, the maximum voltage will always be 3.3v on an output. If you need 5v, you must use a level shifter.
Got it, so I guess I may be confused on how my product actually works, as a wiegand device, the controller looks for 5vdc to be pulled to 0vdc when data is sent. This answers my question, but brings new ones to light haha. Thanks @peekay123.
@Mjones, if you need a 5v line that gets pulled LOW, you could do that with a simple mosfet that has it source connected to 5v via a pull-up and its drain connected to GND. You can then control the output via a GPIO pin to the gate of the transistor. If you deep sleep the Photon, you would also put a pull-up or pull-down resistor on the gate (depending on type of mosfet used) to keep the mosfet in the desired default state while the GPIO pins “float”.
I’m not sure we need that, this system has been working in the field for over a year at other sites. That’s why I say you answered my question, but also brought up many more.
I’m gonna ping @rickkas7, maybe he can answer the other questions I have.
If you ask the question here others might know the answer too
I’m just curious as to how the controller reads the incoming data if its only a 3.3v signal, I only pinged rickkas because he wrote that part of the firmware. Weigand data starts at 5vdc, then reads data from D0 and D1 based on which pin gets pulled to 0V/GND. I’m just curious how the photon accomplishes this.
Digital signals usually are not only recognised as HIGH or LOW when they are 0.0V or Vcc but they allow for some offset.
How tolerant a device is can usually be found in the respective datasheets.
When ~3.3V is above the the HIGH signal threshold it’ll be taken as HIGH.
https://www.allaboutcircuits.com/textbook/digital/chpt-3/logic-signal-voltage-levels/