Sunday 30 December 2012

Happy new year: 2012 summary (+ meta-meta)

Hi, and welcome to my last post at 2012. This blog entry will be mostly a summary of things happened at 2012 while making some announcements and vague promises of the upcoming posts.
Ir controlled 4 channel mini helicopter, opened for modding.

Firstly: I know that I have not been nearly as active as I should have been, and I have not even bothered to write a decent Meta about it. Sorry, but I thought that it would be too distracting of the main material to start ranting about things that had not happened. For that, I have now (finally!) decided that I revive my older, long-died blog channel Some quick notes , which I have been neglecting since late 2008. I will post a longer explanation there, and try to limit Meta at this channel to minimum.

One of those 720*480 keychain video cameras.
At these pictures you'll see one of the meny non-finished projects from 2012. It's an remote controlled (4 channel) mini helicopter and miniature video camera, both taken apart for modification. I got this idea of combining these two for couple years back. All this said, I'd expect to get them together someday early 2013 for the first test flight footage.

Of other projects, the Pic based thingy I mentioned back at this entry has not moved a bit since last March or so. Overall it's still valid thingy, and I have not seen similar anywhere. So, with some luck, I'll be getting it ready too, someday.

Besides these two, I have had some practical 'Fix-them, don't trash them' articles in mind with practical real world ideas of renew/recycle. Like repairing everyday items with the materials one could expect to find from electronics-tinkerer's workshop. Also more uses of Sugru, for example repairing and tuning shoes, zippers and coffee mugs.

Also, I still have the unpublished hour-long interview of @Jeri Ellsworth , which I shoot with my mobile phone a year ago (Alt Party, Helsinki). The raw video footage is quite ok, but the sound quality were bad since I didn't have any external microphone with me and the site was LOUD. I have not yet decided what to do with it, releasing it at youtube could be one option.

So, all in all. I do hope that 2013 will be more active year for me with this blog. I'll hope I will get some backlog cleared and the new projects going.

Sunday 20 May 2012

Rebuilding old Power pack (Hitachi B-2 for DRC-10K)

Hitachi DRC-10K... Slightly used, like 30 years
My father has this three decades old Hitachi DRC-10K cordless drill and against all odds it has proven to be nearly indestructible. Unfortunately rechargeable NiCd batteries tend to wear out and thus need replacement sooner or later. Even thought 3rd party power packs are still available those tend to cost around 40 Euros (50USD) before delivery, taxes etc.. And quite frankly you can purchase all new cordless drill with price like that.

B-2 type power pack (once opened)
So.. Alternative is to replace the battery elements inside power pack. It's actually quite easy to do and saves easily over 30€ when compared of purchasing new pack. Of course it'll take some time and effort, but for someone willing to DIY and values recycling, it's the right way to go. 

Six new NiMh cells soldered together
First part of project is opening the battery pack and checking what type and size the batteries are. Opening the pack depends a lot of the pack itself. Hitachi's original B-2 battery is sealed with some kind of glue, so you'll need to use some real force and mechanical tools. I had opened this particular pack earlier (10+ years ago?) and by the looks of it, I must have used tools like hacksaw, sharp knife and screwdrivers. In the end the tools don't matter so much, as long as you don't break the cells inside pack or hurt yourself.

Heatshrink protecting joints
After opening the pack one has to check what size the rechargeable cells are. At B-2, there are six sub-C elements (size approx. 40*20mm). For this purpose it's convenient to use cells with metal tabs on them. Easiest way to get cheap replacement cells is to search net sellers from sites like Ebay. Unfortunately I can't really recommend any of those stores, since they tend sell whatever is available, thus there is no real guarantee of the quality or capacity of the cells.

After opening the power pack you'll need to unsolder the power wires from old batteries and start preparing the new ones.  First duplicate the layout of the batteries and solder metal tabs together. As these differ for each pack I can't give more explicit guide here. Just be sure to check polarities and cnnect the batteries just like old ones were and it will be ok.

Twist, test and solder power connector
With B-2 power pack it made sense to build two sets with 3 batteries each and bend them so that they fit into existing enclosure. I decided to use soldering which is ok, as long as on don't burn the batteries with overheat. I also decided to cover connections with heat shrink tube.

Next is soldering the power connector wires to batteries (remember polarity) and stuffing these renewed innards inside existing power pack enclosure. I decided to use some hot glue to keep power pack safely closed.

Rebuild powerpack alongside modified Hitachi charger
For testing I did charge the battery pack with modified hitachi charger. The original charger (30 years old) was designed for using with NiCD only. Since NiCD are harmful to environment I have lately been using NiMh batteries instead. With NiMh batteries there was need for new type smart charger (with Delta-V detection). As a bonus this new charger is also faster and can handle both types of batteries.

Old NiCd batteries I've used years ago
After a couple hour recharge, the power pack was inserted to drill and tested to be on working condition. I have not done any power tests so I have no idea how good these new batteries are, but I'll expect to hear comments as soon as my father needs the drill next time for some tinkering project he has.

And that leaves the last part, trash disposal. Making sure that those old used NiCd batteries I had used years ago at previous Rebuild will be properly handled and processed as an special garbage. I have no idea how harmful NiCd batteries really are, but at least in EU area those are under strict control, so one has to be careful how to dispose them.


Meta:

I know... I have not been making these updates as often I ought to, for keeping this blog interesting. So sorry, not having any good excuses either, no mystic NDA projects, no family issues etcetc..









Saturday 3 March 2012

Surgu, part 2, the first fixes. Zi-10 and Huxley


Zi-10 next to sugru bags
To start with Sugru, I decided to hack something easy and useful. I have been using this Kodak Zi-10 1080P pocket video camera for making my youtube videos for some months now, and all in all it's really nice thingy. And for the price (about 60€ on Ebay) you can't really expect it to be professional quality or having all bells and whistles.

Perhaps the most important feature of this camera is 3.5mm stereo microphone connector, which allows me to use either Headset or other external microphone to record the audio with a improved quality. This may not sound much, but it's really difficult to find any inexpensive digital camcoder with external mic connector. Of image quality, it can't really be considered as a real 1080P system since the lens and imager element aren't really good enough. But it works nicely at 720P resolution, and that's what I use for my videos.  On the negative side (besides optics) is the mechanical design and ergonomics (lack of). The camera is made of shiny slippery plastic and don't have any kind of grip, so it's a bit hard to handle.

Five grams of blue Sugru
So, I decided to add some Sugru at the front side of camera. But there was the hard decision of colour to be used, since Sugru comes in five different colours (Black, White, Orange, Green and Blue) and for those more adventurous.. it's possible to mix them. In the end I decided to go with blue, black while obvious would been a bit too modest and shy.

 

Stylish? Not much, but it works.
One thing to remember with Sugru is the package type. Those small 5 gram aluminium foil bags are individually sealed and when opened, you don't have many hours to work with the material. So it's better to keep one or two smaller side projects ready in case you happen to have some excess Sugru after the main project is done. After all, why waste the good stuff?

Firstly I cut the aluminium foil bag open with scissors. Then I took the plastic and kneaded it a bit on my hands and made two balls out of it. First ball (2-3grams) I spread at the front side of the Zi-10 video camera. For texture the sugru at the camera, I used plastic comb and pressed criss-cross patterns for improved grip.


Feet of my Emaker Huxley 3D printer.
As a spare project I used Sugru for adding some flexible padding to the feet's of my 3D printer. The printed plastic legs tend to slid a bit at the tabletop, so the silicone-rubber like Sugru may keep the printer more steady.


While writing this post I once again remembered that I should really start taking proper high grade pictures for these blog posts. One of the near future posts I should write about using digital SLR-camera with home made light-tent / soft box. Otoh, I'll need to make it first. I know that some cheapish Chinese photographing tents are available at 30-50 Euros, but I think I'll rather use the materials I have here at home.

PS: If you notice typos at my text, please send send a comment. As a non native speaker of English, I know my lingo aint' 100%. 

Wednesday 22 February 2012

Sugru: So, what to do with it?

Some time ago I decided that I'll need to look and test this relatively new material called Sugru. In simplified terms, it's yet another kind of moldable plastic. I would say it is kinda like self curing silicone, freshly out from the bag it's soft to handle and sticks well to various materials. During some hours at the room temperate, it will dry and Sugru become rubbery like material. There are no resellers at this part of the world so I ordered my first 12 minipacks directly from manufacturer.

Packing is functional, and in a way these aluminium bags do look kinda stylishly futuristic and flashy. Outermost was the normal brown envelope (with address label), inside it a single bigger aluminium bag with ziplock. Inside this bag were twelve 5gram packages of Sugru (assorted colours) and short instruction and inspiration booklet for helping one to get started.

I really like their slogan "hacking things better", it tells a lot about the attitude this startup company works. Their website has plenty of user posted pictures and stories how this new material has helped these people. 

For myself, I have not yet decided what to build/hack with this first, but I allready have some ideas so I'm quite sure I'll be able to use all these packs while the material is fresh. Even though the Surgru is well packed to those individually sealed aluminium foil packs, it will stay fresh only about six months. So, expect to see something more interesting coming with Sugru on it.

Friday 3 February 2012

Living in Freezer, or Got the package, 2032 batteries and other neat things.

Sorry.. It's been way too long time without updates, I'll try to be more punctual. Freezer related stuff will be At the end.. Just have to put one picture for a teaser.



The parts I ordered at the end of December have finally arrived. I'm sure I could have sourced most of them locally, but the price of projects could have raised a lot. The most important was the 20-pack of 3032  lithium batteries (under  3€) and single lens sunglasses  ... (these links open sellers page on new window, go see them. I'll wait here).

I'm sure someone clever reading this post may well guess what's I'm building, but if you'll comment this project, please don't spoil until I have the prototype made. I will then shoot a video of it, though I may need to find someone volunteering to be front of the camera :-)

According the feedback on sellers page, there can be some duds amongst those 3032 batteries. So I checked the voltages with a multimeter and they seem to varies between 3.1 to 3.4 volts. According the typical data sheet (pdf file) these voltage levels indicates these batteries are essentially new. The first voltage drop at the begin is really sharp and the nominal battery voltage is 3 volts.

During the use the battery voltage will keep  relatively steady around 2.9V until at the end voltage sinks rapidly towards 2.0V which is the official cutoff voltage. So, these batteries are just perfect to use with low power microcontrollers without need of any voltage regulation. And with low enough static power drain, there's not even need to add any kind of power switch at the circuit.

--- And Back to Freezer part.. These photos are taken with my trusty old E-510 digital SLR with Zuiko 14-54 lens. That does not sound like worth mentioning, until I remind that lately we have been having temperatures between -20 to -29 Celsius (-4 to -20 Farenheit) and I spend 2 hours finding the right shots. These images are Straight-from-camera Jpegs, with no post processing (website does scaling).


First two pictures are from University campus area and the last one from city harbour.






Wednesday 18 January 2012

Timer Interruptus...

Slowly but steady goes the progress.I have now added Timer 2 interrupt handler and real time (1ms accurate) clock to my code. With this timer system I don't need to use busy looping for time keeping and I can later adjust the system for other real.time needs.

There are two important key parts to consider at this version of program. The interrupt service routine and the Timer2 initialization routine.

The interrupt service routine itself consists of three parts. At beginning, it saves the W and STATUS registers so that those can be used at interrupt without distrupting the main program. I have selected unbanked RAM (at 0x70-0x7f) for storage cause those ram locations are always available. Also it's essential that these same registers are restored before returning from the interrupt handler.

Middle part of the routine looks quite a simple for now. There is just increment of the multibyte millisecond counter and reset of timer interrupt flag. This code will grow at the future depending what applications I'll make with this micro controller.

Next likely parts will be implementing interrupt based software serial port, transmitting for debug purposes. Most likely I'll use 9600bps and try to keep the code minimal. After that the next possible direction is to make test routines for the A/D converters.

After those.. I hope I'll have all the parts for an application I've been wanting to make for some time now, the parts are in Slow-mail coming from another side of the earth so there is no  telling when they manage to appear.

--- Cut here.. Code follows

; minimal -led blinker
; V2 with Timer2 interrupt

; Uses Timer2 to generate 1ms timer interrupt

;PortC pins:
; RC:0 = digital out, led active high

  #include p16f616.inc 
  __config _INTOSCIO & _WDT_OFF  ;   8 Mhz int-osc with IO:s
      

 ; define Data memory
inner equ 0x20
outer equ 0x21
 
 ; Bank shared memory (0x70-0x7f) used for Interrupt
 ; Interrupt backup registers
int_w          equ 0x70
int_status     equ 0x71
int_pclath     equ 0x72 ; not yet used at interrupts
int_indf    equ 0x73 ; not yet used at interrupts

 ; Debug serial port (Note.. buffer location not yet determined
ser_tx        equ 0x74  ; Zeroes reg after send
ser_rx        equ 0x75  ; 0 = no data
ser_status    equ 0x76  ; Todo! ; Define modes/error codes


 ; 24-bit ms tick counter (allocation for 32-bit int)
ms_32     equ 0x7c
ms_high equ 0x7d
ms_med  equ 0x7e
ms_low  equ 0x7f
               
  ; Start from reset vector
  
  org 0x00 ; obvious, but just in case.
  goto Main ; Skip over interrupt vector

  org 0x04 ; Interrupt vector
Intserver
  ; Save W, STATUS  (3 cycles)
  movwf int_w
  swapf STATUS,W ; only way to move status without affecting the Z-flag
  movwf int_status

  ; Real interrupt routine (remember to clear the interrupt)
  ; note: We have no idea about status flags (including RP0)
  ; Since this interrupt happens every 2000:th cpu clock, we'll just
  ; increment the ms-counters 
  movlw 0x01
  addwf ms_low, F
  btfsc STATUS, C ; if carry not happen skip increment
   addwf ms_med, F
  btfsc STATUS, C ; if carry not happen skip increment
   addwf ms_high, F
  bcf PIR1, TMR2IF ; Clear interrupt 


Intserver_end
  ; Restore W, STATUS and return from int (6 cycles)
  swapf int_status, W
  movwf    STATUS 
  swapf int_w, F
  swapf int_w, W  ; return W without messing with Status flags   
  retfie ; return with interrupts enabled.

  org 0x100  ; main program
Main
 ; Init IO ports
  BCF STATUS,RP0 ;Bank 0
  CLRF PORTC ;Init PORTC
  BSF STATUS,RP0 ;Bank 1
  CLRF ANSEL ;digital I/O  (disable Analog Inputs)
  MOVLW 0xFE ;Set RC<5:1> as input
  MOVWF TRISC ;and set RC<0> as outputs
  BCF STATUS,RP0 ;Bank 0

 ; Init Timer2 and real time clocks
  movlw 0x00
  movwf ms_high
  movwf ms_med
  movwf ms_low
 
 ; Sample of Timer2 settings for various interrupts at 8MHz xtal.
 ; Values in decimal.
 ; Clk    PR2    Pre    post    Usage
 ; 2000    125    16    1        1ms timer for real time system clock
 ;  208    208     1     1         9600 bps Tx async debug serial
 ;   69  69     1    1        9600 bps Rx async debug serial (3* subsample)
 ; Last one will tax system badly

 clrf TMR2
 bcf PIR1, TMR2IF ; Clear interrupt (should be anyhow)

 bsf STATUS, RP0 ; Bank1
 movlw 0x7d ; 125 decmal
 movwf PR2
 bsf PIE1, TMR2IE ; Allow timer2 interrupt.
 
 bcf STATUS, RP0 ; bank0
 movlw 0x06 ; Prescaler *16 + OscOn. 
 movwf T2CON ; Set t2 scalers + start the timer  
 bsf INTCON, PEIE ; Enable periferal int
 bsf INTCON, GIE ; Global interrupt enable
 

Loop
  movf  ms_med,W 
  movwf PORTC    ; Blink period of 512 ms

  goto  Loop             ;Do this repeatedly

  end                    ;All things must end someday

Saturday 14 January 2012

Microcontroller Ahoy

And here we are. No more talking about 3D printer or parts I have designed and/or made (*), now it's time for some microcontroller projects.

Couple days ago I ordered basic programming tool and ten Pic 16F616 controllers. Pictured here is the first test circuit running short program I made earlier today. Here Pickit2 is used as programming device and also it provided the power for running the test circuit. LED with current limiting resistor is connected from RC0 (Pin10) to  ground, and the one small capacitor is located between 16F616:s ground (Pin 14) and operating voltage (Pin1) for filtering the power fluctuations at the circuit.

Prototype board with Pic 16F616 connected to Pickit2 programmer
This is not the first time I have been using Microchip Pic chips, since my first Pic based projects were made with classic 16C84:s like fifteen years ago. This 16F616 has a lot improvements compared to that older chip. Having multiple timers and option to use Timer1 with 32Khz quarts to build real time clock will be handy. Also the build in 10-bit A/D converter will have it's uses as will the extended PWM -modes available. 

Making assembler code for these cheap-class  (about one Euro, in small numbers) controllers is a bit like driving a bike, you have learned it once and you'll have the skill rest of your life. Of course it can take few hours to get all necessary manuals and data sheets, and some time will be spend on software and tools playing nicely together.



My bit kludgish  asm-source follows, in case anyone is interested. :-)

; Not so nice example.
; PortC pins:
; RC:0 = digital out, led active high

  #include p16f616.inc 
  __config _INTOSCIO & _WDT_OFF  ;   8 Mhz int-osc with IO:s
                      
  ; Start from reset vector 
  org 0x00 ; obvious, but just in case.
  goto Main ; Skip over interrupt vector

  org 0x20  ; main program
Main
  BCF STATUS,RP0 ;Bank 0
  CLRF PORTC ;Init PORTC
  BSF STATUS,RP0 ;Bank 1
  CLRF ANSEL ;digital I/O  (disable Analog Inputs)
  MOVLW 0xFE ;Set RC<5:1> as input
  MOVWF TRISC ;and set RC<0> as outputs
  BCF STATUS,RP0 ;Bank 0

Loop
  incf  PORTC,F   ;Read PORTC, add 1 and save back
  goto  Loop      ;Like forever


  end             ;All things must end someday



(*) PS: As a footnote I'll want to show you one thingy I designed couple days ago. It's a kitchen towel hook, made to fit at two centimeter thick cabinet doors. Drawings and prints are available at request.




Towlie, a homemade kitchen towel holder.

This is something I was looking for some time ago and could not find one from any shops. A simple hook that will hold the kitchen towel right where I need it.

I used to keep the towel folded atop of the cupboard door, but it tends to slide of and drop to floor. With this simple hook, the towel won't fall, but it's easy to access. And when printed with clear PLA it next to invisible.

As usual, 3D design is made with Sketchup program and then converted to STL with exporter-plugin.

Apparently I entirely forgot to make post of my Towlie-design. So I will backdate this to around the time I uploaded the files to Thingiverse. I originally designed this thingy at 10th Jan 2012 but uploaded it at 14th.

Original design files available, with free CC lisense. Just download and print as many as you need. I'd like to hear your feedback of this design, does it work or not, does it need any modifications or is it good just as it is?

Saturday 7 January 2012

New year, old stuff, aka: Short intro to Polymorph

With all interest to 3d printing I've been neglecting some other ideas way too long. So now is high time to start introducing some older stuff. And I think Polymorph is a good start.

Polymorhph, as sold, white granules
Polymorph: Also known and sold with names like Friendly Plastic, is a relatively new plastic polymer that softens at the hot water. At room temperature it's while and feels a lot like Nylon, a bit flexible and not at all brittle.

When heated to 70 Celsius (or so) it becomes clear, a bit sticky putty that can easily be shaped by hand. There are many ways you could do the heating but I prefer pouring some freshly boiled water atop and let it melt for a while.

Home made phone-tripod adapter
One of the first things I did with Polymorph was a tripod adapter for my smartphone. For some reason, even though most of today's phones have video recording capabilities, there seems to be no way to connect these to tripods.

Making my own  tripod adapter was quite simple: Firstly I covered relevant part of my phone with clear packing tape, so I can be sure the melted pastic don't take too much hold.

Attached to desktop tripod
Then I took the heated, flexible polymorph, removed the excess water of it and started to shape it around my phone while making sure I don't cover anything important, like touch screen, connectors or buttons. 

As soon as polymorph was at the desirable shape I pressed it (along my phone) atop of my tripod head, so that plastic got around the 1/4" bolt that's used for fixing the camera, and I let the plastic cool back to room temperature.


After some wait, I then removed camera from the now white solid part and removed the protection tape of the phone.

The adapter works well, and keeps phone steady for making videos. At the same time: This adapter was/is a quick hack, so there's definitely not much hope winning any industrial design awards with it. ;-)

All in all, I have used Polymorph quite few projects so far and I like the speed I can use it to make the unique objects I need. It's also good for making low temperature molds of existing objects and repairing things.