Configuring a HDMI Switch over serial

If you have a HDMI switch that looks like the one below, and are having problems with configuring it over serial, skip to the bottom for my solution. Please read on though if you want the full story!

I recently picked up a HDMI Matrix switch for our TV & Projector setup, specifically the AV Access 4KMX42-H2A.

Image of AV Access 4KMX42-H2A

The are a number of key features that I like:

  • Infrared control – important later on for controlling with a Broadlink IR sender via HomeAssistant
  • Supports 4K – we don’t have any 4K display kit right now but its nice to futureproof!
  • Has 4 Inputs & 2 Outputs
    • Can put 1 Input simultaneously to the 2 Outputs
    • Can have 2 different Inputs on the 2 Outputs
  • Supports a lot of higher end AV formats
    • Dolby DTS-X, Dolby Atmos etc

Our plan was to use it to send the PlayStation, Roku, laptop or TV Receiver Box to the TV or the ceiling mounted projector as desired.

When I was setting it up however, I noticed that the remote control for the switch was activating some functions on our OSMega tv box – volume, menu items and channel changes. That makes it a bit awkward to use! Especially as you could end up changing something on the TV box without realising as you were swapping inputs/outputs on the HDMI switch. Even worse, when you adjusted the volume on the TV Box remote, it changed the input to the next one up!

However, another feature that is useful on the HDMI switch (that I thought might come in handy when purchasing!) is the ability to switch the IR codes. This means that the remote and HDMI switch can be configured to use a different set of IR codes to avoid conflicts with other IR controlled equipment – exactly the scenario we were in! And this is where the fun began…..

I knew from the manual (I assume you also read the manual before purchasing an item?…..) that the switch would need to be programmed over serial. Not a big deal – I have a good bit of experience in configuring devices over serial from Arduino to 3D Printers to networking equipment (Cisco switches and routers).

So I hooked up to the HDMI switch using the little 3 pin adapter supplied and a serial adapter I had and opened up my usual serial program, Putty. The api manual supplied the connection parameters below so I set them up in Putty, hit connect and tried the Get IR_SC command to see what IR mode the switch was in.

  • Baud rate: 115200
  • Databits: 8
  • Parity: None
  • Stop bits: 1
  • Flow Control: None

No joy……

I have also used a few other programs over the years so I gave them a shot.

  • ComTestSerial
  • RealTerm
  • Arduino Serial monitor

No joy……

Over the course of a few days I kept trying different combinations of serial adapters, cables, software, and swapping TX/RX pins. I tried all the various options and dropdowns in the programs, including different connection parameters as I had encountered incorrect details in manuals before. I even “ohm’d” the connection from serial adapter all the way to the port on the switch to prove I had no issues with the wiring.

No joy……

Looking further into the manual, it calls out a program called Serial Assist. Perhaps there is some secret sauce in there that would help? So I thought I would download that and try that out .

No joy…..

It was not to be found anywhere. I found some similarly named software called Serial Port Assistant but that was not it. The closest I found was a picture of it in this pdf for a radio receiver. Even with a version number to search for, I could not find a download anywhere.

So I contacted the vendor detailing what software I had tried and the settings I had used, and they confirmed that I was using the correct settings. But, that I would also need to enable CR/NL. These refer to Carriage Return and New Line which are very similar in function but slightly different in definition. There is a good historical explanation here with reference to their origin from manual typewriters.

So I set up two serial adapters with different software, planning to show exactly what I was using, in the hope that they could spot something that I was missing out on. First I found out that my cheap usb serial adapters were not capable of communicating in the higher baud rates! 9600 was fine, but 115200 was too high. Luckily, I had two higher quality adapters from Lindy & Startech that were compliant.

Here you can see I am sending the commands required from the Serial Port Assistant software on the left to the ComTestSerial on the right. The blue dotted arrows show the feature in the ComTestSerial to highlight spaces received in {}. Everything is being received correctly so I know my configs and cables are working! I hook up to the HDMI switch with confidence knowing that I have a working serial connection……

No joy…….

I sent that same picture to the vendor and they told me to tick the “n” box in the send settings of the Serial Port Assistant. I’m pretty sure I had done that already in one of my many, many attempts to get it working but I didn’t have it enabled in the picture I had sent them. So I gave that a shot.

There was joy!

The TLDR:

The two boxes I needed to enable were the “r” and the “n” in Serial Port Assistant. I have highlighted in green the commands I was sending. You can see the return data from the HDMI switch was not processed correctly as it kept putting in new lines where there should be none, but it worked! I had now enabled mode 2 on the HDMI switch!

I wasn’t quite finished though. I still needed to configure the remote to use the Mode 2 codes. Thats the easy part though, there is a small push button on the remote to switch to using Mode 2 codes.

If you have already pressed that button on the remote and you wish to return to Mode 1, then simply pull the battery for a few mins and it will default back to Mode 1. Also something to remember when changing the battery!

Got there in the end, but I’m still not sure why the manufacturer doesn’t have a an easier method to change between Mode 1 and Mode 2 on the HDMI switch itself. A physical toggle switch would be nice but even some key combo from the remote would be a good alternative. Or even a download link to a specific serial term program and a set of instructions for that software.

Father Ted inspired phone cover

As you can see from some of the other posts, a lot of my builds are for presents. This one is no different. If you have read the series on the Father Ted inspired tape dispenser, you can guess that this build was for my brother who is a massive Father Ted fan.

He was looking at tedtees.com to choose a birthday present for himself from me, and he came across some phone covers. Unfortunately, they were only for the iPhone and he has a Samsung Galaxy S5 🙁 I looked elsewhere but nowhere else was doing anything like them for non-iPhone users. So I thought to myself, this would be a nice surprise for him if I can rig something up.

The first thing I looked for was a case that had a slot to allow you to insert your own graphics. No joy. So I looked for a clear cover with the idea that he could wedge in a printed piece of paper between it and the phone. As it was clear, the paper would be visible through the case. I found one on ebay, and even better, it had a neon green trim which is his favourite colour since he owned a Ninja.

SCAN1_Page_1

When the cover arrived, I set about making the paper inserts. Luckily there was a blank insert already with the cover which gave me a good starting point. I scanned this in using some post-it notes to add contrast. I then imported this into Silhouette Studio and used the “Trace” tool to get a set of cutting paths. I then tidied up the automatically created paths as they were a little messy in parts due to the contrast not being sharp enough between the white insert and the yellow post-its. I guess I should have used a darker contrast medium. Once cleaned up I did a test cut which came out ok but the hole left for the camera wasn’t completely on centre. It didn’t help either that i didn’t have access to the phone itself. I was relying completely on the case to be accurate.

I did a couple of copies of the cutting paths on one page, and moved the camera hole around slightly on each one. This way, I had three more test pieces along with the original. After testing with these, one more tweak was made and now I had a reliable set of cutting paths. Next step was to add the imagery.

screenshot

Screenshot of one of the sets of inserts as laid out in the Silhouette Studio software. I’ve shown just the base colours with the cutting paths in red (the red does not get printed). The registration marks can be seen in both of the top corners and in the and bottom left hand corner.

 

I used the images from the TedTees site for one or two and for inspiration for my own Ted themed inserts. As I had the cutting paths all laid out, it was pretty simple to run off a large batch of around 20 different inserts. Enough choice to keep my brother happy for a long time! Plus, with the studio files saved, any insert can be recreated easily so if they get lost or damaged, they can be replaced quickly and with little effort.

 

Lego Oogoo moulds

My friends daughter has an upcoming birthday and is having a Lego friends themed birthday party. I had seen an instructable several years ago for some Lego shaped jellies and had always wanted to make some – here was the perfect excuse!

Looking for some food safe silicone to make the mould was proving tricky however. Plenty of places in the UK but either they would not ship outside of the mainland or were exorbitantly priced for a small amount. I was primarily looking at Smooth-On casting products but then went for food safe silicone caulking with the idea to make some oogoo – another thing on my “must try it someday” list.

First was to try out some basic non food safe silicone to see how the mould making would go. Unfortunately I didn’t take any pictures of the process but I ended up with a mould as follows after leaving it set overnight.

Lego_Oogoo14 Lego_Oogoo13

I was pretty happy with it. Some loss around the side walls and some loss of definition on some of the studs but overall a decent first attempt. I used a wooden coffee stirrer stick to place the oogoo in place and as it is about 75% of the width of a single Lego block, it worked a charm. It also had the flexibility to act in a spatula type fashion to spread out the oogoo. I did however put in a little too much cornstarch for the first batch and made too much so that by the time I was putting the last of the batch in place, it was already going off quite substantially and I had to dump the last quarter of the batch.  This negatively affected its ability to conform to the studs on the top of the block and was the reason I believe that the casting was not so well defined around the studs.

Having made the practise casting, I went ahead with the real thing using food safe silicone and a few lessons learned from the first go.

  1. Use a bit less cornflour to lengthen the working time
  2. Make smaller batches to ensure it remains workable for the duration of the moulding
  3. Take care around the studs and where possible use the first couple of applications from the batch on a stud section to take advantage of the pliability before the curing begins
  4. Use multiple smaller bricks instead of long bricks for the outside walls. It makes it much easier to remove them when releasing the mould.

My mould was made from my old Lego bricks that I had when I was a kid. It was really cool to reconnect with all the memories, especially with some of the more unique bricks that I individually remembered: Space “computer” bricks, turbines from an aircraft, Robin Hood etc.

Check out this really cool interpretation of the computer bricks

My friends daughter was going to be 6 years old and her name begins with an E so I made those in Lego aswell. I also thought it would be cool to make some of the other shapes for some variety. (now thinking about it, I wish I made some of the circular bricks aswell….maybe next time!)

Lego_Oogoo1

The mould is shown upside down so E appears backwards

Lego_Oogoo2

 

I mixed up the oogoo and began moulding. I started in one corner and worked outwards, building up the layers slowly, taking care to pay attention to the area around the studs. As before, I used the wooden coffee stirrer stick which worked very well. I used almost the full tube of silicone to make the first mould and as you can see from the pics, it was a clear silicone so I got a bit of a surprise when the second tube was a black silicone. Not an issue really but the clear is better to judge the mixing of the cornflour. As I could no longer judge from the colour, when I thought it was mixed, I just gave it a couple of more stirs to make sure.

Lego_Oogoo3 Lego_Oogoo4 Lego_Oogoo5 Lego_Oogoo6

The second mould was a bit smaller so was a bit faster to make and I was getting better at judging the batch size. There is no issue in making multiple batches as the oogoo sticks to itself very well. Once done, I put them aside and left to set overnight.

Lego_Oogoo8 Lego_Oogoo7

Next morning, I began the process of removing the retaining walls to speed up the curing process. The curing in most silicones is achieved via moisture being absorbed by the silicone. By removing the retaining walls and base plate, I would be exposing a greater surface area to pull moisture from the air.

Lego_Oogoo9 Lego_Oogoo10

It was then I spotted the difference in colour around the “E”. I’m not sure was this because it was the last of the silicone in the tube or if it was the amount of cornflour I used for that batch but it didn’t seem to be affecting the curing as it had the same level of squidgy-ness as other areas. I’m inclined to think it was the level of cornflour I was using as I had been using progressivly less with each batch. This turned out to have a negative effect when removing the Lego blocks as they were much more difficult to remove from those areas where I had used less cornflour. I had to use the coffee stirrer to persuade the silicone to pull away from the Lego when removing from these areas although there was still no tearing. The areas where I had used more cornflour came away very easily.

Lego_Oogoo12 Lego_Oogoo11

Overall I’m pretty happy with how they turned out although if repeating I would make the following changes:

  1. Make sure to get all clear silicone
  2. Measure more accurately than two pulls of the caulking gun and a pinch of cornflour!
  3. Add more cornflour
  4. Based on further research, add some gelatine to assist with the curing
  5. Use the more flexible base plate like I did for the larger mould. The stiffer one was harder to remove from the smaller mould.

Still it was all worthwhile! There will be further posts on the making of the jellies themselves 🙂

 

SHS Piston and ACM Piston head incompatibility

Just a quick post that may be of use to someone who is going to repair an airsoft L85.

I recently needed to replace the piston and piston head on  an airsoft SA80 (an Army Armaments L85 to be exact) due to damage to the existing set. The teeth were stripped on the piston and there was a chunk taken out of the piston head.

L85Piston001

The parts I chose to replace them with were an SHS 19 metal tooth piston and an ACM bearing piston head. The Piston was chosen as it was the cheapest one I could get that was suitable for the L85. A standard 15tooth piston will not work without a spacer as the gearbox design requires a longer piston. The piston head was chosen, as the cheapest decent part available.

L85Piston002 L85Piston004

The piston head had a bearing set that allows it rotate as needed. This reduces the possibility of the piston going off center and therefore reduces risk of piston/gearset damage/failure. The bearing set goes on the inside of the piston and connects to the piston head on the outside via a screw.

L85Piston006 L85Piston007

There was an issue on assembly though. The screw that is designed to go through the piston to hold the piston head in place, was too short. It would work on other pistons, but the SHS 19 tooth piston is thicker at the top and so the screw is just a little short. I was able to replace it with an M3 x 10MM which worked perfectly. The original screw had a countersink head but the thickness of the piston head was such that it accommodated the standard head on the replacement.

L85Piston008 L85Piston009 L85Piston012 L85Piston013

Success! The assembly went back into the gearbox with no issue and has been reliable during testing and game time. Silicone grease was added to the oring before putting in – helps with airseal by ensuring the oring doesn’t dry out. Abbey Lt2 (silicone grease with added molybdenum for heat resistance) to the piston teeth.

It is important to use silicone based grease as petroleum based oils/grease will “eat” the rubber seals. Keep an eye on the components of the lubricant as sometimes they will mix in some oil based lubricant. I personally avoid the aerosol sprays as you can get better placement with the raw oil/grease and makes certain that you are not getting any extra ingredient you didn’t want.

 

DIY Lipo battery

Another hobby of mine is Airsoft – imagine paintball but with small plastic pellets. Great craic and a good way of getting in some sneaky exercise.

Most of the guns used are classed as “AEG’s” – Auto Electric Guns. A battery is used to power a motor which pulls back on a spring loaded piston through a set of gears. When the piston is released, it moves forwards and compresses air – this air is used to “fire” the plastic pellet down the barrel.

As is the same with most devices, the most common battery type used in Airsoft nowadays is the lipo battery. Great power in a small package but it has is downsides. One of those is that they can fail fairly easily in comparison to nimh batteries and when they do, the typical mode of failure is that they will go puffy and swell up. This is a good indication that the battery is on the way out or has already failed.

You can see the puffiness in the battery at the right hand side. Due to the gassing, it has swollen up.

You can see the puffiness in the battery at the right hand side. Due to the gassing, it has swollen up.

DIYLipo001

 

My brother also plays and two of his batteries had suffered this fate, each one looking like one of the cells in the battery had failed. The batteries in question were 1200mAh 7.4V G+P 20C lipos. Given that they were the same type of battery, I offered to combine the remaining good cell from each battery to make a “new” battery. It is important to note that this was an option due to the same cells being used in both batteries. If the cells were mismatched (different mAh rating) this would not be a good idea as it would lead to an unbalanced battery pack.

Each battery is composed of two 3.7V cells: 3.7V + 3.7V = 7.4V. These values are only the nominal values for the cells and actually can vary quite a bit from that nominal value. By testing the voltage of each cell, it should be possible to work which are the bad cells and if there are two good ones.

DIYLipo007

Voltage across both cells shows 3.97 when expected to be between 6.2 and 8.4

 

DIYLipo008

Bad cell showing 0V

DIYLipo009

Good cell showing 3.97V – same voltage as shown above to be across both cells

 

Good cell from second battery

Good cell from second battery showing 4.04V

 

The testing of the voltages can be done via the balance lead which has connections across each of the cells as shown in the image below.

Testing the cells in the first battery showed that one cell was at 0V and one at 3.97. The second battery gave a similar 0V and 4.04V so we had two good cells! 🙂 if you look closely at the pictures above, you can see that the voltage on the good cell in each battery is measured across two different pairs on the balance lead. This implies that it should be easier to recombine the two good cells into one battery as they are naturally the two opposite halves of the battery.

Next step was to start stripping the batteries down to the separate cells. The battery is covered in a shrink wrap coating. I used a blade to carefully nick the plastic coating at one end and then tearing off the shrink wrap.

DIYLipo013 DIYLipo017

You can see the silver foil that forms the outer covering of the cell. It is very important to avoid puncturing this to prevent a fire starting. Covering both ends is a piece of thick paper and some kapton tape. The kapton tape acts as insulation to ensure there are no short circuits.

DIYLipo018 DIYLipo021

The two cells were attached together with double sided tape so I carefully prized the cells apart using a round plastic rod to rub in between the cells to break the adhesive seal of the tape. You can see that the cells were marked at one end with a “+” to denote the positive end.

DIYLipo023

One of the cells on the second battery was already ruptured before I had removed the shrink wrap. You can see some of the lithium polymer that has oozed out and crystallized in the picture above. At this point I was thinking about stopping but as the battery hadn’t exploded in the last few months, I didn’t think it would go any further. I did however carry out the rest of the dis-assembly of that battery whilst outside and holding it over an ammo can. If there was any heat build up, indicating an imminent issue, I could simply drop the battery in the can and close the lid to reduce the air supply to the fire. I also had a fire extinguisher on standby just in case.

DIYLipo022 DIYLipo025

You can also see how the cells are joined via foil tabs at the end. Using a soldering iron, I heated up the solder on the joints, adding a little of my own to assist with the heat transfer. With solder melted, I simply pulled the cells apart. The end result was 4 cells, two good and two bad. The ones marked with a red X are the bad cells. You can see the extra puffiness in both of them in comparison to the good cells. In the bottom cell, you can see the board connecting the balance plug and main battery connector (a mini deans in this case) is left in place. This was deliberate as it reduced the number of extra solder joints to be done on the new battery and it would only have been a replication of the existing connections anyways.

DIYLipo031 DIYLipo034

One thing to note when soldering batteries is the need to avoid heating the cells up. When working with lipo batteries, this is especially important. The technique used in industry is to use a spot welder on the battery tabs. That allows them to place a large amount of heat for a short amount of time thereby minimizing the chance of heat transfer into the cell itself. We can use a similar technique by using a soldering with a large head and by using a high temp ~ 500C. This is in contrast to the usual electronics soldering technique of smaller heads and a lower temp. You can see the difference in head size above, between the normal electronics soldering iron on the left and the larger iron on the right.

The technique is to allow the iron to come up to temperature, then place it on the solder joint. Feed in some new solder as this will help the spread of the heat throughout the joint. Once the solder has melted, remove the cell whilst simultaneously removing the soldering iron. This process should only take 2 seconds at most so do not leave the soldering iron in contact for long. You will also need to keep an eye on the temperature of the cell as the heat will damage it or possibly cause a fire.

DIYLipo030 DIYLipo039

The battery I was creating was in the nunchuck style as it was to go into a tight space on the gun. Normally in a two cell lipo you would connect the cells directly end to end, but with the nunchuck style, a separate wire is required to run between the two. In the first picture above, you can see the thick blue wire which will join the negative of the right hand cell to the positive of the left hand cell. The wire use is 14 AWG  to ensure it has the current carrying capacity – if you use a thin wire, it will heat up with the high current. If you are lucky it will just wear out……if unlucky it will cause a fire…..Can you see a running theme here regarding fire! 🙂

The thin blue wire on the left is coming from the balance plug. This will be extended down to end of the battery and it is important to keep this as a balance plug is necessary to maintain a healthy battery pack. In the right hand picture, you can see where the two wires have been soldered on to the tabs of the cells. I chose to flatten out the tabs to make it easier to solder onto, but this would latter come back to bite me when fitting the battery.

DIYLipo035 DIYLipo036

I also extended the connection from one cell to the other to allow for extra flexibility when inserting the battery in the gun. I also added some heatshrink to cover the main connections, and I later added some hot glue for further moisture protection.

DIYLipo041 DIYLipo042  DIYLipo044

 

I used some foam padding which was removed during the teardown of the battery to give a little protection to the exposed tabs before wrapping the ends in new kapton tape. If you don’t have kapton tape, you could use insulation tape. I then replaced the thick paper on the ends and added some hot glue for further protection.

DIYLipo045 DIYLipo046

All done! I wrapped some more kapton around the cells and wire to keep it neat

However, on putting the battery in the gun, I realised that I had made each half of the nunchuk too long and it would not fit in! I had miscalculated and had been working off the assumption that the handguard when the battery went was all hollow, and also that a battery I was using for size had the correct length. I was wrong on both counts! I had planned to put some more heatshrink over the cells, but I am glad now that I didn’t as it gives me a chance to alter the soldering to shorten the connections and therefore the entire cell length.

When I will get around to do that is a different story!

Homemade Foamboard Cutter

As mentioned previously I made a foamboard cutter to allow me to make consistent and neater 45º cuts. I initially made it out of foamboard itself but have since disposed of it as it was unsuccessful and didn’t give great results. I went with the X-acto X7747 in the end but its worthwhile describing the build process in case it is of use to others to replicate or improve.

I have replicated my basic construction using corrugated cardboard and cocktail sticks in place of foamboard and pins. The basic idea is that the folded shape of the cardboard provides the cutting angle and the cocktail sticks help to keep the blade in the same position.

IMG_20150226_004541 IMG_20150226_004701

Fold the cardboard to 45º (or any angle you desire). Use a protractor for better accuracy. You may need to take the cutter’s shape into account if the cutter puts its own angle on the blade. My cutter maintains the blade perpendicular to the holders base so no corrections needed. Use tape/glue to hold the folds in place.

IMG_20150226_004933

Insert cocktail sticks to provide a resting place for the cutter. Make sure to push them through to the back aswell. This will provide an anchor point for the cocktail stick and provide a greater resistance to downward pressure on the blade when in use.

IMG_20150226_010748 IMG_20150226_010802

Mount the cutter on the cocktail sticks and add extra/adjust as required. Once you are happy with the setup, you can trim the cocktail sticks. Secure the cutter to the holder using tape.

You are now free to cut at whichever angle you have setup.

There is a good bit of scope to improve the design. Using wood to form the base would add sturdiness and using a razor blade mounted via screws would help prevent movement of the cutting blade. There is also a flaw in the build shown above – the tape at the rear of the cutter blocks the movement of the sliding blade. D’oh!

After I had prepared this post but before publishing, I saw this on Hackaday. Great minds think alike!

 

 

 

 

Silhouette Cameo

One of the tools I use quite a bit is the Silhouette Cameo, although mine is the previous non-touchscreen version. Its an automated cutter that will do vinyl, paper, acetate and card – imagine a printer but with a cutting blade instead of an ink head.

cameo

My model, now replaced by a touch screen version

 

Its controlled via USB (although it can also work from SD cards in a stand alone mode) and uses the Silhoutte Studio software to design your cutting files. The Cameo also has optical recognition built in so it can recognise registration markings that you have added to a print out. This allows you to use an existing image, add cutting paths for the blade to travel over, then print out the image on your medium of choice with registration markings in three of the corners of the page. The Cameo then scans these markings via the optical recognition camera to get the correct alignment and cuts along the paths you have laid out in software. This video does a good job of showing the entire “print and cut” method.

Like the majority of the vinyl cutters, the medium is held in place by a sticky cutting mat. The tackiness does decrease overtime with usage but it can be refreshed by using some spray adhesive. The supplied mat is a 12″ x 12″ but there are larger ones available as well as with different levels of stickiness. This is pretty good for the majority of work as it allows for A4 usage with ease (and A3 if you choose your alignment wisely).

The blade is replaceable but I have yet to need to do so after quite a bit of cutting. There are other replacement blades available from 3rd parties which are linked down below. The upside to these is that they are much cheaper but you do risk your warranty if you cause damage whilst using them.

Overall I think its a great tool and once you start using it, you can find all kinds of uses for it.

 

Pro’s

  • Software is pretty easy to use, especially if you have some desktop publishing skills
  • Print and cut feature is very useful
  • The import of other graphics formats and fonts means that you can cut an infinite number of designs rather than restricted to a limited few (or pay for more) like the Cricut Mini
  • Can do very detailed work down to 1mm wide
  • Once the design is finalised, it is very easy to churn them out

Con’s

  • Tracing some images can be difficult and time consuming if the edges are not clearly defined
  • Can be loud to some
  • Official blades can be expensive
  • The print and cut alignment can sometimes take a few attempts or requires the material to be moved on the cutting mat
  • Occasionally it will get the alignment wrong which can be costly if you are using expensive/limited material although this was usually when I had plugged it in and out a few times

 

Links to discussons on alternative blade holders

http://paperpulse.blogspot.com/2013/06/a-better-and-less-expensive-blade.html

http://ligayatg.blogspot.com/2012/04/aluminum-blade-holder.html

http://forum.make-the-cut.com/discussion/20110/blades-in-the-silhouette-cameo

http://ramblingsofababymakingaddict.blogspot.com/2013/05/replacement-blades-for-silhouette-cameo.html

Greetings from Kilnettle – Part 3

Having tested and placed the hall effect sensor, the next stage was to come up with an algorithm to detect the movement of the roll of tape, and to then calculate the amount of tape used.

In the episode, there are 3 phrases used (after more careful watching, there are four phrases) one each for “1 inch of sticky tape”, “2 inches of sticky tape” and “3 inches of sticky tape” (I got these lengths wrong too!). Based on this, I wanted to classify each tape usage into one of these three lengths and then play the appropriate phrase.

0 to 1 inch -> play 1 inch clip

1 to 2 inches -> play 2 inches clip

2 inches and above -> play 3 inches clip

My method of playback was going to be via a nifty module that plays back .wav and .ad4 stored on a micro SD card. The WTV020SD is readily available on ebay and is pretty cheap. There is a good library available for its use with an arduino, although it can also be used as a standalone player. The one downside, is that it requires 3.3V which means adding another regulator into the circuit if not natively available. Hooking it up to the arduino is pretty easy and I used a duemilanove as my development board and so used the 3.3V output from that to power the module during the development.

I fleshed out my algorithm idea on the whiteboard and drew up a circuit block diagram to help with the planning. You can see the picture below of the whiteboard stage, but please note the algorithm changed in the actual coding. Converting from pseudo code to actual code went pretty well considering it had been a while since I had done any programming on the arduino.

 

Before diving into the main program itself, I broke out some of the steps into separate chunks to test those first. By breaking the process into stages, it enabled me to simplify testing and identify quirks as there were some issues reported in the library’s thread on the arduino forum. It also allows for a more modular design in terms of approach.

First was to test the playback of the episode phrases. Using the scripts book, I had a good idea of the rough location of the phrases. I then used youtube as a source for the episode audio. I would have used my brother’s dvd boxset but it was with him out of the country!

I used an add-on for firefox to scrape out the audio as an mp3, then I converted the mp3 to wav using Audacity. I used a tool from 4D that converts .wav to .ad4. The tool is available for download on their Somo-14D page as it seems to be based off the same base chip as the WTV020. The files must be numbered 0000.ad4, 0001.ad4 and so on. Once converted, I copied them to the root of a an old 64MB microSD and placed the card in the WTV020.

The library comes with an example “sketch” so I used this to test the playback of the audio clips. There was a slight issue with the playVoice call as the toggling of the busy pin was not reliable. This was noted in the library thread with some fixes noted by others but even with those fixes applied, i was still having issues with the playback. Instead I chose to go with the asyncPlayVoice call which uses the delay() call to allocate the length of time to play the clip. Given I knew the length of each clip, this wasn’t a big deal.

Using some buttons, I rigged up a circuit to trigger each clip based off a button press, i.e. press button 1 to play clip 1 etc. This worked well enough so I expanded to trigger off the hall effect sensor. I was using an extra hall sensor just plugged into the breadboard so I just added some code to read the value of the sensor and if it fell above 700 to play a sound clip. Again, this worked well enough so I was now happy I could trigger the playback of a desired clip as required.

Next up – the implementation of the logic for determining the length of tape used.

 

 

 

X-acto Foamboard cutter (X7747)

One of the materials I have started working with recently is foamboard. It is made up of a layer of polystyrene sandwiched inbetween two thick paper layers.It is a very lightweight but sturdy material that is structurally very stable and pretty easy to work with. I got mine in a local art/crafts shop but its pretty cheap online too.

Its best cut by using a sharp blade and running the blade along the cut line three times. Once to break the first paper layer. Second to cut through the foam layer and third to cut the second paper layer. By taking advantage of the integrity of the second paper layer until the third cut is made, you can make some interesting cuts and incisions to achieve different joining mechanisms. I will talk more about these in a different post.

There is a difficulty in cutting at 45 degrees however. Due to the thickness of the foamboard, you often need to make 45º cuts for neater joints, especially at corners. Looking on Youtube, a lot of folks are using specific foamboard tools, usually the ones from Logan. I tried sourcing some of these but they were quite pricey to get locally and even when getting them online, they were still rather expensive.

I tried making the 45º freehand but they were uneven and gave a poor finish. So, in true cheapo style, I decided to make my own. I had some scrap pieces of foam board that I had been using to test paint interaction with the foam itself. Using these and some pins, I attempted a crude angled holder that was designed to work with one of my cutting blades.

It sort of worked but it was difficult to maintain the positioning of the blade and keep the holder on track at the same time. The theory was sound but needed a better construction – possibly out of wood and screws. I was on a tight-ish deadline with the project I was working on so felt it was better to splash the cash instead of fiddling with another project to complete this one

In steps the Xacto X7747! Its cheap enough on Amazon (approx €7) and the reviews aren’t too bad. Nothing stellar but not one star level either. Its designed to allow for 45º and 90º cuts although I have only used it for 45º so far. As the depth has to be set manually, it is too cumbersome to constantly be adjusting for the different lengths required for 45º and 90º cuts. There are guide marks but I found them to be two imprecise and ended up doing test cuts after every change to make sure i wasn’t going to run through the second paper layer.

I tried using it as shown in the video but I found I was able to get better results by setting up the cutter as described for left-handed use but to use it with my right hand. I would measure back 25mm from the line I wish to cut, place the straight edge of my ruler along that new line, and run the cutter along the straight edge. This overcomes one of the flaws in the tool which is the short length of the angle adapter.

Another downside, is that the blades are not the standard Xacto blades. It requires 8R Utility Xacto blades which are harder to find and more expensive. Given the ability of foamboard to dull blades quite quickly, it is something to remember.

The shape of the cutter is also a bit awkward to deal with for storage purposes and once you have your blade set to a depth that suits you may not want to change it just for storage. I put mine in a small plastic box without adjusting the blade. This allows me to store it easily in the  toolbox without risk of injury due to stabbing!

Would I still recommend it? Yes! If you are going to be using it for occasional use, the downsides are easily overcome and its pretty cheap. For day to day use it would probably be best to use one of the Logan tools or design your own if you are so inclined.

For those who are really on a tight budget, there is the hobbyking cutter but from reviews, it seems to be a bit of a hit and miss tool. After you factor in shipping, the Xacto isn’t much dearer and the blades are even more obscure for the hobbyking tool. Maybe you have another option to reccommend?

Greetings from Kilnettle – Part 2

After the trial of the infrared sensor, the next test was based on using a Hall Effect sensor. In this case an Allegro A1302 which is a pretty common hfe sensor. I got mine from Tayda Electronics which are a great source of “jellybean” parts.

I wanted to put the sensor on the inside of the dispenser so as to hide it from view so the first test was to see if the sensor was sensitive enough to pickup the magnet through the plastic of the dispenser. Again, I used analog read on the arduino but in this case the sensor requires no extra circuitry apart from 5v, Gnd and the output pin connected to analog 1. Instead of putting the sensor inside the dispenser, I left it on the breadboard and used the base I had removed from dispenser to simulate the dispenser wall.

The first magnets I used were some 6×2 mm ones which required that they were pushed up right against the dispenser wall to be detected. I’m not sure of the “N” rating as they were some ebay cheapo’s.

I then swapped to 4×2 mm N52 which worked a lot better. For the initial testing, I simply taped the magnets in placed but then swapped to using blu-tack for the actual installation. This would allow for the magnets to be moved to the next roll of tape once the current roll runs out – I do plan for this to be usable on a daily basis and not just a show piece!

As you can see from the picture, the magnets are inserted at equal spacings around the roll. I tried with three magnets but found that there were “dead” zones where the sensor value did not change. Also, as the magnets are side on to the sensor, there is a possible improvement to be gained by rotating them 90° so that the North or South pole is facing the sensor. As I didn’t have any smaller magnets, I stuck with the magnets as they were as there was enough of a variance in testing.

Satisfied with testing I decided to wire up the A1302. The downside of these sensors is that they can be a little sensitive to heat and I burnt out my first one as I applied the heat for too long in attaching the wires to the sensor. It still gave out values that corresponded to magnet proximity but the magnet had to be touching the sensor for any kind of change in result.

Not wanting to repeat the mistake, using a 3×3 piece of stripboard, I added the wires on one side first, then added the sensor. By placing the wires first, they acted as a heatsink when adding the sensor and so drew away any excess heat. If I was to place the sensor first and then the wires, the sensor would be subjected to extra heat as I was soldering the wires. As it was the wire to hand, I went for solid core but should really have used stranded wire to allow for greater flexibility when doing final assembly.

Once assembled, some heatshrink was used to seal it up and provide a nice surface for the “superglue” to adhere to.  Using the tape to hold the sensor in place temporarily, I optimised the placement to get the greatest range of values from the output pin. Once I was happy with the placement, I used some cheap superglue to hold it in place. The sensor now gave values ranging from 490 to 521 as the roll was spun.

A1302 can just be seen tucked away with the board covered in yellow heatshrink. The sensor itself was left exposed to avoid the addition of another medium to "sense" through.

A1302 can just be seen tucked away with the board covered in yellow heatshrink. The sensor itself was left exposed to avoid the addition of another medium to “sense” through. Picture was taken at a later stage in the build – the stripboard with resistors was not in place at the build point being described

Next step was to come up with the algorithm to detect and calculate the length for the removal of tape.