Archive for July, 2013

My journey to understand how the dust sensor reading works continues

201307302219.jpg

as far as I can see the “151 ohms” actually means that the duty cycle of the unit is 15.1%. i.e. the sensor uses a voltage on pin 1 where if the voltage is above 4 volts it’s counted as high, and below 0.7 volts counts as a low. The time it’s kept low as a percentage of the defined window is the value show multiplied by 10.

Turns out the error produced by avrdude when reprogramming the interface card is not really a error :

Your efuse error is because AVRDude reads unimplemented fuse bits as 0. That is, it appears that only the first 3 fuse bits (0x07 = 0b00000111) are used, so just write 0x07 to that fuse instead of 0xFF.”

I just saw a ad for “whole bean instant coffee” – what a oxymoron.

My estimation of certain marketing people can not get much lower.

How cool is this – a opensouce project (hardware and software) to control your sprinklers from a Raspberry Pi!

OpenSprinkler Pi
An Open-Source Sprinkler / Irrigation Extension Board for RPi

[From OpenSprinkler Pi — Sprinkler / Irrigation Extension Board for Raspberry Pi « Rayshobby]

The picture tells a clear story of why the pizza got its name

201307271811.jpg

201307271739.jpg

201307271739.jpg

(Click on images for larger versions)

These are current readings from the Air Quality eggs dust sensor – the top graph is the “raw” values interpreted as resistance (ohms) – which is a bit funny as the dust sensor really outputs a PWM pulse.

The lower graph is corrected for a number of other factors.

IMG_0100

And this is the dust sensor itself. It takes measurements over a 30 second period, and counts all particles larger than a um in a internal volume of air that is apparently 283ml in size.

More information as I am trying to get a handle on the problem.

I now have a 100% repeatable test case – making it easier to find out what’s going on.

When I connected my laptop via the USB cable and the USB BUB to the FTDI plug on the eggs motherboard everything suddenly worked – and the dust sensor started reporting sensible values.

IMG_0099

(AQE plugged into the original PSU)

As soon as I unplug the USB cable and plug the power supply into the power socket the dust sensor starts reporting zero ohms. To be on the safe side I used 2 different power supplies with the same results.

The I plugged the USB cable in – and the sensor again reports sensible (non zero) values.

IMG_9173

(Air quality egg plugged into USB cable to FTDI plug on motherboard)

I can now leave the USB cable plugged in (so that the board does not reset itself) and plug/unplug the PSU. I have done this a large number of times. And it is 100% consistent and repeatable. As soon as I plug in the PSU the dust sensor reports zero. But all other sensors continue to report normal values. ……….. I measured the voltage on the i2c plug the dust sensor is plugged into, and with the PSU plugged in it reports 4.96V, with power from the USB port it reports 4.85V. This may possibly be significant – the only other difference I can think of is noise from the PSU – but I have no other really good theories at the moment.

Anyone with any good insights? For the time being I will run the remote egg from a USB power supply via the FTDI port – not terribly convenient, but it works.

After plugging in the new dust sensor I got sensible raw measurements, but R0 was zero – so after advice on this forum I reprogrammed the dust sensor interface board . This was made slightly harder by the board not having any programming headers in place.

But on running load.sh – everything bar the the first fuse setting seem to work. This first setting gives a error message :

“avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.01s

avrdude: Device signature = 0x1e9311 avrdude: reading input file “0xff” avrdude: writing efuse (1 bytes):

Writing | | 0% 0.00s ***failed;
Writing | ################################################## | 100% 0.04s

avrdude: 1 bytes of efuse written avrdude: verifying efuse memory against 0xff: avrdude: load data efuse data from input file 0xff: avrdude: input file 0xff contains 1 bytes avrdude: reading on-chip efuse data:

Reading | ################################################## | 100% 0.00s

avrdude: verifying … avrdude: verification error, first mismatch at byte 0x0000 0xff != 0x07 avrdude: verification error; content mismatch ” The dust sensor now reports 100 ohm for R0 – but zero for raw values.

Any suggestions for how to get it working again?

The Dust sensor arrived tonight for the Air Quality egg arrived today – and has now been installed, and the feed is working.

201307232214.jpg

(Click for larger image)

The measurements seem a bit wrong though – possibly the Dust_r0 of -1 is somewhat wrong.

Btw. I followed the instructions here for the physical installation. I will post pictures later.


Experts from the Child Exploitation and Online Protection Centre (Ceop) will be given enhanced powers to examine secretive file-sharing networks.”

Strange phrasing – what is the definition of “secretive file sharing”? It would seem that any encrypted communications could fall under this category.

– Posted using BlogPress from my iPad

12Next