PurpleSensor (Low Cost IoT Sensor)

I have come up with a very simple IoT sensor node, it uses the ESP8266 programmed with custom firmware (i.e. no expensive external micro needed) and a DHT11 (soon to be upgraded to DHT22).

Bill of materials

Tentative total: £7.48

1 Like

Interesting. I’d like to have some temperature logging of various rooms in my house, heading towards some sort of OpenTRV setup.

USB Mains plugs available on EBay for £1.00, mains in, 5V 1Amp out, should cut price further?
Check out ESP8266 ESP-201 on Banggood for more ESP8266 pins

1 Like

Thanks @TrevM, found some for 99p, that’s another 39p saved! :slight_smile:

Huh, a pleasant surprise - the quality of these cheap and cheerful USB chargers is quite reasonable. Not sure on safety and efficiency yet though it does have a transformer and optoisolator so it at least has some galvanic isolation.

Hmm, the circuit itself is a little nasty, I suspect the output may be a little too noisy for the wifi module.
Safety also looks to be pretty poor.

Edit: Noisy output seems to be confirmed in the ‘Power Quality’ section of this writeup.

For future reference to future myself; this power supply is probably a safer bet for noise, safety and efficiency.
£3.60 exc. vat in quantity 1 - 4.

I’ve so far bought 15 of them (different colours - don’t ask), all work, none have given me electrical noise problems with any project (though I’ve just used them, not examined in depth). 1 does give out a high pitched noise (not looked into yet).
I also took it apart and looked inside, but your photos are really cool.
Do we believe the “Emerson Network Power” brand or the CE mark?

In your original photo, what is that interesting module plugged into breadboard below the ESP8266?

I certainly don’t believe the “Emerson Network Power”.
CE marking is a self-certification process however it certainly would not hold up to scrutiny against standards if someone were to legally challenge the CE mark.
For a start; the creepage distance between HV and LV sections of the PCB is only 1mm, not the required >4mm. There also doesn’t appear to be any decent input or output filtering.

The module you’ve noticed is a Teensy 3.1 which is by far my favourite microprocessor platform I’ve used out of many.

Update: I’ve received the DHT22 today, so the feed has a lot more resolution (and possibly accuracy, though I’ve not calibrated it yet).

Feed is here:

So tonight at the Hackspace I had a ‘USB Charger Shootout’, looking at the waveforms captured from different USB chargers with a 25 Ohm load (i.e. 200mA).

Capture A uses the same timebase and vertical gain on all chargers.
Capture B zooms in the timebase and vertical gain to fit the signal seen.

1.0 Amp MeanWell Charger

This is an average quality charger from CPC, rebadged as ‘Pro Power’

Capture A

Capture B

2.1 Amp MeanWell Charger

This is an average quality charger from CPC, rebadged as ‘Pro Power’

Capture A

Capture B

1 Amp Banggood Charger

This is an appallingly bad quality charger from Bangood

Capture A

Capture B

2.1 Amp iPad Charger

This is a top quality charger from Apple

Capture A

Capture B


If you compare the Capture A’s, you’ll see the huge variation in power quality from these chargers. Whilst Apple chargers are expensive (they certainly have the biggest markup in % out of all these chargers), you do get a superior product.

If we tabulate the peak to peak noise of each charger, we get:

1.0 Amp MeanWell: 241mV
2.1 Amp MeanWell: 227mV
1.0 Amp Banggood: 970mV
2.1 Amp iPad Charger: 55mV

The banggood charger also has the highest DC RMS voltage content of 5.2V whereas all the others are at around, or under 5V.

For the PurpleSensor, I think I’ll go with the MeanWell chargers from CPC (in either 1.0A or 2.1A variants) as it’s the ideal compromise between noise and cost. They’re also better quality; the casing fits together better and the USB connector is a better fit. In addition; they’re likely to be much safer too but I haven’t yet taken one apart yet to check this.