Firmware from Electron to Photon not working!

Hi all!

I have a sensor system which is working perfectly on an Electron. Pin definitions etc all good, works a treat. It puts out temp / humidity, PIR, light and a few other sensors no problem at all, currently routed through Particle’s cloud.

I dropped that firmware over to a Photon so that I’ve got it setup on WiFi and not on cell. Got the firmware on, fired it up - all works fine, but sensor values are all over the place.

One sensor seems to work fine, but temp / humidity are 0 and light is up and down all over the place.

All sensors are powered separately with the DO / AO running into the pins defined on the Photon. It’s the same sensors into the same pins so no idea why I’m getting it working fine on the Electron but not on the Photon?

Also the code seems to not be the issue - is compiled, flashed and publishing as it should. All sensors are the same so all libraries should suit - honestly can’t think why something is interfering with the sensor values.

Anyway, help much appreciated!

Thanks in advance, all the best.

How are you powering the sensors.
The 3v3 pin on an Electron can supply considerably more current than on the Photon.
That’s the most prominent difference I can think of with regards to your issue.

Thanks for the message. I’m actually powering them all separately so it shouldn’t be anything to do with power consumption. The only things connected to the Photon are the outputs from
the sensors.

Do you not have common ground?
You need that.

Yeah they’re all on common GND, although the power to the board is separate to the sensors (IE sensors are all common, Particle is grounded via the USB power). Is it better to pull the GND from the photon to the breadboard and ground all the sensors to there too?

The sensors and the Photon must be on the same ground level.
Relying on the USB ground begin the “same” ground as some arbitrary other ground is not considered common ground.
So yes, having the sensor ground rail connected to the Photon’s GND pin will remove all doubt.

3 Likes