Power in the future!?

I had written a comment on a MOOC just now but I feel quite attached to it and it would be a shame not to share these concepts here.
It was part of a discussion of technology in mains power and its future. There’s a few concepts which I mention which I think people may like to discuss further so tell me what you think, here’s it copied and pasted below:
“I think it may be a thing that the frequency of AC is likely to change. We have power at 50Hz AC but switching frequencies of a few thousand Hz can be more efficient when transforming, and they need smaller transformers too. Switch mode power supplies are why we rarely see those chunky charges and adaptors anymore. As we find a lot of things using switch mode power supplies, to produce lower dc voltages, we might find it helpful to have most of the components integrated into the plug socket and the device sending information back to the socket telling it how much voltage it needs.
I’d be very happy to not have to carry around as chunky a charger we have to now.
As for wireless electricity, I think it’s incredibly wasteful. A lot is wasted in heat and the power drops when moving coils a short distance away. I think we’re sticking with wired until technology gets better.
Maybe the answer to wireless power is light. Specifically infra red light focused onto a sort of solar panel on the device. Using infra red will stop us from getting blinded by the extra energy about.”

Tell me what you think about any of the points, and if you have ideas for the future of mains please share them.

Finally got the touchscreen shield to work

st7783 TFTtouchscreen

I recently bought a 2.8″ lcd tft touchscreen shield off ebay. I was tempted by the incredible value of the thing, it only cost a fiver and I assumed it must have been based on one of the many existing touch screen shields on the market and be easy to get it set up and running on my Arduino Uno. It was more of an adventure than I had anticipated and I thought it’d be nice, to anyone still scratching their heads over a similar problem, that I outline some of the things I’d found helpful.

My shield was made by a company which had stuck the website, http://www.mcufriend.com on the back of the board. There I had found a download page which had a couple of .rar compressed files that supposedly had the libraries needed to run the shield. Unfortunately, not only the files are not easily extractable on linux systems, when I found a windows computer to extract it, it popped up an error that the file was corrupted.

I though I’d check the blog listed on the bottom of the download page, where there was an altered TFTLCD library to try out. There was a helpful little snippet of code which had helped identify the screen type. These shields could be made with a range of different screens, which are not completely compatible with each other. Running the example found in this library the screen displayed something, but not the right thing. The graphics test had lines drawn staggered when they shouldn’t have been, and a brief yellow box was filled with lines that looked out of place. Adding the snippet of code I spotted the serial monitor told me the screen was not recognised as the ili9325 it was expecting, but it did end up spitting out the numbers 7783. I had the data sheet for the other screen type, the ST7781, open on a tab and figured it was part of the same family.

Searching it in google I came across a thread on arduino forums http://forum.arduino.cc/index.php?PHPSESSID=19kd4ik981bc12rs105dhpdlr5&topic=223769.15 which had a compressed library half way down the page st7783.zip. Extracting this to my arduino library folder, I felt was closer to getting the screen working correctly.

I had a look at some of the examples but disappointingly got the same irregular behaviour. I had a feeling it was a by-product of how the arduino IDE looks for included libraries. I had a TFTLCD folder in my libraries folder already which had previously not worked. I decided to replace the files within that folder with the new ones of the same name found in the st7783 folder. Uploading the tftpaint example to the UNO showed the display I had been looking for all along.

If you had an error saying the Point class doesn’t exist, you might have the adafruit version of the TouchScreen library, which has the class as TSPoint instead. Try change it in the sketch and see if that works. The touch pad was rotated 180 degrees from the display so adding tft.setRotation(2); in the setup before tft.initDisplay(); will line the two up again.

Hope these tips helps you when using this shield! Leave a comment if you like and I’ll see if I can help.

Multitouch processing sketches in browser

I found my way back to the studio sketchpad website today, and came across a simple sketch which I had made a while back. I had originally made it for the iPhone, but now I have an Android phone and was wondering if it still worked. All it does is take a number of touch points on the screen then draws a circle at the point with a particular colour corresponding to the number of touch points. The first finger would be red, the next yellow then green, blue and purple. Follow the link with your mobile phone and have a scribble; http://studio.sketchpad.cc/sp/pad/view/ro.9IElcoyTysAMg/rev.900

Taking pictures with a scanner

Picture taken with camera obscura on scanner bed

Picture taken with camera obscura on scanner bed

Scanners have found their way into many households. I rarely get any use from my scanner at home, but as these devices are piggy backing on printers now days it would be silly not to get a machine with the both combined. I’ve come across a way of using the scanner to take pictures. I don’t mean scanning photographs (silly!), but more akin to a camera, capturing an image of the world in front of it.

This type of scanner photography, sometimes referred to as as scanography encompasses a whole range of techniques of acquiring images of things that are not just your standard sheet of paper. Most of scanography is taken up by imaging various objects on the glass plate of the scanner, but the part I’m really interested in is taking a photograph of the scene in front of the scanner. This can be achieved by focusing the image from a camera obscura onto the plate which the scanner scans its image. Looking around I found a little video on Make magazines website of a camera obscura you could attach to a flatbed scanner but as we now have these clunkier printer scanner all in one machines, turning the whole thing on its front seems like a daft thing to do if you wanted your machine to continue working. I knew there was a solution and that it would involve a mirror.

I could use a mirror at 45 degrees to reflect the rays travelling horizontally toward the camera obscura, down toward the scanning face of the scanner.  I decided to put the mirror inside the box rather than on the top, as it would allow me to keep the opening for the light on the front face. After a quick test with a pinhole I realised that I would need to gather more light, which could be done by enlarging the hole and using a magnifying glass. Its important to choose a lens with a suitable focal distance. To measure the distance, grab your lens and a ruler and try to project the light from your tv (or other similar bright object) onto a piece of paper. When you are doing this make sure the distance from the TV to the lens is about the same distance your subject is likely to be in front of the scanner. Measuring the distance from your lens to the paper (showing a clear image of the tv) and jot it down somewhere. It’s hard to tell what a suitable lens is but my one had a diameter of about 8cm, and a focal distance about 25cm. Having a lens that is just bigger than the diameter of a roll of tape is useful as I found I could use this to hold the lens and slide it back and forth to adjust the focus. You need to match your lens with your box and find an arrangement that would allow the distance from the base to the mirror and the distance from the mirror to the lens sum up to the focal length you found earlier.

Camera Obscura on scanner

Camera Obscura on scanner

I used black paper inside the box to stop stray light from inside the scanner overwhelming the light coming from the source. A used roll of tape made a good holder for my hand lens, which I secured with tape to the box after cutting a hole slightly smaller than the lens into the box. Other things that could work is using black paint inside the box and I can imagine a tin can or half a Pringle tube to help hold the lens.

I used a small glass mirror and attached it to a piece of cardboard I had cut off the flaps. In hindsight a lighter plastic mirror would have been lighter and less likely to drop. Conveniently as the box used to hold reams of paper, the flap on the long side could fit inside at a 45 degree angle as its length is root 2 times the width. To reinforce the card I took the two edges of the cut card and folded them at 90 degrees so it was less likely to buckle, cutting the corners at 45 degrees allowed it to fit inside the box.

I little doodle of making the mirror holding card

I little doodle of making the mirror holding card

There’s a few tweaks which I found useful when trying to get a more practical box. Some scanners don’t have covers which are detachable and open to a wide enough angle to fit the entire box. For this I had to reshape the back half of the box so that it would. The tape lens holder was replaced with a thicker one (like used for parcel or duct tape) so more control of the focus could be achieved. The further the lens from the bed, the close the focal distance. Having a box that is a bit larger than the bed is a good idea as the light from the scanner will not reflect off the edge of the box. I haven’t had much success when using this on photocopier machines, maybe because of its auto-leveling function which drowns out the light coming through the lens with the excess being reflected by the box edges. It may be possible to get it to work on them by making sure the rest of the glass is covered with a material that reflects very little light (black cloth?).

Funny thing about taking scans is that although you take colour one the resulting image is appears greyscale. I hypothesised that this is a by-product of the way some modern scanners acquire colour information. Instead of having three sensors that can sense red, green and blue light, and combining this to form coloured images, this scanner shone in a sequence red light, blue light and green light and measure the input with a sensor that is sensitive to all light across the visible spectrum (hmm… I wonder if it reacts to infra-red also?). Follow me on my experiments with trying to trick it into giving me colours in my next post.

Scan taken from further away

Scan taken from further away

No joy for IDE

Yesterday I finally heard back for an opportunity to study a course that I felt could take my life in a fun and interesting direction. Innovation Design Engineering (IDE) is a course that is run by the Royal College of Arts (RCA) and Imperial College London that gets together clever thinkers from many different fields to dream up and make amazing products that can change the future of the world. As you might have already guessed from the title of this post, I didn’t get the reply I had hoped for. They did however say that I have been put on the reserve list, but it’s hard to tell whether that could amount to anything.

Those that see me often, would know I have been growing my beard for a while. Well you guys will be amazed to see me next, as I’ve cut it off. Yep, My chin is bald. It a bit of a silly thing, but I don’t think I’m the only one to do it; when something doesn’t quite go your way, and I feel like you need a little wake up and a change of direction, I change my look a bit. I don’t quite know why I make such a connection with my look and my life, but I do. I’m brought back to the interview when I was asked “If you don’t get into the course, what will you do?”, and I answered, ” I’ll carry on making things and hope people will notice I make awesome stuff”. I do make some interesting things, but I not very good at sitting down and writing about them.

So that will be my change, I make more of an effort to update you guys on my little projects, the places I go and other things I think you might find interesting. How else will the world find out about this stuff!?

Firstly sorry about being a bit rubbish on uploading content, I need to get back in the habit of writing about what I’m up to. Anyway, I recorded this video a while back and didn’t upload it because my breathing was too loud (I found a way to get rid of it, so don’t turn up your volume to hear my hypnotic sounds). Enough for my insecurities, this is a demonstration of a really cool way of doing the famous iodine clock experiment. One of the chemicals (sodium thiosulphate) in this version of the iodine clock experiment can determine the time it takes for the solution to magically turn dark. So by adding a slightly different amount of it to each test tube, then mixing the two at the same time, the test tubes turn dark in a predictable order. The video is quite long so I don’t mind you skipping to about 5 min in. Enjoy!