Photon responding very slowly to calls, if at all

I’ve got a Photon that seems to be running (slow cyan pulse), however calls to the photon such as “particle get” or web API calls are VERY slow (20 seconds or more). Sometimes flashing from the WEB CLI reports failure but the device still flashes magenta right about the time it says “flash unsuccessful” The device then boots up fine.

My first guess is that I am drawing too much power from the device, but I’d like to see if anybody else experienced this. I currently have 3 DS18B20 one-wire temperature probes running off the 5V Vin port and the value is being read directly at 5V in one of the digital ports. I have a 4.7k pull down resistor attached to the digital port. I had previously been powering the DS18B20 devices from the 3v3 port, but they were not always responding in time and they gave invalid values. So upping the voltage fixed that issue. I saw the same slow response times with the Photon with the 3.3V operation mode as well.

I am also powering a moisture probe from one of the digital ports for 50ms every 30 seconds (4.7k pull down). I also have a couple photo-resistors hooked up to 2 analog ports with 4.7k pull downs. And finally I have a 5V relay powered by the Vin port and taking 3.3V input from the digital ports. The relay seems to switch fine. I am guessing that Vcc is isolated from the 2 Vin ports on the relay module, but I can’t be sure. I have 4.7k pull down resistors attached to the digital output ports of the photon as well in case the current is actually reversed. But that’d be bad news anyway!

How exactly are you hooking up your relay? It’s often preferred to use a transistor to switch the relay to make sure you can source enough current, as well as for providing protection. Your relay might be pulling too much current, thus causing unexpected issues.

As it turns out the problem stems from a the fact that I was calling a webhook every second. I had implemented some bad logic. I think this caused my device to get blacklisted. But in answer to your question, the relay has VCC connected directly to the Vin port on the photon. I figured the USB port on my computer had enough extra juice to power the relay.

But If I were to switch my relay through a transistor, would that mean that I would hook the base directly to my 5V source so the circuit is always closed? Otherwise if I used a digital output pin it would limit my Vcollector-emitter voltage to Vbase-emitter, which would be 3.3V right?