I use Google Analytics on this blog to track visits and have collected statistics for couple years now. I toyed with these a bit today to see where are the visitors from, just out of curiosity and for no particular other reason. I used Tableau to generate the below stats, it connects to Google Analytics directly and has a free trial version.
The size of the circles is proportional to the number of visits from that city, I get a lot of visits from the major cities in Europe, so hence the larger dots there. The visits from the USA are much more spread, i.e. coming from many different cities. A treemap of number of visits by country shows the USA as top of the list, followed by the UK and Germany, France, the Netherlands:
That’s interesting, but probably not surprising, as the top countries are also large in population. Probably 95% of the visits from country #6 – Bulgaria are mine, so I will filter these out for the next charts .
Next, I decided to factor in the country’s population and compare that against the number of visits from that country to get something more comparable. I created a calculation that would provide a [# of visits/country's population] ratio and re-generated the treemap:
So that’s more interesting, my projects seem to be interesting to large % of the population in Estonia, Slovenia, Denmark, the Netherlands and so forth. Estonia seems to lead by a factor, I wonder why that is. Greetings to you guys from Estonia .The USA that was ranking top is now way behind.
Few more charts by region, the Americas show distinct concentration of visits from the North-East of the USA and then the East coast, Brazil also generates traffic:
The Asia-Pacific region shows concentrated visits from Australia’s largest cities on the East, visits from Japan are very spread, coming from many places:
Visits from Europe are predominantly from the North-West, I see a large % of visits originating from the city of London. The Netherlands, Belgium and the western regions of Germany also generate significant % of traffic. The Netherlands and Belgium stand out because traffic isn’t concentrated only in the large cities (like Spain and France), but very evenly distributed all over the territories:
Visits over time, these are filtered by the top countries only, metrics are hidden to preserve some level of privacy:
Interesting stats, enjoyed putting these together too.
It has been a while since my last post, I have a new job and little time left for hobby stuff Anyway, I have put together the PCB for the Yet Another Power Monitor (YAPM) project and was able to do some preliminary tests over the weekend.
To re-cap: the YAPM is a low cost Arduino compatible power monitor that measures power (voltage and current) and transmits the readings to an Internet Gateway and/or one of my OLED status monitors. The goal was to make a single power supply unit, I used a transformer with two secondary windings – one for powering the thing and the other to measure the voltage. The total build cost for a fully functional unit, including the clap-on current sensor, is less than 30 EUR. The YAPM is based on the openenergymonitor.org project and compatible with emonTX code, except that it is single phase and doesn’t have temperature sensor/pulse sensor ports. I left those functions for the Funky to handle. The YAPM will typically be placed in or near the house’s fuse box, the PCB size is 5x5cm which makes it ideal to fit in a DIN rail box too. Here is how it looks:
Since the YAPM connects live to the 240V line, it is quite dangerous to handle and can provide you with a quick, yet painful transition to the other side if you touch the live connections while it is powered on. I haven’t had the chance to find a suitable box yet, but it must be enclosed for safety reasons.
I tested it briefly and it works as expected. I will build few more units for close family members, but other than that the YAPM will probably not make it out in the wild because of the reasons outlined in the previous paragraph.
I have finally found some time last weekend to finalize my smart hot water tank controller project, finalized the code and have it now running for a week. I also put up a small and simple html page to control the unit by changing the value of an emoncms.org feed. I have three modes of operation – Off, On and Auto, the controller subscribes itself to that feed and changes its mode of operation based on its value. Code could be extended to fetch setpoints from feed values as well, but I don’t need that right now and hard-coded those.<!DOCTYPE html> <html> <head> <title>Remote Control</title> <meta name='viewport' content='width=device-width, initial-scale=1'> <link rel='stylesheet' href='http://code.jquery.com/mobile/1.0/jquery.mobile-1.0.min.css' /> <script src='http://code.jquery.com/jquery-1.6.4.min.js'></script> <script src='http://code.jquery.com/mobile/1.0/jquery.mobile-1.0.min.js'></script> </head> <body><div data-role='page'><div data-role='header'><h1>Remote control</h1></div> <form data-ajax='false' action="http://emoncms.org/api/post" method="get"> <br> Mode:<select data-native-menu='false' name=csv id=csv> <option value='0'>Off</option> <option value='1'>On</option> <option value='2'>Auto</option> </select><br> <input type='hidden' name='node' value='4'></input> <input type='hidden' name='apikey' value='********API************'></input> <button type='reset'>Reset</button> <button type='submit'>Set</button> </form> </div </body></html>
Here is a screenshot of the control page on my badly beaten, but trusty phone, I use JQuery for fancy looks:
I expect that most people reading this blog knows all about the Raspberry Pi and the charity behind it by now, designed with the aim to bring programming back into the school curriculum and spawn a new generation of coders, it’s had some fantastic news coverage and even people with no idea about computers have mentioned it to me over the last few months. It has been a rocky road, originally it was expected to have been released in late 2011 but finally the much anticipated single board computer has started to be delivered into the eager hands of geeks around the world. Initially only a caseless version of the “Model B” is available, intended for early adopters and developers with a fully cased version being launched for education later in the year. The idea being that by the time it reaches the hands of school children there will already be a healthy eco system built up around it and those preparing educational material will have been able to do so.
At the moment I am just familiarising myself with it and getting a grasp of what it is capable of. I’m running Debian Squeeze on it as that’s my distro of choice for servers and the like anyway and is also what the Raspberry Pi team are currently recommending. As a desktop it’s usable but pretty sluggish, perhaps not as much as expected but it’s potential for me lies more in the home automation and IoT field, £30 for a tiny networked Linux box is unbeatable and with up to 17 GPIO pins, built in UART and support for I2C and SPI it also opens up a lot of possibilities for interfacing to other hardware, a number of expansion boards are already available or in the pipeline. Here is a good primer on Getting Started with Raspberry Pi GPIO and Python.
It might seem like magic but a boost converter or step-up converter is a handy little device that can output a voltage greater than its input voltage. This makes it very useful for getting a consistent voltage in battery powered devices or running a circuit from fewer cells than would otherwise be required. If you don’t need much capacity it can also be a good way of using the last remaining power from batteries that other devices have deemed too flat, connect a few up to a boost converter and you can still get some useful power out of them for a while longer. For more capacity you can add more cells (as long as you keep the input voltage under the output voltage) or use higher capacity batteries such as C or D cells.
The Maxim chip I am using here has an adjustable output (2.7-5.5V) and will work with an input voltage as low as 0.7V.
Obviously it isn’t really magic and this extra power can’t be generated from nowhere, P=IV and all that. What this means in practice is that by increasing the output voltage the available output current must be lower than the source current and will decrease as the input voltage decreases (as the batteries deplete), as seen in the graph on the left below. Efficiency is also dependent on the input voltage and the output current, peaking at around 87% with a 3.3V input and a 5V 200mA load as seen on the right hand graph.
Wikipedia has a better explanation of how a boost converter works than I could give so have a read of that if you’re curious about the details. The Maxim MAX757 I’m using here is an 8 pin DIP chip and requires minimal external components which makes it ideal for a stripboard build, it has an adjustable output voltage in the range 2.7V to 5.5V and can operate down to a 0.7V input voltage, the data sheet seems to imply that it needs at least 1.1V initially to start up but this doesn’t seem to be the case, at least it wasn’t in my testing. This output range combined with the low voltage capability means it is easy to get the two common voltages used with microcontrollers and other digital electronics of 3.3V and 5V from even a single AA or AAA cell although the extra capacity probably makes two (or more) more practical for most uses.
The output voltage on the MAX757 is set by a voltage divider between ground and the output which is connected to the feedback input (pin 2), the formula to calculate the required resistors is:
VOUT = (1.25) [(R2 + R1) / R2]
To get 5V I have used 30K for R1 and 10K for R2, for 3.3V you could use 18K for R1 and 11K for R2.
If you can find it an alternative part is the MAX756 which is a bit easier if you only need an output of 5V or 3.3V as the voltage can be set by connecting pin 2 low for 5V or high for 3.3V which negates the need for the voltage divider arrangement.
These chips also have a low battery output that can be used to light an LED to notify of a low battery, it brings pin 4 (LBO) low when the voltage at pin 5 (LBI) drops below the converters internal reference voltage of 1.25V. This means the lowest voltage you can trigger the warning is 1.25V so you would probably want to leave this off if using a single cell. For a warning at 1.25V you just need to connect pin 5 (LBI) to VIN and an LED with a suitable resistor to pin 4 (LBO). For a warning at a higher voltage you would need to use a voltage divider to output the desired voltage to the LBI pin.
Here is my stripboard layout for the MAX757, the MAX756 would be the same except R1 and R2 would be omitted and pin 2 would instead be connected to ground to select 5V output or to VIN to select 3.3V output.
1 x MAX757 Adjustable-Output Step-Up DC-DC Converter
1 x 8 pin DIL socket
1 x Piece of stripboard, minimum 8 rows by 21 holes
1 x 22 uH Inductor (0.03 Ohm or less, 1.2A or more)
1 x 150 uF electrolytic capacitor
1 x 100 uF electrolytic capacitor
1 x 100 nF ceramic capacitor
1 x 1N5817 Schottky Diode
1 x AA Battery holder of desired capacity
1 x LED (optional)
1 x 100 Ohm resistor (optional)
For 5V output:
1 x 30K resistor
1 x 10K resistor
For 3.3V output:
1 x 18K resistor
1 x 11K resistor
For other output voltages calculate suitable resistors using the formula VOUT = (1.25) [(R2 + R1) / R2]