Friday, March 4, 2016

Det ultimata flaskmatningskittet! (The ultimate bottle feeding kit!)

Av olika skäl blev vårt andra barn ett flaskbarn och efterssom både jag och min fru gillar att optimera bort opraktiska och krångliga saker så plockade vi ihop det här kittet som håller en flaskmatad bäbis flytande i 24 timmar och under en dagsutflykt!

For various reasons our second child became a bottle feeded child and as my wife and I like to optimize away impractical and cumbersome things we came up with this kit that keeps a bottle feed baby going for 24hrs and during a day trip!



Det första problemet är att få 37-gradigt vatten i flaskan var fjärde timme dygnet runt, t ex mitt i natten när man är yr av trötthet. Lösningen är Philips HD9380, en vattenkokare med en speciell knapp för att värma vatten till 40 grader på ca 10 sekunder! För att slippa upp och gå runt mitt i natten så har vi ställt vattenkokaren på ett lågt bord precis bredvid sängen och har ett förråd med kokat kallt vatten i glasflaskor med skruvkork. För dagsturen gör man helt enkelt 40-gradigt vatten och fyller en thermos med. En 0.35L thermos rymmer vatten till två måltider när bebisen är liten och äter ofta. Senare behövs det inte mat lika ofta och då räcker det att den rymmer vatten till en måltid (vilket den gör). Denna lite mindre termos har fördelen att den enkelt får plats i skötväskan.

När man väl fått vatten med rätt temperatur i flaskan så är nästa problem att dosera pulver. Lösningen är att fördosera i en vällingburk med flera fack. Bambino säljer den perfekta burken med 3 fack (köp två så kan man fördosera för ett helt dygn). Då behöver man bara öppna locket och hälla över pulverdosen i flaskan, något som kan göras med en hand i halvmörker mitt i natten utan att aktivera högre hjärnfunktioner.

Flaskor är ju kanske en smaksak för bebisen men vi började med att testa de flaskor som är mest lättdiskade :) Den första vi testade, Tommee Tippee Closer to nature 260ml, fungerade bra efter ett par matningar när hon vant sig. Vi använde den större flaskan (260ml) direkt från starten (5 veckor gammal) och hon använder dom än (8.5 månader). Köp 3st 2-pack så det finns en flaska per fack i pulverdoseringsburkarna plus att du bara behöver diska/koka flaskor en gång per dygn :) 

Göra rent flaskorna är nästa problem. I brist på en automatisk flaskdiskmaskin så diskar man flaskorna enklast med en borste som är specialutformad för flaskan. För våra flaskor var det denna borste med en speciell del för att göra rent i nappens spets där det är svårt att komma åt.

Så där har ni det, det perfekta flaskmatningskittet. Som trött småbarnsförälder är det lätt värt att byta lite pengar mot tid om man har möjlighet! Delar av kittet kan säkert säljas vidare när man är "färdig" för att få ner kostnaden. Men räknar man i kronor per sparad timme och insparat krångel så är det ett väääldigt billigt kit :) 

Kom gärna med förslag på ytterligare optimeringar!

Bugaboo Bee repair (plastic welding!)

We ended up buying a broken Bugaboo Bee from a dishonest seller. The seat was completely broken off together with one of the hood clamps and the fabric and plastic was very worn down. So the question was, do we toss it or fix it? Easy answer :)
Here are some photos of the damages;

Broken hood clamp and whats left of the seat when that broke off.
The broken off seat.
Detail of broken seat, the plastic is charred from the burn test (se below).

The first step in fixing this was to determine the type of plastic used. I tried contacting Bugaboo but didn't get an answer so I did a burn test. You simply try and set the plastic on fire and look at the flame, smoke and smell to determine the type of plastic using this table: http://www.boedeker.com/burntest.htm. I got nasty smelling black smoke and heavy sooting from the seat so I guessed it was most likely ABS (or maybe Polystyrene). I found a source of plastic that behaved the same (T-joints from a drip irrigation kit) and did a test weld that stuck. Welding thermoplastics is done by simply heating two pieces of plastic to their melting point with a heat gun and then pressing them together. It can be quite tricky to get right though so a little poking with a soldering iron is helpful to get a good solid weld. The results aren't very pretty but very sturdy. I could have made the welds look much nicer by going over them with a dremel and sand paper but the welds will be covered by the seat and hood anyways so I decided it wasn't worth the effort.

Seat welded back on.
Hood clamp reconstructed complete with strap holder :)

It was my first time welding plastics and if I'm doing it again I would like to have a smaller nozzle for my heat gun to spare surrounding plastics from melting.

The fabric was as good as new after washing (at higher temperature than recommended ofc) and the plastic regained its luster after cleaning with alcohol and rubbing with vasseline. In the end the stroller looks very nice and works like a charm :)


Thursday, January 14, 2016

Toggle CHIPs LED though REST via node.js

Thought I'd make a quick test running node.js on the chip and what better way than to blink the on-board LED which is accessible on the i2c-bus :)
Clone https://github.com/larsenglund/chipled and cd into the repository folder, then make some binaries to toggle the LED:s (from http://wiki.geeky-boy.com/w/index.php?title=CHIP_Proj1)
sudo apt-get update  # Repair things that that seem to be a little sick.
sudo apt-get upgrade
sudo apt-get install -f locales
sudo locale-gen en_US en_US.UTF-8
sudo dpkg-reconfigure locales    # Select "en_US" locales.
sudo apt-get install gcc make  # Get the C compiler

sudo gcc -o on on.c  # Compile
sudo gcc -o off off.c
sudo chmod +s on  # Allow executables to run with root privilage
sudo chmod +s off
Install node.js, npm and dependecies for the project
sudo apt-get install nodejs
sudo apt-get install npm
npm install
And start the server
nodejs chipled.js
You should now be able to toggle the white on-board LED using the following URLs:
Time to build something a bit more interesting with this CHIP :)

Read more about CHIP at the Next Thing Co (NTC) website:http://getchip.com/pages/chip

CHIP benchmarks compared to Raspberry PI and others

Got my CHIPs from Next Thing Co (NTC) yesterday and just did some quick benchmarks with sysbench to compare the CHIP to these numbers: http://www.davidhunt.ie/raspberry-pi-2-benchmarked/


In summary

* CPU 284s (about 1.8 times faster than RPi1, about 4 times slower than RPi2)
* Memory 1.76s (about 3.5 times faster than RPi1 and even faster than RPi2)
* Storage Random Write 2.76s (about twice as fast as RPi1, about the same as RPi2)
* Storage Random Read 0.65s (about twice as fast as RPi1, three times slower than RPi2)

Raw output:

Thursday, November 12, 2015

Comparison of cheap PCB manufacturers

I wanted to compare price, delivery time and quality of a handfull of cheap board houses to find a good supplier for hobby projects. So I ordered the same design (a 2 layer 35x25mm board) from the following PCB manufacturers;
All PCBs where of decent quality (see pictures below) and came in adequate packaging.
This is a table of cost and delivery time. The cost includes the cheapest shipping option to Sweden.

Manufacturer

Days for delivery
Number of PCBs
Total cost (USD)
Cost per PCB (USD)
OSHpark
15
3
6.84
2.28
ITEAD
15
10
14.16
1.42
Seeed
19
10
14.16
1.42
Elecrow
23
10
14.16
1.42
DirtyPCBs
26
10
14.16
1.42



 


In retrospect I should have created a PCB that tests the limits of the PCB manufacturers with regards to tolerances etc. Donate some coin below to cover the PCB cost and I will do a more detailed comparison.


Wednesday, December 4, 2013

Remove infrared filter from D-Link DCS-930L

The DCS-930L is a cheap wireless camera that lacks infrared LED:s and has a infrared filter in place to block all infrared light. I googled around and found Microfrost blog (http://www.microfrost.com/2011/06/21/d-link-dcs-930l-infrared-capabilities/) and thought I'd removing the infrared filter from the new composite lens assembly that my camera has. It turns out it's not that hard, see the process in images below.

The camera case pops open quite easily and the camera board is loose inside (no screws)

First I tried unscrewing the lens but it was glued to the lens holder so I just ended up destroying the plastic.

When removing the cover, take care not to break the little snaplocks like I did..

Instead of trying to remove the lens I just removed the whole assemly. It's mounted using some sort of silicone so I just pulled it off with a pair of pliers. The infrared filter is now clearly visible in red.

I removed the filter by pressing a tiny screwdriver along the edges of the filter, shattering it and removing the pieces/dust. (removed pieces of the filter is visible in the picture)

To the right you can se the silicone still left on the PCB where the lens assembly was mounted. After removing the infrared filter I put the lens assembly back in the silicone "holder" on the PCB.

And fastened it with some hot glue.


Unfortunately I ended up with this image. Lots of stains/spots and a very short focus distance. So I removed the lens assembly again and saw that there was alot of tiny dust particles on the image sensor. These could easily be removed. To fix the focus I had to move the lens closer to the image sensor. This meant that I had to carve away some plastic at the bottom of the lens assembly (the part that touches the PCB) with a small knife.

I put the lens back and the focus distance was better and the spots gone. There is a slight blurring in the right hand side of the image due to a small scratch I happend to make in the lens when removing the IR-filter.
That's it, now the camera can see infrared light. You can also add an external infrared illumination source if you want even better visibility. Check Microfrosts post about this: http://www.microfrost.com/2011/06/21/infrared-led-assemblies/

Monday, August 5, 2013

Volvo 945 lambda sensor diagnostic (Arduino ADC data logger / oscilloscope)

If you came here just for the arduino datalogger/oscilloscope you can skip the next section of text.

My Volvo 945 failed the yearly inspection with the comment "engine disturbance, unable to measure exhaust enviromental values". After a tip from a car mechanic and some googling I settled on that the problem must have something to do with the lambda sensor and is probably due to a crack in the exhaust pipe right before the catalytic converter. I have tried to patch it once but it is exposed to intense vibrations from the engine so the patch now has a crack in it. Air gets sucked in to the crack and enters the catalytic converter where the lambda sensor is located, leading it to detect exhaust rich in air and thus falsely making the Engine Control Unit (ECU) think that the engine is running lean and in need of more fuel rich mixture. This makes the engine run rich with sluggish, uneven performance and increased fuel consumption as a result. To make sure that the crack is really the culprit and that the lambda sensor is working OK I decided to record the output of the lambda sensor with an oscilloscope, as suggested on lambda powers site, before and after fixing the crack a second time.

To be able to sample the lambda sensor I searched around for a arduino oscilloscope but found no really good software. The one that came closest was xoscillo but I couldn't make it record long periods (several minutes) of samples and display as a graph. So I decided to put in a couple of hours to code my own "oscilloscope" which is more of a data logger with a graph view. The PC application was done in C# in Visual Studio 2012 and the arduino code was done in the arduino environment. The application features saving and loading of data logs (for later inspection and analysis), a zoomable, scubbable real time graph and exporting of the graph as PNG/JPG/GIF/BMP.

Screenshot of the application.

Since I didn't find any good apps out there to do this I put the code (click here to go directly to instructions on how to download/check out the code) on google code for others to use as a quick starting point to get up and running with data logging from an arduino.

I get around 500 samples per second (sps) at 10 bits per sample and 9600 baud. So the sample rate could probably be increased by several orders of magnitude by increasing baud rate and switching to 8 bit samples but 500 sps was plenty for my purposes.

Hopefully this is useful to someone, enjoy :)

Update: The car successfully passed inspection yesterday! The test-run after patching the exhaust pipe showed beautiful lambda curves so I had high hopes it would indeed pass :)