Hacking De-bounce and Rotary Encoders

Prototype console interface for embedded projects

Prototype console interface for embedded projects

At the UK Makerfair during a brief lul the conversation turned to rotary encoders, simply as I had ordered a paw full from china for one of my many projects that simmer along in the background. The picture here shows the initial prototype that I used for this article. The feedback about rotary encoders that I received was that they were terrible and to be avoided. Principally as the switch contacts were very noisy and produced way too much bounce. I was still interested in using them firstly as having done embedded stuff for years bounce is something I consider trivial and fixable, secondly as they make a really cool, easy and feature full user interface using the minimum of pins.

De-bounce circuits

De-bounce circuits

The circuits I most commonly use for de-bouncing simple switch contacts are shown in the picture here. I ran this up in Kicad for the article. Something worthy of note is that Arduino’s and a number of other micro controllers have internal pull-ups that you could use. Do not use these when de-bouncing your inputs. They vary very widely in effective resistance value and the results will be massively variable when used with the same external components. Indeed a quick search of the internet shows a range of circuits and values mostly with a string of comments along the lines of someone found a different value or combination to work better. What is happening here, and why so much variability of what should be a trivial, bread and butter type, of interface circuit.

No de-bounce

No de-bounce

Time to dig out the Bitscope I bought from Pimoroni a while back and capture some waveforms. It will work as a capable enough DSO for this investigation. On the left is the A output of the rotary encoder from the previous picture set-up as a switch with pull-up as per the schematic above. The value of the pull-up resistor in this case is 10K Ohms a fairly typical pull-up value. The large nice square pulses are the outputs from the encoder and the very narrow horrible pulses are the switch noise and bounce. This looks reasonably what I would have expected although the switch looks to be more noisy than bouncy. I spun the input shaft quickly by hand to get enough pulses into shot and it is noticeable that the rubbish pulses produced are proportional to the speed of spin. The other thing that is noticeable is the duration of the pulse are quite short. With a standard press button you can not move your finger that quick and a de-bounce period in software of around 10mS is not uncommon. In this case though, if you did this it is clear that you would be missing a lot of steps from the encoder. Each one of those noise pulses is a full logic value in height and will trigger an interrupt, giving you a wildly incorrect count and wasting a whole shed full of precious processing cycles. I can see why you might think they were to be avoided if you had not de-bounced them in any way.

100nF De-bounce Capacitor

100nF De-bounce Capacitor

Adding a 100nF capacitor as per the above schematics produces the results below. This produces a very large reduction in the height of the noise pulses but they are still large enough to trigger some interrupts, the amount of processor time we waste though is reduced. The number of incorrect counts is also reduced but there are still some present. Also look at what is happening to the corner of the rising edge of the pulses that we want to work with. They are no longer square and are being rounded off. So a big improvement but still not as good as we would like. In a simple switch this rounding etc is not a problem. We are working with a rotary encoder though and the relative position of the edges in each channel is important to us. Where an edge curves too much it becomes unclear where the micro controllers input will decide it has switched from logic 0 to logic 1. If we got such a big improvement for adding in 100nF, will adding in some more be helpful?

200nF De-bounce capacitor

200nF De-bounce capacitor

So lets add in another 100nF capacitor in parallel across the one we put in last time. Taking the total up to 200nF. Yes the noise is reduced much further and we could probably work with that at a push. But look at the state of the rising edges. As we increase the capacitance we increase the loss of definition of the rising edge and consequently our ability to correctly resolve the direction of the encoder. The faster the encoder is turned the more problematic this becomes as the curve remains the same width but the width of the pulse we are relying on has become narrower. We could have kept the capacitance value the same but increased the resistance to say 20K and we would get exactly the same result. The RC network that is cleaning up our signal has a time constant that is proportional to the ratio of the resistance and capacitance that makes up the circuit. It is this time constant that is low pass filtering the pulses and giving us the effects we can see on the scope. Bearing this in mind if we check out the Atmel AVR data sheet, as this is the most popular micro-controller in the Arduino series, we see that the internal pull-ups have a value of between 20K and 50K. So a massive variation in the pull-up value and consequently a massive variation in the de-bounce action and on our pulse edges is produced by this, hence why de-bounce circuits that use the internal pull ups are to be avoided. We need results that are consistent.

For a simple press button a simple RC network as shown in the above works great as it is a very slow logic signal, but what can we do to recover nice square edges on our fast, encoder signal pulses, and get rid of the noise pulses. The answer is to use a Schmitt Trigger which increases the level at which a rising edge will be consider to have switched from low to high and reduces the level at which a falling edge will have switched from high to low. This circuit will ignore the noise pulses that we have reduced in height leaving us with a clean pulse train and nice square edges from our encoder. Check out the linked wikipedia article, ignore the over complicated mathy explanations and control theory waffle look closely at the wave form diagrams at the top right of their page. What is more this circuit is so useful that it comes already built in to a number of inexpensive logic gates. You don’t need to make one.

Unfortunately I don’t currently have the parts to hand to show the fully processed pulse train but the procedure is to add in a Schmitt Trigger logic gate (ie a 74LVT14 or similar)  as per the diagram above, pick the pull up resistor value for your chosen application 10K is good for most applications, looking at our scope waveforms you may want to go to somewhere conveniently around 20K. Then starting with a small capacitance for the de-bounce capacitor increase it until all your noise pulses on the output of the schmitt gate have gone. Using your scope to see when this happens. Once you have achieved this you know what the correct values are and can pick the nearest off the shelf value to use every time and get repeatable results. What’s more you will not be wasting any precious processor cycles on clever de-bounce code and unnecessary interrupts.

Take away points from this are:-

  • Do not use the internal pull-ups with de-bounce circuits it is a false economy.
  • Simple RC circuits are plenty good enough for simple push buttons and switches.
  • You need a logic gate with a schmitt trigger input to clean up the faster logic pulse trains from rotary encoders.
  • You can do a lot of electronics and get an intuitive grasp of what is happening by laying on a scope and laying off the math.
  • Clean up your signals before trying to code them clean, crap in equals crap out.
  • Rotary encoders are great if you know how to work with them.

Mini PIR Sensor

Mini PIR Sensor

Mini PIR Sensor

I bought some of these mini PIR sensors on aliexpress, for the occupancy detector part of my ongoing NoTLamp project. They can be found for just under 1 UKP each. I want the NotLamp to work efficiently as it will be powered all the time. I also want it to all work from a single simple power supply and have chosen 3v3 as the lowest common denominator. I am taking the decision to work at 3v3 more often than 5V these days as so much is produced with 3v3 in mind. A big annoyance is the amount of 3v3 boards etc that are made 5V compliant and then used with other micro-controllers (ESP8266) or Pi’s that are 3v3. Very wasteful of both parts, and electrons. This picture shows the mini PIR sensor on top of a business card and next to a 20p piece so you can get a feel for how mini it really is. These little units are very simple with nothing to adjust and no daylight sensing, they are aimed at whole raft of people sensing switches etc and are designed to work across a wide voltage range from 4.5V up to around 20V. They have the part number DYP-ME003SE-V1 but can also be found online as an HC-SR505. These look to be almost identical bar the addition of a single capacitor on the front. I could not find any schematic for them which was disappointing, all the links claiming to point to a schematic take you to a schematic for the HC-SR501 the bigger brother to this one which uses a larger BIS0001 PIR chip.

Mini PIR Detail

Mini PIR Detail

These pictures show both sides of the board close up and side by side. In the left one you can see a 3v3 linear regulator and polarity protection diode, Those and the PIR detector at the top of the board look to be the only parts that are common between the two types of PIR sensor mentioned above. The IC is half the size of the BIS0001. The output is a 3v3 logic signal. Looking at the left hand image there is an unpopulated footprint to mount an S8050 NPN transistor for switching a relay or level translating the signal. You will also need to remove R1, just next to it if you want to do this. The presence of the 7133 3v3 regulator though is promising for my application as it shows that the circuit itself actually does run at 3v3. Just for the hell of it I tried the PIR at 3v3 and 5v to see how it did. It preferred 5V and worked reliably but dropping the voltage to 3v3 (Actually the test Arduino was putting out 3.73V) gave some interesting results. The device powered up and seemed to work OK but after triggering the detector the first time it re-triggered itself cycling on and off for its pre-set delay period. I counted the delay and it was around 10 seconds give or take a bit. Probing the underside of the board I found that for 3.73V in the protection diode was dropping about 0.2V giving 3.55V and the low drop-out (LDO) 3v3 regulator appeared to be dropping nothing. This was not very promising as the board should run at 3v3, given the presence of the regulator. Time to warm up the hot air pencil and iron then perform some surgery.

Modified PIR

Modified PIR

I first removed the regulator, and consulting a data sheet for the pinout, shorted the Vin to Vout pads where the regulator used to be. You can see how I did this in the before and after shots in this picture. Powering it up from the same source I checked the voltages but found it was performing exactly the same cycling of off to on all the time. So the cycling problem was not the regulator struggling with the low voltage. The voltage on the board side of the protection diode now measured 3.55V so given that PIR detector draw crazily low currents it should be working. But wasn’t. Given it was not looking very promising but I could not figure out why I removed the protection diode and placed a short across those two pins. Completing the modifications in the pictures. Now It worked fine exactly as it had done at 5V but now at 3.7V. So these were the mods that were needed to make the units I have functional at 3v3. Given the strange results we had been getting I hooked up the board to my bench PSU and an accurate multimeter and set the voltage for a real 3v3 and also took the board down to 2.9V in both cases it worked fine. So the issue had not been the actual voltage level as such. I can only think that there is insufficient capacitance across the power rails on the board and at low voltages the turn on/off glitches were enough to re-trigger the detector. Odd, not seen this problem before, but there you go.

In summary a nice little unit, very cheap, hours of fun can be had with them in your projects, watch out for the self re-triggering and it will work comfortably down to 3v3 if you remove the regulator and diode, then short the correct pads to make a straight through path for the supply voltage.

The Hunt for J5

Pi Zero J5 Connections

Pi Zero J5 Connections

J5 is alive, and is definitely not called johnny or a robot in a kids sci-fi film. J5 is the mystery connector footprint on the bottom of the Pi Zero. I have been puzzling over what it was intended for since getting my Pi Zero from Pimoroni.  Asking around amongst those who would know more than me about it (Not difficult to find) the hot favourite was a JTAG port but no one was entirely sure and there was no pinout. An extensive google around was surprisingly information free.

Time then for some reverse engineering, first stop was a USB microscope and a look see for obvious pin functions, gotta tackle the low hanging fruit first. Taking pin 1 to be the pin nearest the J5 ID we can see the footprint is for an 8 pin connector and the body or screen is not connected. 1 is the Pi system reset or run pin as it is labeled, 4 and 7 are ground connections. OK that leaves 5 pins to go. I visually traced the connections and lost them in to the maze of CPU via’s. As other than the reset they did not go to the GPIO pins I could rule out an easy hit as to what they were. The up side is if they were JTAG, it would have to be dedicated pins, not GPIO pins, and therefore projects could be debugged even with a phat in place. Hmmm what were those other 5 pins for. Normally at this point I would start on in with a multi meter or a scope and see what I could find out next. But serendipity smiled upon me, in that way it never normally does.

B+ J5 Connections

B+ J5 Connections

Putting some time into a side project (building a Graphite graphing server) I was working with a Raspberry Pi B+. Purely as I tend to mostly use Pi2’s now and was using up any older ones that were lying around. Embedding them irretrievably into other things. Fiddling with the board during one of many mental luls, I noticed the same mystery footprint on the board directly under the HDMI video connector. In fact it is so much the same it is also labelled J5. Cross referencing the ground pin outs that we know from the Pi Zero we get a match. What is more the 5 pins we had not identified are broken out to pogo pin pads bang next to the footprint. All along with nice labels. Combining the data we have then gives us the following table:-

J5 Pin Information
Pin No Pi Zero Function Pi B+ Function Comment
1 Pi System Reset ? Pull low to reset the Pi
2 ? TRST_N TAP Reset pull low to reset the TAP
3 ? TDI Test Data In
4 Gnd Gnd Signal Gnd
5 ? TDO Test Data Out
6 ? TMS Test Mode Select
7 Gnd Gnd Signal Gnd
8 ? TCK Test Clock

Some further technical info on TAP & JTAG can be found here worth a look at to illustrate some of the concepts behind JTAG. OK, all well and good, what is left to do, identify what sort of connector J5 actually is and make up a JTAG lead for it then connect it up and see if we are right.

Inertial Logger Prototype

Prototype Inertial Logger

Prototype Inertial Logger

The prototype hardware for my inertial logging project is built. Lovely you say, looks nice, fits in a small tin, and just like everyone else, you immediately follow it with “What does it do ??”.

This project follows on from a bunch of discussions in the SHHMakers mailing list. Basically the idea is that you can record or log a track that the tin has followed using only sensing of the movement of the tin. The movement of the tin is the inertia bit. Everything has inertia and sensors that can measure that can also infer how much and by how far something has moved. Inertial guidance works on the same principles and is used for quad-copter pilot electronics etc. This is the point at which, like everyone else, you interject “I just use my phones GPS”. But what about those instances where there is no GPS signal. Try Caving, UrbEx, SCUBA Diving, or just simply finding your car in a multi-story, when you have forgotten where you parked it. Maybe you want to know where the tube system really is under the map of a city rather than the schematic map most underground systems give you. These examples are where inertial navigation and logging have a part to play.

“OK” you say “I understand now. how do you do it ?”. If you put on a blindfold and someone manoeuvres you along a track you can, if you concentrate remember it, this is the logging bit. Each time you are turned this way or that you can feel being turned, this is what a gyroscope measures, rate of turning. If you are moved quickly or slowly you can feel that too, this is what an accelerometer measures, rate of acceleration. If you are in a lift as well as feeling the acceleration, you can feel the pressure on your eardrums change as you go up or down, this is what a pressure sensor measures. You can feel if you are outside or inside by temperature changes, this is what a thermometer measures. People who are blind are more sensitive to these things than the sighted, purely as they use these clues to navigate in a world they cannot see. They also count steps. I don’t think this project will be sensitive enough to count steps but maybe it will. It certainly can measure the passage of time against acceleration/rotation and therefore infer distance.

Zoom in to see the contents of the tin

Zoom in to see the contents of the tin

“So what’s in the tin?”. You are bored with explanations now and want to know about the techy bit. If we zoom in to the tin, we can see a 10 DOF inertial navigation board (GY-87) top left. Under that on the left is a micro SD card. In the middle is a Teensy 3.1 micro-controller. At the right top there is an Adafruit Power Boost 5oo Charger. To the bottom right is the coin cell battery backup for the Teensy’s RTC (real time clock). Underneath the board is a 2.5Ah LiPo. The power boost, LiPo and teensy were bought in from our local supplier Pimoroni. The 10 DOF (degrees of freedom, or number of things it measures) board came directly from china via AliExpress. The power supplying arrangements are a compromise that niggles somewhat. Whilst the LiPo has plenty of power, all the other components actually run at 3v3. the conversion from 5v to 3v3 is done locally on the boards using linear regulators so we are wasting nearly as much power again as they draw. Unfortunately linear regulators dump the surplus energy as heat, far from ideal in a closed tin. Particularly where we want to be able to measure the temperature as part of your logging. Altogether though an adequate first pass for prototyping and testing purposes. There is a bit of a learning curve to be climbed and this is a reliable way to do it. The 10 DOF board has 3 axes of Magnetometer, Accelerometer and Gyroscope on-board as well as an air pressure sensor for us as an altimeter, giving the 10 things or DOF it can measure.

“If you were doing this again what would you do different ?” you ask. Well bearing in mind that I acquired the parts for this a bit back and they have been gathering dust the purchasing decisions would be different. I would be replacing the hand wired SD card holder and Teensy with a Pi Zero. But have to add an RTC. Also I would get rid of the linear regulator on the 10 DOF board and power it form the Zero’s 3v3. Just to move the self heating away from the air pressure sensor which relies on an internal temperature measurement for air density compensation. I would probably add a press button on the outside of the case so that way-points or events could be marked in the track log. Useful for overcoming cumulative errors. One last thing, inertial navigation chips and managers are a field of rapidly advancing technology, many of our smart phones already have them inside. The inertial sensor chips themselves are becoming ever more integrated placing it all on one chip together along with local processing to make them ever more accurate. So something to watch out for and periodically check the current state of play.

The firmware for this prototype is available from my git hub repository https://github.com/AndyKirby/Firmware/tree/master/InertialLogger please note it is a work in progress rather than a finished item.

Salvaging Lead Acid Batteries

Working on a previous project to make a prototype Pi UPS I pulled a number of salvaged lead acid batteries out of the scrap bin.

Battery Resuscitation through Desulfation

Battery Resuscitation through Desulfation

It quickly became apparent that the batteries were all flat and as each had a terminal voltage of around 0.5V they appeared to be beyond life ever again. Not surprising considering the number of years they had lived in the scrap bin without ever having a charge.

Initial attempts to put a charge into them and get them going again were without success. Even over voltage-ing them a little to get them started failed miserably. The best of them was taking around 10 micro amps. After leaving them on charge for 5 days or so the situation had not improved. So what were we looking at ? Maybe they had dried out, maybe the plates had fallen apart and were now mush or maybe being overly discharged the plates were caked irretrievably in insoluble hard lead sulphate crystals.

There are plenty of miracle cures for dead lead acid batteries and desulfation. Frankly I am rather sceptical of most of them. But for some reason I thought although slightly implausible desulfation was a fun hack to try. Chemical means to reverse the crystal build up were out as the batteries are sealed units. So it was time to rummage through the internet for ideas and then hit the scrap bins again for parts. The circuit I settled on is here Pulse Desulfator Doc. This formed the basis and the prototype as shown in the photo was a derivation of this.

Having nothing to loose other than a bit of time constructing and debugging it I set too to build it. The inductor was a hand wound approximation, the logic inverter shown in the schematic was replaced with a simple transistor based inverter using a 2N2222 NPN transistor and the mark space ratio of the 555 astabel circuit needed adjusting. Probably because the inductor value was a touch lower than it should have been. But in the end it appeared to be working.

Now the acid test (see what I did there….). From the picture you can just see the ammeter on the bench PSU showing the battery taking a charge of 200 milli amps. So success. It took 2 days of float charge plus the desulfator pulsing away to get this recovery. Over this period the input current could be seen steadily increasing, whereas before with a stable DC supply it had just sat there and done nothing. The open circuit voltage of the battery at the time of writing now shows 4.5 volts so there is a way to go yet. It could be a couple of weeks or so before the battery is as recovered as it ever will be. In reality I can’t see them ever being “as new” however a trick worth knowing about and trying when salvaging neglected lead acid batteries.

Not to self if trying this with an old car battery check the electrolyte levels first and be prepared to except that the plates could just be mush and the battery beyond recovery.

Prototype Pi UPS

After advocating for a while that it is worth running up services on Pi Servers one at a time as needed. It occurred to me that we have no UPS to keep them going when the mains electricity drops out. We also have no way to prompt services to shut down in an orderly manor under the same circumstances. This gets to be more critical when we are running infrastructure services like RfID door access and a space automation MQTT broker.

An uninterruptible power supply for the Raspberry Pi

An uninterruptible power supply for the Raspberry Pi

Being as I am also running similar services at home I needed a similar solution for home. Sounds like a call to hack then, first stop was the junk and scrap bins, then a quick rummage through the spare bits left over from Chinese AliExpress shopping trips.

I found an ex UPS maintenance free lead acid battery that had sat in the scrap bin for too many years and a couple of these tiny 3A SMPSU DC-DC switcher modules that are incredibly cheap. The SMPSU modules can cope with up to 28V input and the output voltage is set by a small potentiometer. I also found a scrap laptop PSU that had a decent current delivery at under 24V. All in all the most expensive bits were the screw terminals that you can see from the picture I used to make conections to the board.

Lead Acid batteries have the useful property of being low maintenance and they will take a float charge providing you supply them with a constant voltage at the maunfacturers reccomended value. They will sit there on this float charge for as long as the battery will live. So after a quick rummage on the internet the first switch module was adjusted to provide a constant voltage at the manufacturers reccomended float value of 6.85V for the battery shown. The battery and input to the second switch module were conencted in parralel across the output of the first switcher. The ouput votlage of the second switcher was set to the 5.1V that is best to feed Pi’s with.

That then was the prototype UPS finished. When the supply to the UPS fails the battery takes over and supplys the Pi. When the mains supply comes back on the battery goes straight onto float charge and the Pi is running from the mains. Providing that the battery float voltage is less than the supply voltage and the Pi voltage is less than the battery voltage it all works. At 6V these thresholds are all a little close together and the UPS could do with a 12V battery and then adjusting to charge at that voltage instead. But this does work and the concept is proved.

The next task is to scale this up to run a whole shelf of Pi’s, with a mains high current SMPSU to drive the float voltage and supply the Pi’s, a salvaged car battery for the uninteruptible bit and one of these cheap tiny DC-DC SMPSU’s per Pi. But that is another article for another day.

London Hackspace Visit

I have to apologise to the guys at the London Hackspace (LHS) in advance for this write up. I visited around a month or so ago and have only just got to writing it up. Whilst kicking around in London with a day to spare, at short notice, I contacted the London Hackspace and asked if I could come visit. Jasper replied pretty quickly and despite the horribly short notice was a very willing and helpful host. Many thanks then to Jasper.

The Front of London Hackspace

The Front of London Hackspace

The nearest tube station is Bethnel Green but the walk to the space through Tower Hamlets and past the Museum of Childhood is not very far and it was a pleasant day. LHS can only be described as huge. We were impressed at the size of Nottingham Hackspace but London is actually bigger. Not that size matters…. It leaves our hackspace feeling positively bijou, in true 80’s estate agent speak. The space itself occupies the entire ground floor of the A2E building as pictured, the equally large basement and the whole of the rear yard. Turning up as I did mid-week it was surprising to see how busy the space was with a number of folk working away on their projects.

Chillout Space

Chillout Space

Straight in through the door you walk into the communal chill out area. With a display of things made in the space, comfy seating and the kitchen area featuring a re-purposed fridge/beer cooler and beer on tap. More about the beer later. On the wall dividing this room and the next on this side is a sizeable makers library. Straight ahead through a pair of double doors is a substantial classroom area, with the biggest TV I have ever seen for presentations, apparently gifted by a very generous donor. This classroom area doubles as communal workspace for folk more software oriented when not being used as a classroom. Just out of shot on the left of the classroom is a passage way to the basement stairs and yard door.

Laser and handcraft area

Laser and handcraft area

Just off this passage way on the left hand side is the kitchen proper and toilets. Turning immediately left there is the laser and handicraft area, plus the full size roller shutter door to the large rear yard. The yard is just visible through the windows. The area is set up for a bunch of textile oriented projects with a good range of textile oriented machinery and facilities. As I already mentioned, considering it was a midday, and mid-week visit I was pleasantly surprised at how many folk were in the space working on their projects. To the left down the rear wall, again just out of shot is a small quite room/meeting room. Despite there being so much in this open ground floor area the feeling is very light and spacious. So far we have only walked in through the door and turned to our left.

Electronics Lab

Electronics Lab

If we turn left again so we are looking behind where we came in we can see the electronics lab. Just out of shot to the right is the 3D printing area, behind which is the quiet room we mentioned earlier. The electronics lab is well appointed with a range of test equipment, soldering stations and a whole bunch of components in drawers. There was a large 16 segment display made up from sticks of LED’s on the rear wall. What was starting to become apparent was that for a busy hackspace with a lot of equipment and ongoing projects it was surprisingly tidy. Before heading down to the basement to see what was in there, Jasper and I took a little time out to have a talk. London Hackspace seem to use IRC quite a bit for extended discussion out side of the space. Questions I had that Jasper was not sure about someone on IRC could help with. Access to the space is via RfID and 24×7. Interestingly enough being London most folk have Oyster cards or some other RfID tag. So the entry system works with these rather than sourcing tags for members to use. Re-purposing starting early. I was curious as to how they managed to have such a large space, especially n London giving the high property and rental costs. Jasper explained that although difficult and a bit of a struggle they do have well in excess of a thousand members. This does sound a lot until you consider just how many folk actually live in London.

Biohacking Lab

Biohacking Lab

Having talked a while we headed for the basement. To the right as you enter the basement area, and extending under the stairs we had just come down, is the biohacking lab, with the appropriate certification. I took this photo through the door glass not wanting to risk contaminating the workspace. Immediately behind me or to the left as you enter the basement is a large storage area with lines of shelving full of storage boxes for donated things to hack upon and personal projects. The basement area appeared to stretch on forever. Maybe it is a tardis like thing, bigger on the inside. Apart form the biohacking lab, this is where the dirtier and dust making work gets done. This lab is the first of a chain of enclosed areas leading from the main work area that make up the right hand side.

Personal Protective Equipment

Personal Protective Equipment

Moving along the right hand side passed a space that is currently a work in progress, we came to the essential stash of Personal Protective Equipment (PPE). As can be seen from the photograph a quantity of this was in use at the time. It was good seeing this in place and the shadow board shows how much is in use. Storing this equipment out of the main mess making rooms helps keep it clean and ready for use. There is a temptation to place it next to the place of use, with the resulting consequences. As appears to be the norm with hackspaces, PPE is provided and it is the members responsibility to select that which is appropriate for the task and use it. This point marks the end of the storage section of the basement and the beginning of the workshop proper.

Woodworking and Metal Bashing

Woodworking and Metal Bashing

Next in line are the two messier work areas for metal bashing and for woodworking. The metal bashing area has a sub-area set aside for welding and cutting operations. This area can be curtained off with a heavy shade curtain to protect the other workspace users from the effects of welding arc flash and showers of hot metal particles. The usual machine shop equipment is also available together with a power hacksaw. Always useful. The wood working area further along is similarly well provisioned with things like planer/thickeneser, lathe band-saw and workbenches along with dust extraction equipment. Keeping dust and mess levels down in a basement is a challenging pastime. Wood working is a particularly difficult, case in point.  The dust extraction was a standard blower and bag type set-up, that could perhaps benefit from a vortex separator.

End Right

End Right

Arrayed just outside the messy workspaces was a goodly selection of hand and power tools for use in either the cleaner workshop area or the messier one. Finally at the end of the right hand side there was a remaining open area with the spaces server racks and a collection of interesting robots.  To the right of the picture covered in plastic is one of the bench robots that were used as in the early stages of the Human Genome Mapping Project (HGMP). There were many of these used to brute force the sequencing of a single human genome using the wet bench technology of the day, these were principally used to save on the huge number of man hours that the repetitive tasks would otherwise of consumed.

Main Workshop Area

Main Workshop Area

Finally we take a step back and look down the basement taking in the main workshop area that lays down the length of the left hand side. Note the keep clear walkways taped out on the floor. A goodly supply of tooling and workbenches to suit most tasks. The dark door way just visible at farthest end of the room leads to the brewing area. In the brewing area there were stored various iterations of Brewbot and brewing paraphernalia. It was about this point in the tour that something that Jasper had mentioned several times sunk in. In talking about the biohacking, brewing, 3D printing or whatever maker thing etc. Jasper had refereed to them as groups. I guess with that many members and that much space a degree of grouping must take place. Being a small, compact hackspace Sheffield is still pretty homogeneous. We tend to refer new folk to members as individuals that have the skills or interests in common, as opposed to referring them to a group with skills. It was interesting to see how the social structure had evolved and coagulated around specifics. It is almost like a mini town or ecosystem with groups making not just for themselves but for the hackspace at large. The brewing group was a particular case in point, considering their produce was made available to the hackspace in the chill out area upstairs. This left me thinking, this is what community’s and society used to be like before the disruptive model of mass manufacture and mass consumption came to prevail. It was not enough to just sell something, it had to be made as well.

All in all then, wow, what a hackspace. I could do with a visitors pass to drop in the half a dozen times a year I am in London, with time to spare. It would sure beat hanging around the usual touristy parts of town and save me the money spent on impulse buys in Foyle’s Bookshop. A “must go see” for makers visiting London then, and a “must be a member” for makers working, living or spending extended time in London. The number of pictures do not do it justice.

Edinburgh Hacklab Visit

Whilst in Edinburgh for a conference we took some time out to drop in on the local hacking community and compare notes. Edinburgh Hacklab have been on the go for a while now and are on the second iteration of their own space, having moved from the other side of the city centre to Summerhall. Initially like SHH&M they started out meeting once a month in space shared with other community groups.

Summerhall

The Summerhall Complex

This is a creative hub for the arts that has taken over what used to be the Royal (Dick) School of Veterinary Studies. It even has its own pub called the Royal Dick in the central courtyard. We caught up with the guys just as they were preparing an installation for the last part of the Edinburgh International Science Festival. This was to be a laser maze based in a surreal part of the buildings that still had the animal cages etc all in place. Just as if it was vacated yesterday. Together with the smoke to make the lasers visible it looked like it would be a memorable weekend for anyone that attended. Much of the buildings that are not as yet let are similar. Some parts have been used to great effect in the setting for horror film projects. All in all then a great setting for a Hacklab with lots of visual things going off.  Exciting, creepy and surreal by turns as the venue was it wasn’t why were there.

The guys at the Hacklab were very friendly and approachable; Peter had responded quickly to my initial email and as well as inviting us down to see their space and was on hand as we arrived, making us feel very welcome. They have weekly regular meet-ups that are open to the public and are keen to see new faces. Many thanks to Peter, Al, Gandalf and all the guys there who put time aside to talk to us about their projects, constitution, history and the journey to their current state.

workshop

The Workshop

As we arrived, Peter was just starting an informal tour so we tagged along. Having come into Summerhall through the main entrance and into the yard you are facing the Royal Dick pub. The Hacklab itself is the ground floor to the right of the pub. The first room on the right as you come in through the door is the workshop for the sort of making that creates mess. In the picture you can see the laser cutter back left, a mini lathe immediately left and the new workbench the guys were just completing down the right hand side of the room. A lot of treasure was piled up to the left to make way for the construction work on the bench. the workbench looked great and like it is intended for some serious making.

store

The Storeroom

Down the corridor and taking the last door on the left was the store room and also where the Ultimaker 3D printer lived. The Hacklab had recently upgraded to the Ultimaker, finding the space frame style printers need of constant adjustment frustrating. Peter explained that members stored their projects etc in Really Useful boxes stacked on shelves along the back wall and on the right of the door. This works reasonably well for them but leaves managing the space and keeping it turning over a challenge. There were more making tools behind the dismantled desks and other things temporarily stored here whilst the workbench construction mentioned above was ongoing.

Commons

The Communal and Electronics workspaces

Moving back out of the store room and across the corridor to the larger room next door to the workshop we entered into the Hacklabs commons and electronics/clean work area. This room appears to have originally been a molecular biology lab and still retains recognisable benches and fittings along with reagent shelves that separate the room into the two distinct workspaces. Al explained that they had been letting this space for a couple of years now, the room certainly showed an evolutionary accumulation of awesome projects.Visible in the picture there is a monorail around the edge of the ceiling with a lego mindstorms based robot/train parked over the electronics work area. There were also a number of cameras placed around the periphery of the ceiling. Gandalf explained that these were a spacial positioning project for a mini quad copter. On the right of the picture is a monitor and raspberry Pi combo showing activity in their freenode IRC room and on the rear wall over the electronics work-area is a large LED dot matrix sign displaying useful info about the space. On the wall to the right just out of shot on the picture was a pin board with the Hacklab shop featuring emergency Pi’s and Arduino’s as well as Hacklab souvenirs. There was a lot to see and ask about, too much to get into one visit. We can definitely recommend dropping in on the Edinburgh Hacklab if you are in the local.

For now though our time was up, we had a quick tour of some of the buildings more interesting features from it’s previous life, taking in the art and installations as we passed. Then left the guys to get on with the essential work for the upcoming weekends event. We will certainly drop in again next time we are in Edinburgh.

 

 

Visit to FabLab Leuven

FLLMainRmF

FabLab Leuven’s main maker space

Whilst visiting Leuven on other business recently I put the time aside to visit FabLab Leuven. The FabLab is embedded at KU Leuven but promotes free open access to both students and the wider local community.  As Sheffield Hardware Hackers and Makers aspire to joining or founding a full time FabLab it was a good opportunity to find out how it is done and how others have succeeded with similar challenges. Marc and Thomas run the fab lab with Jose, they were quick to point out that initial funding and finding space was only a small part of the problem. Sustainability is something that has killed several FabLab startups that had shown initial signs of doing very well.

I would like to thank Marc and Thomas of FabLab Leuven for putting the time aside to show me around, make me feel welcome and share their experience and enthusiasm for their FabLab. I can definitely recommend visiting them if in the local if only just to see how well they are doing, it is inspirational. It would be even better though to do a spot of making and hacking whilst sharing with like minded folk.

FLLLogo

FabLab Leuven Logo Tiles

First in through the door I was struck by their own floor tiles with the FabLabLeuven Logo superimposed on the FabLab Movements Logo.  The FabLab is open to all including students and drop in public users. Access and usage of machinery is free but materials are either self supplied or can be bought at the FabLab. Fab lab supplied materials are purchased in as being suitable for the machinery that it will be used with. This should make it easier to get reasonable results without needing to know in advance what materials are suitable.

The main room is a large open flexible space with tables as work spaces that are shared by those visiting the Lab. Essential services like electricity and networking drop down from a roof distribution grid. This removes tripping hazards and leaves the work tables free to be moved around as needed. The managing staff have dedicated desks in this main room so are an active part of this making community.

FLLLaserRm

Laser Cutters and small CNC

To the front of the building leading off the main room is a well organized area with a number of laser cutters and small CNC machines. I asked Thomas about keeping the optics aligned and cleaned. He showed me how the laser cutters were built such that the optics were not readily accessible from the cutting compartment which both shields them from combustion products and twiddling fingers. The lasers are plumbed up to a common air extract. It was noticeable how the air was good even in a small room stood next to 5 working laser cutters.  All the machinery in this room had dedicated PC’s to drive them with the correct CAM software to make the most of their capabilities. Taking all of these elements together it was clear that Thomas and Marc had been doing this for some time and had worked ways around the issues that crop up from time to time.

The demo makings table.

The demo makings table.

Towards the rear of the room there was a display of a selection of projects made at the fablab. Thomas explained that over the last year alone there had been literally thousands of projects coming through the FabLab from both Student and Public makers. I wondered how they had managed this. Thomas was quick to explain that being embedded within the university meant that they were able to offer voluntary staff positions to students. The students after a suitable training period are able if they so wish to open the fablab at weekends and in some cases 24 hours a day. These extended hours are usually to cope with the high demand that course hand-in’s and assessed student projects generate as dead lines approach. The same volunteer staff also provide support to members of the public coming into the FabLab.  Moving back through the main room there are a number of 3D printers ranging from a Makerbot through to a large Dimension printer. To the left hand side as we pass through Thomas draws my attention to their area dedicated to electronics work.

Workshop and CNC router

Workshop and CNC router

 

Out across the corridor there is the workshop where all the nosier and dust/waste creating activities are carried out. One end is partitioned off and this is where a full sheet CNC router lives. It has a vacuum bed and sawdust collection. We had a look at furniture items being in various stages of being prototyped and built. The services again drop down from the ceiling leaving the workspace more flexible. A dust and waste vacuum extract is also plumbed in across the ceiling with drop tubes to remove the dust from  band-saws, drills sanders and the like. Again a well equipped space light and airy with a lot of thought put into keeping it serviceable. Thomas and I both agreed keeping the Lab zoned to minimise disruption from noisy machines as well as dust etc is a good design feature.

Marc the FabLab manger joined us and we went outside for coffee. I complimented them on their FabLab. Marc was quick to explain that it had not happened over night they had gone through 3 main expansion phases as well as the usual raft of tweaks and improvements that go into running such a place on a day by day basis. I asked about sustainability Marc and Thomas explained that they thought embedding FabLabs within a larger organisation such as KU Leuven was good symbiosis and ensured a degree of sustainability that other FabLabs may struggle to achieve,  The university gained extra maker-space enabling more assessed projects as a component of their courses. Sharing of resources between university departments and the local community on a non partisan basis. Volunteer students enabled and supported their peers as well as members of the public. Marc acknowledged with a smile that having KU Leuven’s name on application for EU and Regional initiatives probably did not do them any harm either. All in all a win, win for everyone.

All in all an inspirational visit it gave me plenty to think about as I rode back into town on the Bicycle I had rented for the day from the train station. In summary then, a vibrant, happening and above all successful FabLab catering for Students and Public on a first come first served basis. Open all year round and often into extended hours courtesy of student volunteer staffers. FabLab Leuven has a wide range of capabilities and sufficient active machine, flexible manufacturing machinery and supportive staff to meet the needs of most projects, from newbie through to accomplished maker..

Wish I could say I was’nt jealous……. Time to drown my sorrows with some Belgian beer.