August 31, 2013

Tutorial: Create a 3D Printable cube with OpenSCAD

Download, install and launch OpenSCAD.

Type "cube(10);" in the edit box to the left.

In the menu select:
Design-> Compile and Render (CGAL) or press F6

and then:
Design-> Export as .STL

Give your file a suitable name e.g." my_cube.stl"

Print the file on your 3D Printer by loading the .stl file in you printer software.

Here is a good source to learn more about OpenSCAD:

August 1, 2013

[SWE] BankID hänger webbläsaren

BankID is an electronic identification and signings system used only by Swedish banks and governmental agencies therefore this post is in Swedish.

Jag har på senare tid haft stora problem med mitt BankID som använder kortläsare. Det som händer är att webläsaren hänger sig när man ska logga in och det blir bara ett vitt fönster. Det händer både i Firefox och Internet Explorer. Det verkar oftast hända när man byter användare.

Lösningen verkar vara att stoppa den process som kör BankID. Gör så här. Stäng ner webbläsaren och öppna aktivitetshanteraren (ctrl+alt+del). Välj processer och letaupp "Personal.exe" och avsluta den. Starta sen webbläsaren på nytt och logga in.

June 13, 2013

Random numbers with Arduino

I was looking for a good random numbers function for Arduino. Here is a summary of what i found so far.

Pseudo-random algorithm

An algorithm that produce a sequence of numbers. It will generate the same sequence every time it is used. The built in Arduino library uses this method.

Sampling an unconnected analog input

The TrueRandom library used this approach. Seems to producing more 0s than 1s.

Independent Counter

The probably_random libray uses two counters with independent sources. Seems promising.

TRNG (True Random Number Generator) module

The Atmel SAM3X8E on Arduino DUE has a dedicated block for random numbers. There is a library available for this: advancedFunctions.

May 17, 2013

Electronics Home Lab

I have built my home lab inside a computer cabinet (IKEA Husar). It has a pull-out keyboard shelf that I use it as an extension of the workspace when the doors are open. My inspiration came from a friend that had built his lab in a two door closet. The main idea is to have a workspace that can be closed when not used and to be able to resume my work later. I have used this lab for nearly ten years and I am still happy with it!

In the upper part of the cabinet I keep commonly used tools and instruments. On the top shelf are two PSUs, a signal generator, assortment boxes with components, the SMD component kit and shelf trays with cables and small tools. On the lower shelves are things like multimeter, callipers and a power drill. At the bottom is the work space with a soldering station. On the left wall are screwdrivers, wrenches and pliers. To the left are cables hanging on hooks.The thing hanging under the shelf is an old radio scanner. You can also see a small vise hanging on the front of the workspace.

The lower part of the cabinet is used for storage of less commoly used things and toolboxes. To easily find what I looking for I use stackable clear plastic boxes.

When the doors are closed it blends nicely in to the rest of the apartment so that the muggles don't find it ;-)

May 7, 2013

Follow me on Twitter

I will start post my blog updates and other interesting things on twitter. My user name is @pthalin.  Follow me by clicking the Follow button to the right on top of this page.

April 26, 2013

Stop motion with Pentax K5 and Arduino

Sebastian Setz has created an Arduino library that can emulate an IR remote for a system camera. It supports all major brands. I created a sketch that takes a picture when i push a button. I used it to create a stop motion movie where it is important not to move the camera between shots. This library could also be used to make time laps shots where the camera takes pictures at a defined interval.

Below you can see my set up for the stop motion. To make a video of the jpg images i used MakeAVI.

Here is the video.

April 16, 2013

Develop for Arduino on Android - ArduinoDroid

ArduinoDroid is an Arduino development environment (IDE) for Android providing (almost) the same functionality as the computer version. Almost since not all boards and functions are supported yet. An OTG cable and Android device capable of OTG are needed to upload code to the board.

I loaded the app on my Sony Xperia V and compiled the blinker example.Then I connected the Arduino UNO and upload it without problems! A great job done by Anton Smirnov that develops this.

My set up.