Showing posts with label Tutorial. Show all posts
Showing posts with label Tutorial. Show all posts

Friday, 16 May 2025

Synthesizer Extra's No.6: HOW TO MAKE PCB's USING KICAD 9.0

A short introduction to KiCad 9.0 and step by step guide to making PCB's in KiCad. I go through the steps with you and tell you my learning experience.

For some time now I've been watching how many of my website followers have been producing awesome PCB's from the schematics I posted instead of doing them on stripboard. Last week I decided the time had finally come for me to really get to grips with KiCad because I really wanted to be able to do that too. I had tried KiCad before and I also tried EasyEDA but found both sort of overwhelming. There's so much coming at you that it can seem impossible to get through but that's not true. You just have to know where to start. In this article I will try to explain how I learned KiCad in less than a week. I was advised to go with KiCad over EasyEDA and I'm glad I listened ^___^
Sadly, now I know how to make PCB's this will probably mean the end for the stripboard projects. Naturally, what's on this website will stay here and it will remain free for everyone to use but new projects will now be made with PCB's. More on this later.

First step: what is KiCad?
It's a free software that you can download from here.  (The name KiCad actually comes from the first letters of a company of Jean-Pierre Charras' friend "Ki", being combined with Cad which stands for Computer Aided Design. It was created in 1992 by Jean-Pierre Charras.)
The software consists of two destinct steps. In the first one you're going to draw a schematic and in the second step you're going to turn that schematic into a PCB design.
Once you downloaded KiCad and successfully installed it on your Mac or Windows 10 or 11 PC or your LINUX PC you can open it.
You'll be presented with a small start screen that shows all the options.


Go to the top left FILE section and click on 'New Project'. Choose a name for your project and confirm.
In the screen shown above there will now appear a project file with a schematic symbol and a PCB symbol. Click on the one with the schematic symbol in front of it. You can see my last project in this screen was the TB303 filter.

DRAWING A SCHEMATIC
Now you need to draw a schematic. 
In the Schematic editor, go to 'FILE' and choose page settings. Here you can fill in all the data that will appear in that little text box at the bottom right of the schematic drawing.


One more step before you can start drawing. We're going to import all the different components that we're going to need in our schematic like the transistors, the chips, the resistors etc.
To do that you click on the little opamp symbol on the right, 3rd from the top. Now the component library opens up. Actually, it's called the 'Symbol Library' and components are called symbols.


You can search in this library for anything you need. If the specific part you need isn't available, just choose a part that looks the same and has the same pinout. For instance, for the TB303 filter I needed 2SC945 transistors but they're not listed. So I chose the 2SC1815 which has the same pinout and was available. This is not simulation software so that doesn't matter as long as the pinout is the same!
Drag your components somewhere into the drawing. 
You can make your own symbols in the symbol editor if there are for instance rare vintage components that you can't find, you can draw it yourself and assign it electrical characteristics. But I'm not going into that here. In this tutorial I will keep calling them components.

CHOOSING A FOOTPRINT.
Each component needs a footprint assigned to it so the PCB editor knows how big it is and where the solder-pads need to go.
To do this click on your component until it lights up blue. Now it's selected, type 'E' on your keyboard or 'right-click' and go to 'PROPERTIES'. Now a pop-up appears where you can change the value of the component, the designator and there's also a field called 'Footprint'.  It's probably empty. Click on it and you'll see three little books appear at the right of the footprints field, with one book leaning against two others. That's the symbol for the footprint library.


Click on the little books. Now the Footprint library opens. 
Look for your component name and find the footprint with the dimensions you want. This is going to be a bit of a task in the beginning because there's a lot to choose from. Most footprints have PDF datasheets attached to them that you can click and see for which components they were made. You don't have to choose the exact same component name to get a usable footprint. You can assign any footprint to any component, as long as they have the same number of pins. Once you found a footprint you like, save it in your own library so you can quickly find it again. You can edit any footprint in the 'Footprint Editor' which is the symbol that looks like a DIP6 chip with blue blocks on the legs in the top middle of the page.
You can give it bigger pads for instance. There you can also make your own footprints from scratch.
You can create your own footprint library by right clicking in the Footprint Editor, on the footprint name. A pop-up will appear where you can give it a new name and save it, and at the bottom left is a button called 'New Library'. Click that to make your own library that will appear in the list in alphabetical order, depending on the name you gave it. You can not save an alterred footprint back into its original folder because they are 'read only'.



Above is the footprint I use for resistors. 
You need to assign a footprint to one component first and then, when drawing the schematic, when you need more of them you just duplicate the first one by selecting it and clicking CTRL + D. That way all the changes you made and the footprint you chose will be duplicated with the component and you don't have to set one for every little component in your schematic. This saves a lot of work.


START DRAWING
When you imported all your components and gave them all footprints you can start drawing. Place the components where you want them and connect them together with the wire tool which is the thin line symbol on the right, 4th from the top. Use CTRL+D to duplicate any component if you need more of them. Like I mentioned before, this will save you having to enter a footprint for every component you use, because it will be duplicated with the component.
Press 'R' to rotate a component.

ABOUT THE POWER SECTION
Now you need to add a little drawing of the power input to your circuit, separate from the main schematic. You need to select a connector with 2 pins (for + and GND) or 3 pins (for + GND and -) or a Eurorack connector or something else and choose a footprint for it. Click on the 'GROUND' symbol (the one with one vertical and 3 horizontal lines under it, you know) on the right and choose for instance the +12V and attach it to the plus line. Choose the GND symbol for ground and for instance the -12V for the negative voltage rail. 
Now go to the ground symbol again and choose the PWR_FLAG symbol and connect a power flag to each of your power lines. +, gnd and -. They must be connected right to the wire that comes out of the power input connector. They may not be connected to wires after components that are connected to the power input connector. They must be directly connected to the input. That way the software knows were the power comes from. You don't have to connect this part to the rest of the schematic. When you use, for instance, +12V symbols anywhere in the schematic, the software will know it connects to the power input section when you used the same symbol.
If you use a voltage regulator on the board, for instance for an extra +5V powerrails, you don't have to connect a power flag to that +5V line. It's only for power that comes into the board from outside.

When you completed your drawing you need to check it for mistakes. You do that by clicking on the Electrical Rules Checker. That's the 6th symbol from the right on the top menu bar. The one that looks like a list with a red circle with a check mark in it.

ANNOTATING YOUR SCHEMATIC
Every schematic needs to be annotated to make sure every component has a name the PCB editor understands. It puts a 1 after the name of potmeters and in- and outputs. If there are sub circuits that work independently of eachother they will be assigned different numbers to tell them apart.
To annotate a schematic, go to the TOOLS menu and click on 'Annotate Schematic'. You must also do this after you changed the footprint of a component for an other one, to update the schematic.
After the schematic is finished and has zero errors you can go over to the PCB editor to turn it into a PCB design. Don't forget to save it of course.

MAKE SURE YOUR SCHEMATIC HAS NO ERRORS IN IT BECAUSE THOSE ERRORS WILL BE CARRIED OVER TO THE PCB LATER.
Pay special attention to the power connections of any opamps in your schematic! I went wrong there many times and had components connected to the wrong polarization.

THE PCB EDITOR
Click on the symbol for the PCB editor and let's get designing.
First we're going to go the FILE > 'Page Settings' and again fill in the data for under in the text box of the drawing. It's good practise to do this although not really necessary. 
Now, in the FILE menu, click on Board Settings. Here you can input a ton of things that you want your PCB to comply with. Forget all that for now. I just want you to click on 'Design Rule Constraints'.


Here you can set the minimum track width and other parameters that influence the copper on the board. I only really change the minimum track width to 0.4 or 0.5mm and leave the rest as it is.
Sometimes when checking a PCB for mistakes you will get a warning that there is a problem with the thermal connection of a ground pad. If you set 'Minimum Thermal Relief Spoke Count' to 1 those warnings will go away.
Now, the moment of truth. 

IMPORTING THE COMPONENTS TO THE PCB
Click on 'Update PCB from Schematic' (the middle symbol of the three shown above) or click F8 to import all your components into the PCB Editor.
You now see all your component outlines in a small space. This is called the rats nest.
Now you need to pull all this out with your mouse and start placing the components on the field in somewhat the same position as they have on the schematic. This way you get the shortest tracks between them. Pull it all out and use as many space as you want. When you have everything ordered you can start placing the components closer together and build up a nice compact PCB layout with the shortest tracks possible. You will see what is connected to what when you drag the components around.
You'll see a thin line that connects the component to other components. Sometimes, when you drag a component around, those connections will jump between different points. Those are usually the power and ground pads and the software chooses the shortest connection.
The Ratsnest:

Once you got all this done you can start drawing the traces between the components by hand. There is a plugin that you can install, that will do it automatically, but I want you to do it by hand. This works much better. You must choose the F.Cu layer to draw on the front of the board and you must click on the B.Cu layer to draw on the back side. It is good practise to draw as many of the horizontal tracks on one layer while drawing the vertical tracks on the other layer. This prevents cross-talk and noise.
If you can't lay a track because the way is blocked by other tracks, attach a 'via' to move to the other side of the board and continue the track there. To place a Via, right click on the active track as you're laying it and choose 'place through via'. Make sure there is no track sticking out in front of the via. That can become an unconnected track later and you'll have to find it and delete it. Before planting the Via in its place I always shake the mouse a little to get rid of bits of track sticking out where I don't want them.
TIP: Leave all the connections marked 'GROUND' unconnected. We're going to use a groundplane to connect all those together at once, later.

AFTER THE TRACKS ARE DONE.
Okay, so you have your first PCB set up. Now you need to define the edge of the board. Select the 'Edge Cuts' layer for that. Now choose the 'Draw Rectangles' tool and draw a square around your board. Leave a few millimeters between the outline and the outer components.
Once you have this done you can choose to round off the corners. For that, right click on the outline of the board and choose 'Shape Modification' from the menu. You can enter the radius of the curves in millimeters. You can also add mounting holes in the corners with the circle tool.
In between all these steps, regularly check your progress with the 'Design Rules Checker'. It will tell you what's wrong with the board. If you don't understand a certain mistake that is listed, just Google it. Many have gone before you and there are solutions to be found for all the possible mistakes you can make.
Checking for mistakes is called running the DRC but I always call it 'Run DMC' after the rappers :)
Oh, very droll sir!

ADDING GROUNDPLANES.
One more step is to add groundplanes to fill up the board with copper and connect all the ground points together. Click on the B.Cu layer and now click the 'Draw Fill Zones' symbol or click CTRL+SHIFT+Z.
Take that tool and draw an outline around the board just like the edge cuts outline. Use the mouse wheel to zoom right in on the corners. When the outline is completed, go to EDIT > Fil All Zones or click 'B' to fill in the backside. Now select the F.Cu layer and repeat the proces for the front layer.
Again do the Run DMC, I mean run the DRC to check for errors. The warnings are not vital but the errors need to be fixed before a PCB can be made. But you'll learn soon enough how to fix the warnings too. Google is a great help for this.
You need to be aware that there will be places where the groundplane can't reach because it is blocked by tracks from all sides. In that case you'll have to connect those grounds together with a track and make sure the track reaches a ground pad that is covered by the groundplane. An indicator that such a problem occured is when you get an error without explanation. 

ADDING TEXT.
You will see that the Silkscreen text next to the components (the one in yellow) only shows the designators. It's handy to put the values in too. You could double click on the designators and change them to values but then you'll get a lot of double designator warnings and should you make any changes to the board after that, all your text will flip back to designators and you can start all over again. No, it's better to click on the F.Silkscreen layer and use the TEXT tool to put the values next to the components. Make sure your text doesn't touch any of the solderpads or the yellow lines around the components. That will give problems in production with the soldermask overlapping the silkscreen or text overlapping silkscreen.


You can see what your finished board will look like by clicking on the 3D viewer or clicking 'ALT + 3'. This will even work if you haven't drawn the outline of the board yet.


ADDING LOGOs OR IMAGES TO YOUR PCB.
To add an image to your PCB first measure the space on the PCB where the image will sit in mm. 
Now click in the main start menu on the Image Converter.
Click on 'Load Source Image' at the top right.
Load your image and set the output size to the size you measured.
Choose Footprint Layer F.Silkscreen
Click 'export to clipboard'
Now go back to the PCB editor and click <CTRL + V>. The image appears and you can drag it in place.
You'll see a G*** watermark over your image. Just click on it and delete it.
To place an image on the backside of the PCB just press 'F' on your keyboard.

And that's how that works. 

MAKING THE GERBER FILES.
Now all you need to do is make the files necessary for production of the PCB's.
First do a final check and make sure your design is faultless. A few warnings will probably remain in the beginning but they are not crucial but 'errors' must be seen to and repaired.
A common problem will be that you need to move a component a little. To do that you must first go to Edit and choose 'Unfill All Zones'. Then you need to click on all the tracks connected to that component and delete them. Then move the component to its new place and reconnect the tracks. Then refill the zones by clicking 'Refil Zones' and then checking the Run DMC eurrh run the DRC.

Okay, now we want them files, hand them over!
Click on 'FILE > Fabrication Outputs' and choose Gerbers.


You can leave all the settings at their defaults, at least if you order your PCB's at JLCPCB which I recommend. Make sure 'Subtrackt soldermask from silkscreen' is checked on. 


Now at the top, fill in the destination folder for your files. Click on the folder symbol and go into your project folder and make a folder with the name of the project followed by 'gerbers', or something like that. You can give it any name you want.
Now click on 'Plot' at the bottom and your folder will be filled up with Gerber files. But we also need to make the drill files so click in that same field on 'Generate Drill Files...'. A new pop-up will appear:


Leave everything as it is in the picture above and click on 'Generate'. Then click 'close'.

You will know when you checked something on that you shouldn't have, because JLCPCB won't accept it. You'll get an 'Parameter Exception' error message when uploading the Gerbers to their website.

Your production folder will now contain 14 files.


Select all these files with CTRL + A and the right-click and put them all in a ZIP file.

ORDERING YOUR PCB's
After you finished your first projects you will be tempted to order the PCB's rightaway. Don't do that just yet. Sleep over it until the next day and then before you order, check your schematic for errors. Believe me I speak from experience. I thought I had been so thorough in checking but when I started out I spent more than €200 on PCB's that could go straight in the bin because they contained hidden errors.
You need a clear head for this and the mistakes will jump out at you. This saves you money and disappointment. If you have discovered errors you need to fix them in the schematic first. Then save the schematic and go to the PCB editor and import the changes from the schematic. Now you must also make the changes in the PCB design en run the DCR checker.
Naturally, if you corrected errors you must make new Gerber files before ordering your PCB's. Delete all the faulty Gerbers before you make new ones to prevent mistakes,

When everything is fine you can go to the JLCPCB website and drag that Gerber ZIP file into the box 'Add Gerber File' and you will instantly see you design appear on their website with how much it'll cost you (usually € 2,- for 5 PCB's). 5 PCB's is the minimum you must order. You can choose between a few colours like purple, yellow, red, blue and green. An other colour does cost a little extra though and it takes 2 more days to produce,
If you choose green boards and use the most cost effective shipping (€1,50) your boards will cost about €0,85 a piece for a minimum of 5 provided they are smaller than 10 x 10 CM. The cheapest shipping option is 'Global Standard Direct Line' which takes 12 to 16 businessdays.


An there you have it. Now you can make PCB's. I found the proces quite addictive and for the last week I've been doing nothing but sit behind my two PC's making PCB's :)  (The schematic on one PC screen and KiCad on the other.) Dispite it being beautiful spring weather outside. I love it! I've already ordered two filter designs and the last one, the TB303 had zero errors and zero warnings and I've only been doing this for a week!!

Make at least 4 test projects before you start thinking of ordering PCB's. I've invested a full week in learning. I spent at least 10 hours a day on this because when I set my teeth into a new project I simply can't stop until I understand it. You'll need to be determined to learn this and then you will see quite soon that it is really not that difficult.

If you have any questions about this proces I'd prefer you this time to post them in the Facebook group first. You'll get answers sooner because a lot of the group use KiCad.

SOME COMMON WARNINGS AND THEIR SOLUTIONS:
Here I will list warnings, and errors and their solutions. I'll add to the list as I come across more.
I've had many different problems to solve already but I forgot to write them all down but here's one I came across last time I used KiCad.

FIRST TRY THIS.
With most errors, it's just a matter of updating from the schematic, so in the PCB editor click 'update changes from schematic' even if you haven't made any changes. Now open the DRC checker and click detele all markers and run the checker again. Errors and warnings that show up now will have a valid reason for why they are there.

INPUT POWER PIN NOT DRIVEN BY ANY OUTPUT POWER PINS:
The input of a component that needs a connection to the powerrails seems not to be connected to any power rails. 
If you are sure your schematic is solid and faultless, you can simply ignore this warning.

"TRACK HAS UNCONNECTED END" warning. This is a warning not an error meaning that if you order your PCB with this issue unresolved, you'll probably still be okay.
This warning comes up when there are little bits of track underneath an other track, maybe from moving a component and reattaching the tracks. Anyway, to solve this, go to TOOLS > 'Clean up tracks and vias'. If that doesn't work, pull the component out of the board and check underneath for bits of track. Delete them and the track that attached to the component so everything is clean and then put the component back in and reattach the tracks.
Now check the Run DMC thing again and your problems will probably be gone. If not, go to that track, delete it and draw it in again.

NO ERROR WARNING BUT THERE'S STILL A RED CIRCLE when I do the DRC.
If, like me, you connect all the grounds together by using groundplanes (fill zones) for the front and back layers then you can get this error. There's no error message but after the test the error circle stays red with a number or errors listed. This usually means that there are connections to ground that can't be made because the fill zone can't reach that component. The component is shielded by tracks. In this case you have to unfill the board and connect those grounds together with tracks. 
It can also be an other track. When you see the red circle with a number inside and no warning text this means there a track you've forgotten to connect. Go over the board and look for unconnected components.

MISSING FOOTPRINT and EXTRA FOOTPRINT for the same component(s).
I'm not sure what causes this but it happened to me and I went back into the schematic, right clicked on the component the warning applied to and, opened 'Properties' and just clicked on the same footprint I had already chosen for it. Then I updated the PCB from Schematic and the problem was gone.

TIP: If you want to delete all tracks and start again you can do so by going to  EDIT > Global Deletions. There you can check what you want to delete and then it will be deleted for the whole PCB.

HAVE YOU EVER WONDERED HOW THOSE PCBs ARE MADE IN CHINA??
Watch this:



And that's it for this tutorial. I hope it was helpful for you.




Saturday, 12 October 2024

Synthesizer Extra's No.5: PROFESSIONAL LOOKING PANELS using WATERSLIDE PAPER.

 An easy way to make your panels look really professional.

I've been doing this hobby for over 4 years now and all that time I always used black powdercoated aluminium to make my panels from and I always use a white acryllic pen to write all the labeling etc. 
It works fine but it doesn't look very professional.

For a long time I've seen people using waterslide decals to apply to their panels and it looks very slick. I wanted to try that myself so I ordered some "Water-based ink jet water transfer paper". That's what is says on the label. You can order this from AliExpress or your preferred webshop. If you Google it you'll find lots of sellers.
Make sure, if you use an inkjet printer like I do, to order transfer paper suitable for inkjet printers. It must say inkjet on the package and it must be transparent. If you use a laser printer then there's special transfer paper for that too.
There is also white transfer paper available and i just took delivery of that too. I want to experiment with black backgrounds.
IF THIS IS YOUR FIRST TIME WORKING WITH WATERSLIDE PAPER, MAKE SOME TEST PIECES AND TRY TO APPLY THAT TO A SURFACE FIRST!

First step: Design your panel layout.
I do all my designs in Photoshop. I like working with Photoshop because you can work with layers and the centimeter markings on the side are very accurate to how it will roll out of the printer.
There are also special layout design programs on the internet, like 'Schaeffer AG Front Panel Designer' which you can download for free.  There is also a free program called Inkscape which should work very well too. You can download that by clicking here
I got the following link from a comment on the Facebook group. Also a faceplate designer: --- CLICK HERE ---
I have not worked with these yet although I intend to try them out soon.
You can find decal designs on the internet or make your own. Make sure you draw in dots for the places where you need to drill holes in the panel so you know where to drill them.
One tip I can give you is to make your panel design just a little bit smaller than the actual panel. Just a millimeter on the sides and have it start and end inbetween the holes in the panel where you screw it into the synthesizer case. That way the lacquer you apply later will seal those edges and prevent them from coming loose, which can happen if they are exactly on the edge of the panel. 
Here's a picture to illustrate that point. You'll see in the light reflection on the top how the lacquer forms a protective layer over the edge which runs just under the mounting hole:


Btw, that panel had a typo in it, the plus signs should have been multiply signs but I still used it because it came out so well. This was the second panel I ever made using this method and it went perfectly.

Here is my first design for the Digisound-80 VCO, made in Photoshop and printed on A4 paper. (feel free to use it if you want):


I drew in the Octaves and Freq Fine control markings after measuring on the VCO where they should go so they actually indicate where the different octaves are and on the fine control where the notes are within the octave. However I used a 2M7 resistor for the fine control, not a 3M3 as recommended so my fine control covers a little more than the normal half octave. Note the dots that indicate where to drill the holes for the potmeters and sockets.

Step two: Prepare your waterslide paper.
Now print your design onto the waterslide paper. Make sure you print out as many of your designs as you can fit on one sheet of paper. Copy and paste them next to eachother. You can only use an A4 size paper once so if you make a mistake you will have a few others as back-ups. It's a shame to have to throw away 2/3rds of your waterslide paper unused.

Here's how I printed the design of the envelope follower panel. Four on one A-4 piece of waterslide paper:


Now cut the design out with scissors. I use one of those paper cutters with a rotating knife on a rails that you can put the paper under. It guarantees a straight cut. Round off the edges a little with scissors. Make sure you cut it a bit smaller than the panel size so that the waterslide paper doesn't sit right at the edge of your panel. It will come loose over time if that happens.
Now apply a few thin coats of clear acryllic lacquer onto the paper. You can of course also do this first before you cut it out. Make sure there's no dust or hairs on the paper and let it dry a few hours and apply a second coat. These coats not only protect the ink they also make the paper stronger when applying it to the panel. 
If you use a laserprinter that uses toner then you don't have to apply the lacquer. However inkjet prints are not waterproof so they must be protected with lacquer. Make sure it is well dried before moving on.

Step three: Prepare the panel.
Take the design you made and print it out again but this time on a normal piece of paper. We are going to use this as a drill guide, to drill the holes in the right place. 
Take your panel material, in my case white powdercoated aluminium, and apply the printed design to the protection layer of the panel with doublesided tape. You can use other methodes but I find this the easiest to do. Usually the panel material will have a protection layer against scratching, if it doesn't have that just put some paper tape on it first. The kind you use to tape off edges when you paint a door for instance. Stick your design to the panel and make sure it can't move.
Now use a very thin drill to make the first pilot holes. I used a 3,3mm drill the first time but that was too big and I couldn't place the drill accurately enough which caused me some problems when I put in the potmeters. 1,5mm will be better. So make sure you drill very accurately. Then drill the holes to the right size and take off the paper/protection layer. Make sure you de-burr the holes you just drilled. There must be no upstanding edges around the holes because that will cause air pockets under the waterslide paper or it will tear the design when you apply it to the panel.

Step four: Apply the waterslide paper to the panel.
Now take a nice big bowl and fill it 2/3rds with slightly luke warm water. Put one drop of washing up liquid in in the bowl and then add the water. This decreases the water surface tension. If the water has gone all bubbly, just scoop out most of the bubbles with your hand. 
Put the waterslide paper into the bowl. It will immediately curl up. Carefully roll it out with your fingers under water and make sure it is completely in contact with the water. The paper will straighten out. Keep it under water for about 30 to 35 seconds and then take it out.
MAKE SURE the image doesn't come off while it is still in the water!! Or all the glue will wash off. That's why I say 30 to 35 seconds in the water is about right.
Put a little water on the panel with your fingers to wetten it a little. Make sure the panel has been de-greased and free of fingerprints. (A little alcohol does wonders in cleaning the surface beforehand).

Now take out the waterslide paper and place it over the panel. Grip it carefully with your fingers on the top side of the panel and then rub the bottom side between your fingers in such a way that the bottom layer slides out from under the image layer. Your thumb stays in place while your fingers slide the backpaper downwards. Slide the back layer down from under the image layer. It is important that you don't move the waterslide paper too much once it is applied to the panel because this will impact on the stickiness of the paper. The slippery stuff underneath the image layer is actually the glue so you need to make sure this is not washed away by too much movement.
There are special 'decal setting solutions' available for purchase, that will cure the layer and make for a good bonding between panel and image layer. I don't own any of that myself but I might try this later, however you don't really need it. 
Now carefully squeeze out the water underneath the waterslide image by using the backpaper as a squeegee. Carefully move it over the image layer and squeeze out any water underneath. (Use the slippery side.) Be careful not to crease or tear it! This takes a bit of practise but it doesn't have to be perfect. The image layer may still look a bit rippled but that will disappear when it dries up. Make sure there are no folds though. When the water has been squeezed from under the paper, you can use a fine cloth to dry the surface of most of the water. Be very careful though. If you don't trust yourself, leave the water on top. It will evaporate anyway. I put it on the central heating in my room and it was dry within an hour. 

Here's how it looks freshly applied after I went over it with the backpaper to squeeze out most of the water. It's still very wet and a bit wrinkly but that doesn't matter:


After an hour on the central heating the layer has pulled itself tight on the surface and it's completely dry:


(This is from project 62 and it's my most perfect panel to date. No crease in sight.)

Step five: The final touches.
When the panel is dry, cut out the parts that are covering the holes you drilled with a very sharp knife. Take your time with this, don't rush it. You can ruin it otherwise. Use a very sharp knife to clear the holes and make a scissor action (cut) against the metal of the panel holes, so you don't pull on the image layer. Pull out the bits you cut out, from the underside of the panel with tweasers so you can't rip off the decals by accident. When that's done I always take a cigarette lighter and move the flame quickly under the holes, from the underside, to burn off any small bits that didn't come off. Don't overdo it though. Be careful.


After that you must coat it again with a few thick layers of clear lacquer and leave it to dry for a day. When that is dry you can put in all the knobs, switches and sockets. Be liberal with the application of clear lacquer. For my last two panels I put on one really thick layer. Because it stays flat all the time you don't have to worry about the lacquer running. The thicker the layer the better when putting in the components because it will prevent the waterslide decals from tearing when you screw things down.

When you put in anything that needs screwing down, and that's everything, make sure there are rings underneath so the screwing action doesn't cut into the waterslide material. This is a bit problematic with sockets because they don't come with rings, so be careful when you tighten them. (The thick layers of lacquer really helps prevent this) You can hold the screw and turn the socket or potmeter from behind the panel, do what you think works the best for you. Most of the time you will damage the layer slightly by putting in the potmeters, that can't always be helped but if you put enough lacquer over it the damage will be minimal and covered by the knobs you put on the potmeters.

And that's all there is to it. Anyone with a computer and a printer can do this. I do advise to make a practise piece first and use it to hone in your skills. I went directly to making a panel and although it looks okay there are some creases here and there that are visible when the light hits it, but here is my first result:


VIDEO TUTORIALS:
I found a few video tutorials on YouTube that show the proces from beginning to end. These are all about guitar pedals but it works the same as with synthesizer panels. 
I urge you to watch these before you start, so you have a good idea of what's involved.




Okay that's it for this one. I hope this is of use to you. If you have any questions or remarks please put them in the comments below. They won't appear directly, comments are moderated, but everyone of them is answered by me. You can also post your questions in the Facebook Group for this website.


Tuesday, 23 June 2020

Synthesizer Build part-34: TRIPLE WAVEFOLDER.

A wavefolder with three folding stages which produces amazing sounds and it's very easy to build too!

I came across this project on YouTube when I watched a video by YouTuber Adamski A. called "DIY analog synth project part 18 - The Wavefolder".

So I set about building it and it came out very well so I asked Adam for permission to write an article for my website, based on his project, to which he very enthusiastically replied in the affirmative so here it is; The Triple Wavefolder.
Like I said, it's a very simple design and in my experience those work the best. This wavefolder produces sounds that I would describe as sharp or hard and accurate. In some settings it almost resembles a Harpsichord or an electric piano. They can be real speaker rippers too. If you watch Adam's video (see link above) you can listen to the wavefolder in action. The latter part of the video is full of sound samples in different settings. I also made a little demo video myself which is at the bottom of this article. The sound is very different from that of the filters we've become so used to, with their resonance and cut-off frequency. It sometimes almost sounds like an FM synthesizer. That's why this is a very useful addition to any modular set-up because diversity in sound is what we all want don't we?
Now, I built the Yusynth Wavefolder after first building this because I thought that this triple wavefolder was more of an experimental thing and the Yusynth one would be the official implementation to go into my synthesizer. But the Yusynth one only has a single folding stage and eventhough that sounds amazing too, I found that this one actually sounded even better. So I made a panel for it and mounted it in my synthesizer. The voltage it runs on has an influence on the number of folds you can get so changing the value of the 22K resistors going to the emitters of the transistors influences the behaviour of this circuit.

This wavefolder works best with Triangle or Sawtooth waves or even Sinewaves but Squarewaves pass through almost unchanged. That's convenient because squarewaves are best used for conventional filters because of their harmonic content.

Adding CV control to the parameters:
This wavefolder has in it's original form only three controls; the input level or 'Amount', the Dry/Wet control and a Saturation control. As an experiment I added voltage control to two of those, the Amount and Saturation by means of two self-made Vactrols connected between pins 2 and 3 of the respective potmeters.
These vactrols are made up of a bright white LED, a Light Dependent Resistor (LDR) and a 2K2 current limiting resistor connected together with some heat-shrink tubing that seals it off from any light from the outside.
These Vactrols both have their own level potmeter too so you can dial in the effect it has very accurately. I've had questions about what LDR's you should order for these and I really can't tell you. I had mine in stock for ages. A while back I ordered a batch of 5 x 10 LDR's from China. 5 different values with 10 of each value. They all have a dark-resistance of at least 100 Mega Ohm and a full light resistance around 1 Kilo Ohm or lower. That's all I can say. You can also buy Vactrols ready made like the VTL5C3 which should work fine here.
Even better than a Vactrol, at least for the Amount parameter, is to use a VCA on the Wavefolder input, That way you can control the level and thus the Amount by sending a Control Voltage into the VCA. This works much better and it's what Adam also demonstrates in his video. (See the 'Metalizer' project elsewhere on this website. That is in principle a quadruple wavefolder with a VCA on the input.)
In the video demonstration the vactrols didn't have that much effect but I had forgotten that the potmeters for Amount and Saturation need to be set a good way counterclockwise for the Vactrols to take full effect. And in that sense you could in principle do away with the CV Level potmeters because the Amount and Saturation potmeters have that function too for Control Voltages. But you must not forget that this module was built first and foremost as an experiment that I didn't think I would publish. 
Anyway, you could decided to leave the CV inputs out alltogether, it's up to you.

THE GAIN CONTROL:
The other thing I addressed was the fact that the Amount control is also the Amplitude or Volume control so turning it up increases the volume and turning it down decreases it. For that reason I added a Gain potmeter to the output opamp which increases the volume by a factor of 2 to 22 times!! This option is a game changer for this wavefolder especially with this much Gain! This gives you the possibility to really boost the sound output and it sounds awesome I can tell you. You can really boost the lower and mid ranges of the Amount potmeter to match the high output level when Amount is fully open. I even found that opening up the gain helps to level out the output amplitude across most of the Amount potmeter throw without really clipping the output. But even if it does clip, it adds a very musical sort of distortion to the sound. It's never unpleasant to listen to.

Here's the schematic drawing of the Triple Wavefolder by Adamski A. I have re-drawn it and added the Vactrols to it. I mention on the schematic that you can also use BC transistors instead of the 2N transistors I used, but that will influence the sound or the number of folds you get because BC transistors have a greater multiplication factor. You can of course experiment with that by setting up the circuit on a breadboard first. (Btw, the BC548 and BC558 can also be BC547 and BC557 types.) The CV-Level control potmeters are not included in the schematic. This is because I added the CV control as a bit of an after-thought to see how it would work out. Like I mentioned before you don't have to include the Vactrols and CV level controls. I leave that up to you.

(Last revised: 11-July-2020: Changed GAIN potmeter from 20K to 100K.)

Here's the stripboard layout. It's verified because I used this for my own build. All potmeters are viewed from the front side with shaft facing you!
(Wiring diagram):

(Last revised: 11-July-2020: Changed GAIN potmeter from 20K to 100K.)

Print only. Note that pins 5 and 10 of the TL084 are connected underneath the chip!!:



Bill of Materials.


15V vs 12V and de-coupling:
As you can see a very simple and easy to build project and it sounds amazing so I can really recommend trying this one out. The circuit is meant to work on a dual 15V powersupply but I tested it on 12V and it works just fine but changing the voltage does influence the number of folds you get so it sounds a bit different but it still works fine, trust me =)
I did not include any de-coupling capacitors in the schematic because I didn't use any but if you need to have those included just put a 100nF from plus to ground and a 100nF from ground to minus and place them as near to the TL chip as possible. Should you have problems with hum, you can also add a few electrolithic caps (22µF or 33µF) on the plus and minus rails like the other caps and you can also try putting Ferrite Beads in series with the plus and minus power supply input, or if you don't have them, a few 10 Ohm resistors. There's plenty of room on the stripboard for that. But you only need to do that if you're having problems with hum or noise in the audio output.

Here's a picture of the finished panel:


Here's a look at the stripboard: I see from these pictures I added an extra opamp to the output but because I actually built this module a while ago I can't remember why I did that. Probably to have more room to experiment with the output and add the Gain potmeter. Anyway, it works the same so you don't have to include that.




And, to close off this article, I made a video demonstrating the different settings and the sounds they produce. As you can read in the article, I recently changed the GAIN potmeter from a 20K into a 100K one giving a total gain of up to 22 times. This gives the option of boosting the middle range of the Wavefolder which sounds really awesome!!


Here's a video that's also posted in the "Sample and Hold" article. It's a triangle wave going through the Triple Wavefolder and then through the Steiner-Parker filter, fed by random notes from the Sample and Hold connected to the CV-2 input of the VCO.


Okay that's an other project done. I hope you enjoyed it. Check out Adamski A. 's youtube channel. It is full of awesome synthesizer projects and electronics tutorials. It's an enormous source of inspiration for anyone interested in building synthesizers.
As always, any questions or remarks, please put them in the comments below or post them on the new EB Projects Facebook Group.


Sunday, 2 August 2015

DATA MOSHING TUTORIAL for PC using AviDemux.

Hello everyone,

I have researched many DataMoshing tutorials online and many of them are quite old and not very easy to follow. I have put everything I learned from those tutorials into this tutorial so I think this is one of the best, most comprehensive DataMoshing tutorials you will find online. Toolfarm, the company that sells plugins for VFX software like After Effects, even published an article about DataMoshing which was inspired by THIS tutorial!
But now it's time to make your own awesome DataMoshing video, and don't forget to check out the extra tips below the tutorial to give your video that extra edge!!

So here goes:

First we need to download an older version of AviDemux. Version 2.5.6 to be precise. You can find that version here: http://www.videohelp.com/software/AviDemux/old-versions
You will need to scroll down almost to the bottom of the list to find it. (The date of publishing is 2012-01-01 or 2011-12-30.) Choose the 64 bit or 32 bit version according to the system your computer uses. 64 bit is preferable.

Okay, now you need to make a video, using your preferred editing software (I use Premiere Pro CC), with at least one cut in it so it goes from one scene to an other. Videos with slow moving objects or people work best for Data Moshing. Fast movement in your video means the effect won't last very long. See my test video on YouTube to see what I mean. Sorry it's in black and white. Colour would have been better but when I made the video I hadn't planned on making a tutorial yet.
You can watch the video here:


Save your video as an "AVI" file. This is important otherwise AviDemux can't handle your video properly.

Open 'AviDemux 2.5.6'  Go to 'FILE' and load in the video you want to use.

Go to the 'VIDEO' tab on the left and choose 'MPEG 4 ASP (Xvid)'

Now go to the 'CONFIGURATION' tab and fill in the following settings:

- GENERAL:  here you can set the quality of your video. A lower number means higher quality, however these settings have little to no effect on the DataMoshing effect so you can leave that at the default setting if you wish. Should your finished video have a low quality (some of the presets I offer have a high Quantise number) then you should set Quantisation to 1 and try again.




- MOTION: Turn the 'Rate Distortion Optimisation' off (uncheck the box).
Motion Estimation can stay on 'High'.
Uncheck the box for 'Chroma Motion Estimation' and turn on 'Quarter Pixel Motion Estimation'.



- FRAME:  Turn on (check box) 'Four Motion Vectors per Macroblock.'
Set the 'Maximum I-Frame Interval' to a number of frames that exceeds the number of frames in your video. 90000 will usually be enough.
Set the 'Maximum Consecutive B-Frames' to 0 (zero).



- QUANTISER:  Turn 'Trellis Quantisation' off (uncheck the box).
Set the 'Quantisation Matrix' to 'MPEG Matrix'.



Now save your video. Go to 'FILE' -> 'SAVE' and save it with '.avi' behind the name!! (Important)

Now load the file you just saved back into AviDemux. Now we're going to cut out the I-Frames.

1. Use the blue button with the 2 arrows in it, pointing to the right, to move to the next I-frame in your video.
2. To select this I-frame press 'A'. (see picture below)
3. Now go forward one frame by pressing the blue button with the single arrow pointing to the right.
4. Now press 'B'.  Now this I-frame is selected.
5. Press Delete on your keyboard to cut the I-frame out.

Repeat this process until the blue button with the double arrows to the right doesn't take you to any other frame but the first one of the video (in other words, until pressing that button has no more effect). This means there are no I-frames left to jump to.

(Sometimes it can occur that there is no I-frame at the beginning of your next cut in the video but if you save it, the Datamosh effect doesn't occur. In this case you need to manually go to the first frame of the next clip, by pressing the blue button with the single arrow to the right repeatedly until you come to the first frame of the next clip and then select the first frame using the 'A' 'B' method described above and delete it. Even-though this wasn't an I-frame it still can cause the Datamosh effect to not work so every first frame of a new scene needs to be cut out using the method above. )

Here's a picture of the procedure:



Now to save our video:
Under 'VIDEO' choose 'copy'. Go to 'FILE' -> 'SAVE'. Fill in a name and make sure you put '.avi' at the end of it. If it asks you to use Smart Copy, select NO.
And that's it. Play the video back in any video player and the Data Moshing effect should be there, even if you import it into your preferred editing software.

The UI look as you save your video:


SMEARING EFFECT.

An other technique used a lot with the DataMoshing effect is the so called 'Smearing' effect. This is where the picture stands still and the pixels get smeared out. You can see that in the music-video, Evident Utensil by Chairlift. Right at the beginning of that video, in the opening shot, you can see the effect I mean.
This is simply done by copying and pasting a bunch of the same frames after eachother.
First you load in the video you made in the first part of the tutorial, the one with only one I frame at the start of each cut in the video. Then, when you are cutting out the I-frames and you come to the part where you want the smearing effect to take place, you select that frame using the A-B method described above. Now you hit CTRL+C to copy the frame and then you simply hit CTRL+V a number of times to paste the frame in. Paste in at least 24 copies of the frame for one second of smearing effect (depending on the frame-rate of your video of course). When you are done pasting them in continue cutting out the I-frames.
Now simply save the video as mentioned above.
That's all there is to it. The smearing effect will go in the direction of the general movement in that clip. So if for instance the video shows a head that moves upward and in the middle of that movement you pasted in the duplicate frames, then the pixels will smear out the image in an upward movement.
It looks really cool, have fun experimenting with this.

EXTRA TIPS!

Tip 1:
Something that works very well with the Datamoshing effect is having a picture be torn apart by an ink-flow video. Make a little AVI video (with the method described above) which starts with a still picture and is followed by a video of an inkflow (or a shock-wave), like those you get in the RiotGear FX or Action Essentials by VideoCoPilot. Make sure the inkflow is already in full view at the start and not completely black at frame 1.
Watch this little experimental video to see the effect.



Tip 2:
If you want a really glitchy and heavy Datamoshing effect then try also deleting the very first frame of the video. In the tutorial above we leave the first frame intact. If you don't do this then your video will be seen by some players as 'broken' and they won't play it back. Your video will also have no thumbnail with some players (VLC for instance) BUT VLC player will play it back without problems and the datamoshing effect is really heavy if you delete the very first frame too. Try it out and see what happens.

SIDE-NOTE FOR PREMIERE PRO CC (and up).

When preparing a video for the Datamosh treatment in Premiere Pro I have encountered problems when exporting the video (from CC2015) as an AVI file. I couldn't get the 'square pixel' format with the AVI codec. To counteract that I save it as an MP4 file and then open it in After Effects and there I render it out in the AVI format. In the render queue I choose AVI and in Format Options I choose the TechSmith Screen Capture Codec. This codec won't be available to you unless you have Camtasia Screencapture software installed on your computer. However, you can download it for free from their website. Here is the link for the download of just the codec alone: https://www.techsmith.com/codecs.html
(All you need to do is only install the codec, not the rest of the software. Premiere will automatically see it and add it to the AVI codecs.)
In the Codec Settings I set the Compression Control all the way left to Faster Compression to get as small a filesize as possible. AviDemux can crash if you use videos with a very high bitrate.
Now if you don't have this TechSmith codec or don't want to install it from the link above, I suggest you experiment with the different options to find one that allows you to render with high compression and low filesizes, or use a different video editor for the purpose of Datamoshing. If you found a good solution for this problem I'd be interested to hear it from you. Please comment below and tell me how you solved this problem so I can share it in this tutorial.


Okay, this concludes this DataMosh tutorial. If you have any comments or discovered an error in the above text or if you have any questions, feel free to comment either here or on the YouTube video posted in this tutorial.

I have a few AviDemux PRESETS for you to download (for free)  which you can install into your AviDemux software and that will give you the best settings for a few different scenarios. Like best pixel carry-over for slow videos of for fast video movement etc.
You can download those here:
http://www.mediafire.com/download/p4t1h40czeptp04/DataMosh+Presets+Avidemux+2.5.6.zip

You'll need to place these presets in a folder that is normally invisible in Windows:
C: > (your username) > AppData > Roaming > avidemux > xvid
Place the presets in the 'xvid' folder and they should be available under the 'CONFIGURE' tab. Press the 'Configure: Default' option and they'll pop up.  If there is no 'xvid' folder at the above mentioned address then make one and put the presets inside it. That folder is only generated when people make their own presets so if you haven't done that before there won't be an 'xvid' folder.

There is now a Datamosh Plugin available for Adobe After Effects. It costs $39,99 and is available here:  https://aescripts.com/datamosh/

The Datamoshing article on the Toolfarm website is no longer available and it now has a tutorial on it for the Datamoshing plugin for After Effects. Check it out here: http://www.toolfarm.com/blog/entry/datamosh

I found this video tutorial on Datamoshing by NebulousNova on YouTube which was inspired by my DataMoshing article.

OKAY, THAT'S IT!!  ENJOY!! And please, if you want, share the videos you made with this tutorial with me. I would love to see them! Just leave a link in the comments below. Thank you!! ^____^

Some inspiration, LOL  :)

Click here for Datamoshing music video.