Tuesday, 25 March 2014

Friday 21 March 2014

'her indoors' bought the grand children a new portable DVD player. Now you may ask "what has that got to do with the price of chips?". That means I have to play with it. Pretty impressive, 9 inch LCD, plays DVDs, but it also includes a TV tuner (Analogue only) and it also includes USB memory stick, not at all bad for £25. DVDs are a big thing with the grand kids, we buy the DVD (so they have legal rights to watch it), but they want to watch it on iPhone, Android phone, TV, DVD player etc. So muggins here has to convert.
Conversion is always tricky :-(
Video formats: Basic video contains 2 basic lumps of data, that is sound and video, the 2 need to be in sync, otherwise they look funny, mouth movements don't match voice etc. (this is called lip sync). There is also TONS of this data. Sound is basically just a waveform. Video is usually a sequence of pictures, much like the old cine films, you flash each still up in sequence and you get moving pictures. Problem is the size, take a very small 160 x 120 picture (looks totally pathetic on screen, not worth having), now multiply that up = 160x120=19,200 pixels per picture, consider 16 colour (very low quality, look bad on PC), you need 16 bits (2 bytes) per pixel, multiply that up 19,200x2=38,400 bytes per frame, say 15 frames per second (low frequency, nice is 20, normal is 30), multiply that up 38,400x15=576,000 bytes per second. So you can start to see that the data for a standard 2 or 3 hour film is going to get BIG. So the data is compressed, both the video and the audio are compressed and there are a number of different types of compression that can be used for both, once compressed, these 2 lumps of compressed data are packaged up into a file format (way of storing to USB, Disc, DVD etc.).
The R&D team making the kit knows this well, but the sales, marketing and manual editors are all between them and the customer. What makes it to us is just the file format, what compression types, audio types and video sizes is not mentioned. Video conversion software guys know this, some software will let you convert for a particular mobile phone and that's wonderful, but doesn't work for kit not listed, some list just the formats, then you need to play.
So, I spent the whole of Friday night converting kiddies programs, Grandpa in my Pocket, Mr Tumble, Charlie and Lola. Another thing worth remembering when viewing kids programs, leave logic behind.

Saturday 22 March 2014. Daughter and Grand children staying. Fixed washing line, fixed outside lights. They have a pink Murphy 24 inch flat screen TV, but it has stopped remembering it's channel settings and the DVD is making a loud noise. Pulled it to pieces, nothing obvious, ordered a new main PCB, played the DVD all day, no noise, but by evening it stopped working, motor probably dead, will look at that when I fit the new PCB when it arrives.

Sunday 23 March 2014. Did Roast Chicken, Son, gf, and gf's nephew came over, 5 adults, 3 young children for lunch. The frozen stuffing balls I made worked a treat, cook from frozen, new potatoes fried in Acti-fry, plenty to go around, everyone ate lots.
Got fascinated by Clear ABS. Used it for making the night lights, pretty good as a light diffuser, printed at single layer it's actually almost like smoky glass, but too fragile, 2 layer 0.2 thick is pretty good, started making a clear glasses case out of flexible clear plastic, should look cool.

Monday 24 March 2014. Tenvis Wifi camera arrived (£34 from Amazon), set it up in living room, then sent url, user and pass to daughter in SMS. Lots of belly laughs :-) Wife watching telly, "Hey, that 'thing' is moving on it's own!!!!!", holding a chew for our dog Jack, gets a text "What type of chew is that?", what!!! All a lot of fun, you had to be there. Later it all settled down, sent same SMS to Son. Wife sitting eating a bag of crisps, gets a text "What flavour are they?", wife goes ballistic, really good night.

Tuesday 25 March 2014 (today). Iteratively printing glasses case whilst writing this.

Thursday, 20 March 2014

Daily Monday 3rd March 2014 - Thursday 6th + thoughts

Monday 3rd March 2014
'Her Indoors' likes those little garden sun powered lights, especially the £1 ones that color change red / blue and green. Nice week-end, grand children helping her in garden, one of the plastic ends that allow the light to be driven into the soil got broke. Knocked up a new one in OpenSCAD, failed to print.

Tuesday 4th March 2014
Re-designed, printed 2 (1 for spare), job done.
We have B&Q fans mounted in all bedrooms and computer room, they are great, large ceiling fan makes it cool in hot weather, light and fan are remote control, off/on and dimmer, nice kit.
Some time back one of the glass bulb covers got smashed. Can not find replacement anywhere. Been naked bulb in son's room for over a year, but Son now moved into his own house, we take over main bedroom, so light needs fixing.
Got clear ABS from night lights.
Used OpenSCAD to create replacement design. 1st print not so good, too sloppy into fitting, too fragile.

Wednesday 5th March 2014
Re-designed, printed, fits nicely, can't actually tell difference between original glass and printed. Quite chuffed, job done.

Thursday 6th March 2014
No pending small jobs, washing line snapped yesterday, need to climb tree and re-fix, bulb gone in automatic light outside kitchen door, but nothing that can be done in evening. Decided to create this blog.

Other thoughts / possible projects
When I said I built my printer, it cost only £250 because I created the parts myself.
Hot end is actually key to 3D printer, it is the main part, at the time I could have bought a 'J-End' for around £60, but I wanted to understand. I did not have a lathe at the time (bought since). So I created the main part on my pillar drill from a 6 mm steel bolt, created the PEEK mounting using pillar drill. The heating element is nichrome wire. I've had a few minor problems with it, but on the whole it works well and it's nice and small (less than 30 mm long).
I'd like to create a new brass hot end, I have 6 mm brass bolts, I now have a lathe, attempted once, but 0.35 drill snapped off drilling hole (being too clever, should have done using hand PCB drill).
So, that project is New Brass Hot End

I would quite like to try moving Wade Extruder off X-Axis using Bowden tube. I have got the PTFE tube, but that's as far as I've got so far, not taken a serious hit at it yet, garage not pleasant in winter. Moving Extruder off X-Axis should make it lighter and faster. So, that project is Bowden Extruder

I used to create PCBs using photo etch, buy photo resistant covered PCB material, I could expose using wife's forgotten sun bed (yes, a 6 foot by 4 foot UV light box!!!!!!), but sun bed is long unused packed into garage, so I bought an old monochrome laser printer off Ebay (£12), I tried direct transfer using normal paper. I produced my 1st attempt RF Id reader using it. Looked really good during etch, it wasn't until fully assembled that I looked closely under a magnifier and realized that there were micro fractures all over the damned thing. Now using laser photo transfers from Maplin, but I would like to revisit direct transfer.
So, that project is Direct Transfer PCB

Along the way to current PCB method, I tried ink jet printing direct to PCB. I bought a cheap printer from Amazon for £30, but it was the wrong one, not flat bed and the recommended ink is all pigment based, which does NOT go through Epson jets designed for dye based inks. But that does mean I have a supply of pigment based printer inks. PLA and ABS in natural state are cream coloured. You can get clear ABS where they remove the natural impurities, but you can not currently get clear PLA. But I digress.
All coloured ABS and PLA is coloured using pigments. I don't know if pigments in ink are the same as pigments used in plastic manufacture, but I do know they are both pigments. That leads to the thought that maybe I could alter the colour during printing. I am thinking that I have 4 syringes, use threaded rod to drive plunger, use a small stepper motor per syringe, same colours as standard printer (cyan, yellow, magenta and black), maybe get some 7/02 PTFE wire, remove wire and leave PTFE thin tube. 4 colours, 4 syringes, 4 thin tubes. Tubes end at some kind of very small washer shaped metal arrangement that can be attached to business end of Hot end. Plastic extrusion gets coloured, mixing may be a problem, but extruded plastic thread could get coloured around outside (middle doesn't matter, not seen).
Modify firmware, drive overall colour feed so that colour feed is matched to extrusion speed, each colour varied to make up overall feed, quantity of each colour specified in G-Code. I noticed recently that a commercial printer has just been published as the 'worlds first full colour, multi material 3D printer', nice, and a snip at only $80,000. How cool would a Full Colour Reprap be?
So, that project is Full Colour Raprap. Would definitely mean a lot of experimentation, but doable, might not work, but really cool if it did.
Hey presto, we have Reprap full colour 3D printer. But we have another major problem. Current 3D printing is based upon STL files, STL does NOT support colour, that means creating new color STL (CTL?) then modifying OpenSCAD and Slic3r, both are open source, but quite a daunting task.
So, that project is Full Colour STL. Probably too much for one man to do, I have the skills, but it would take a very long time.
Now, I did consider a stop gap, a simple bit of software, take in a standard JPEG, that gives colours and X/Y co-ordinates. Allow user to drag out areas and/or pixels to required height, that gives X, Y and Z co-ordinates. Turn a photo of a loved one into a 3D mask. Probably not too difficult to go from X/Y/Z co-ords straight to G-Codes. I did play with C# and a few very interesting 3D libraries, but that is as far as I got, really need to prove we can print in colour first or this is pointless. But project would be Jpeg to Colour G-Codes.

I buy interesting bits on Ebay:
I recently bought a Real Time Clock module, nice little PCB, full battery backed, includes battery all for 99p!!! Like to play with it (not arrived from China yet).
Daughter would like a new night light, 2 shades, say moon and sun shape, probably white moon on always, yellow sun on demand. Needs display and a few buttons to set time like Alarm clock. Idea is that Sun comes on at a set time in the morning, show young children when they are allowed to get up. Our grand children do seem to like to wake at various times between 05:00 and 08:30. The Real Time Clock Module would be invaluable here. That is Social Night Light.
I also recently bought a pair of modules, an RF transmitter module and matching RF receiver module, both have GND and VCC pins, transmitter has 1 DATA pin, receiver has 2 DATA pins, curious, need to play with them, but both really small and cool and both cost 99p!! No idea how to use these yet.
Previously I got hold of a load of very small motors, 11 mm long, about 2 mm diameter, very fast, designed as mobile phone vibrator drivers, about £1 each, I'd like to create a fully printed quad copter using these, maybe with camera, could be really cool, not really a project yet, not really useful enough.
My daughter has some 'dodgy' neighbours, shouting in the streets, swearing, hammering at their door, she would really like to keep an eye on them. Tenvis cameras are really cool, but a bit pricey.
I have a Rasperry Pi with Camera module, got that running last night whilst Fan Light cover was printing. I have a Wifi dongle hanging about. I have a camera mounted to the front of my house, old school, B&Q special bought years ago, it feeds into an old VHS video recorder (encodes to standard PAL signal), that is fed to house TV system, picture to small TV above main TV, we call it the monitor. In the past, I rigged up a second old VHS video recorder (for tuner) and a frame capture device and fed that into PC. I created a program called "Monitor", it fed frames into video files in 1 hour chunks, it also added date/time and monitored each frame, difference between 'areas of interest' in frames caused it to output a jpeg. It worked rather well, you ended up with a directory for each day, within that directory was a various number of jpegs of 'action' scenes and 24 one hour video files. Browse the jpegs. anything intersting, use time on jpeg to look in correct place at video. So, can I re-use my old code (windows based) with Rasperry Pi (Linux based), camera and Wifi dongle to produce a small, neat Wifi stand alone controllable camera (like the Tenvis, but using already available bits)?

Introduction

A friend said that with all the things I get up to, I should create a blog, so here goes.

Intro:
2 years ago I had a lot of time on my hands, so I built a Reprap Metric Prusa 3D Printer.
For details of Reprap, see here:
http://www.reprap.org/wiki/RepRap

My past work life includes: Electronics Assembly, Electronics Technician etc. So I can create circuits, Printed Circuit Boards and assemble them.

I have a pretty decent garage with a good tool set, pillar drill and lathe.

So, basically I have the tools and knowledge to pretty much build anything.
Above all else, I am a Biker in the old sense of the word: Try anything once. Never admit defeat. If it can be done then I can do it.
I'm also a great believer in the "F**k it attitude" and "If you can't fix it, f**k it, if you can't f**k it, use a bigger hammer". I do believe that when a project goes well, it can be "sexy", and things can be "perfect, but it will have to do".

Recent (completed) projects:
I have a daughter and 2 young grand children. Daughter says "Can you make a night light?", "Can you make a moon shaped night light?", 2 days later we have a moon shaped night light. Now I get "Can you make a Mickey Mouse shaped night light?" (for other grand child), 1 day later we now have moon and MM night lights, next I get "Can you make 2 more for when they stay at yours?", and "instead of moon, can we have Shooting Star?", you know it got done.
For these designs see here:
http://www.thingiverse.com/thing:267662

I am TrevM on thingiverse, you can get to all my published designs from the night light link.
These days I am a software engineer, my past life was all practical, build a PCB, wire up an electronic unit, all nice things you can hold in your hands, things you can look at and say "I built that", nice feeling. Software is different, you can't hold it, you can't point out the 'nice' design points etc., that part is missing.
Reprap introduced me to OpenSCAD, a neat application, basically, I write software to describe an object, then press a button and see that object, move it around, look at it from any angle on screen, with Reprap, I can then go further, a few button pushes later, I can hold that object in my hand. I confess to getting pretty addicted to it, just 'cos it was soooo much fun.
Making the printer cost £250 and took over a month to knock up. To keep 'her indoors' happy, I promised to create a new winch for her washing line. I soon discovered that I needed extra stuff to build a winch that were not available in OpenSCAD, that included threads and bearings.
So, my first ever OpenSCAD design was to create a system for ISO metric threads. Kind of as an after thought, I bunged it on thingiverse and was more than shocked at the fuss it caused.
The metric threads are here:
http://www.thingiverse.com/thing:27183
The finished Winch is here:
http://www.thingiverse.com/thing:28066
There are a few other quickie projects in Thingiverse.
I mention the threads because it was my first and still most popular, I mention the winch because it is big and strong (unusual in 3D printing) and it allowed me to build the printer in peace, I mention the night lights because it's my latest completed.

Current 'In Progress' projects:
Previous are all really quickie projects, these have taken a little longer and are a little more complex.

Jack Door
I have a little scamp 5 year old Jack Russel called Jack. Always well behaved, small dog, big personality. More of a teddy than a dog at home, turns into a wild creature on walks (doesn't want to be touched, examines everything with gusto) on walks.
We have 3 doors in our house. Front door he never leaves unless on lead. Kitchen side door and back patio doors lead to garden, he doesn't like using kitchen door, prefers patio door. Letting him out manually is a pain and leaving patio door open in bad weather is pretty dire. Cats use a cat flap, so I wanted a dog flap.
You can't buy a dog flap to go into a 6 foot (2 metre) square double glazed patio door. Or rather, you can, but it costs an arm and a leg.
So, I made one. it's basically a wood frame (same height as the aluminium door frame), painted similar colour to patio door and double glazed with perspex. Slide the patio door open, put the Jack Door section into the opening, latch it to the wall, the patio door closes and latches to the Jack door.
Here's a photo of the Jack Door in place:
Of course, life is never quite that simple. The perspex required grooves in the frame, the frame required shaping at the sides to mate with the frame and the patio door. I was thinking that maybe I had to shell out for a router, but my Dad had a 'plough plane', fabulous piece of kit, over a hundred years old, but did the job a treat.
Of course, 'her indoors' is concerned, wants it to ONLY work for our Jack. Jack is already chipped. Now most chip readers need to be in close contact with the dog. I think I have a design to produce a reader that will read his tag from up to 1 metre away. Idea being that I create some kind of controller, create some kind of electronic latch (I can't seem to buy one) and link it all to the reader.
But 1st job first, did the basic frame and fitted as above.
Now we find another snag. Cat's push open the cat flap with their heads, Jack simply won't!!!
So, the door is installed and instead of opening the main door, we can open the much smaller (much less draft) dog door, but increased thought needed.
I have an Arduino Leonardo Pro Micro ATmega32U4 controller (£3.32 off Ebay), fabulous bit of kit. I have that connected up to a self made driver PCB. Biggest headache was how the dickens do you open and close a dog flap under motor control? I now have a small 30 mm diameter, 40 mm long, 8 volt motor (£2 off Ebay), it connects to a printed PLA gear box (worm drive and other gears) mounted to the frame, that drives a large gear mounted to the flap. The interface board is connected to a remote control module and contains red, yellow and green LEDS and 1 button and all control housed in a printed PLA box. The flap now includes a printed PLA couner weight:

The counter weight is on the left, it is attached to the flap and hinges down with it. It is actually filled with 2 pence pieces. Ignore the wire wrapped around the bolt, that is the current way of latching the door open. The large half internal drive gear is attached to the right of the door.
This is the drive mechanism, the control box to the left, the motor and gear box to the right. In the middle are the 'open' and 'closed' limit switches. I still need to figure out how to mount the switches and create one or more suitable housings. But the box, remote control and motor all work when temporarily attaced to the door.
If door is open then press button and door closes, during close, red and yellow LEDs light on control box.
If door is closed the press button and door opens, during open, green and yellow LEDs light.
That all works, pressing any button on remote does same as pressing button on box.
The worm drive means that flap stays in end position, no electronic latches needed.
Motor and gear box are not over powered, the flap opens / closes in about 1.5 seconds, but can be easily stopped by hand (or paw or tail), so it is intrinsically safe (something that did worry me).
A more detailed picture of the gear box, motor attached to a small gear which drives small gear on end of worm, worm drives large gear, large gear is on same axle as door driving gear. Lid left off on purpose. It will also have a cover over motor, but that is finishing touch (later).
More detailed picture of control box and remote. Remote and receiver are RF, both purchased together off Ebay for £2.50. Button and LEDs are on other side of PCB.
This is the RF ID reader (to read Jack's chip), the big square is the aerial wound onto printed corners, it should fit nicely inside the double glazed flap, the small circuit board also gets mounted within the glazed section with 5 wires joining to main controller.
RF ID reader is normally not powered, once per second, controller powers it up and tries to read a chip. If it reads a chip and if it is Jack's chip then it will be considered a good read.
When closed then a good read acts like a button press.
When open then 3 bad reads act like a button press.
I have so far not tested this part, on paper it looks good, but I don't want to test on Jack, I have bought another chip from our vet, but I have misplaced it!
Besides, all the other jobs above have got in the way of completing this project, but it WILL get done.

Water proof box:
I recently changed my bike, old one was a Honda Shadow VT600C, it had a sissy bar (back rest) and mini rack, my water proof gear was bungied to it, ready to go, had the bike for 15 years, it rusted out. My new bike is a Honda Shadow VT750B, oddly, though same make a model, Honda in their wisdom have changed the style, the 600 was a cruiser, the new one is now called 'naked', it has no place to bungy anything to and I'm getting pretty bored with carrying water proofs inside a shoulder bag or even inside my jacket.
There are racks available, but pricing starts around £300 and they can go whistle.
So, I've printed a box, it's about a foot long, cylindrical, roughly 150 mm diameter. The box is here:
I'd like to spray paint it to match the bike, I'd originally planned to fix it above rear plate with tie-raps and rubber sheet, but I have so far not got around to spraying and I am now thinking that attaching behind seat may be a better option.
Still in progress.