I did get a message from pcbway asking hey: do you want to create a pcb? And since this was on my tour list for maybe 20 years or so my immediate answer was, of course, yes, one big, yes, but since i dont have an experience with creating pcbs, it would have to be something really really simple in order to succeed and when I think about something simple: i usually think about blinking an led and thats the default sketch for arduino board. It brings the onboard led on arduino uno. This is connected to pin number 13, so you can as well take an irregular led and connect it between the pin, 13 and ground, and it will blink as well. However, i dont want the onboard led to blink, so i will change the sketch to use a different pin, but first lets connect a resistor to pin number two. Then the led and lets connect everything to ground inside the sketch. We just need to change the led, build into pin number two and it should be all thats required to get our led blinking, but blinking. Just one led is kind of boring right lets, just add more of those, and we will use the same approach of having the resistor in between the digital pin and the breadboard and then the led in between the resistor and the ground. I use digital pins 2 through 11, which results in having 10 individual leds. As for the code change, we can use a brute force method of copying everything 10 times and using a different pin number that will work but its not very elegant or we can define an array with the pin numbers and then use the loop function.

The visual effect will be the same, but, as you can see, we only use few lines of code now its still missing something, though – and it is fulfilling my love for big knobs, as you can see, i have quite a lot of them, so i would like To incorporate a potentiometer in my design for that, i will use a standard 10k potentiometer that i will put anywhere in the breadboard and connect the side pins to 5 volt and ground. The middle pin will go to any analog input on the arduino. In my case, im using pin a0 as for a code change, ive created a new variable, called port value, potentiometer value and set the pin mode for a 0 to be input. So we can read it inside loop function and then im just comparing the value and lighting up the corresponding leds. So now i can turn potentiometer and control how many of those leds i want to shine, and i want to control also something else. Maybe a volume on my pc and that will be quite hard with arduino uno, but it will be very easy with different arduino board and it is arduino leonardo. It acts as the usb device like your mouse or keyboard, and you can potentially do some harmful stuff. But they will stay safe today and only control the volume lets do a little bit of magic and switch those boards. We also need to set the same board inside the sketch, but the code shouldnt change.

We need a special library to control the volume so ill. Go to tools manage libraries in here type in hit project and make sure to install this library. I already have this installed, then you can open the sample file so go to file examples, hit project and select consumer in here. There are three important things we have to include the library we have to open the connection by calling consumer begin, and then we can write some data. For example, media player power switch, as you might guess, pause the currently played media, but we are more interested in setting the volume and for it they can open the documentation and find the corresponding commands, which are media volume up and media volume down. The volume only goes between 0 and 50 with the increments of 2, so we have to tweak the code slightly. Then we will include the library and open the connection in the setup function and create a new variable called old volume which will store the previous value. So we dont set the volume all the time, but only if it changes and create a simple if statement that will compare the potentiometer value with the old volume. If those two variables are different, we have to take some action, so if the potentiometer value is bigger than the old volume, we have to increase the volume by calling media volume up and, of course, update the old volume. If those two are different in a way that the potentiometer value is smaller than the old volume, we will decrease the volume upon uploading.

There might be some warnings, but you can ignore those, and this is the sketch running or the arduino leonardo. So by turning the knob, we are setting the volume accordingly its worth, noting that upon first running the sketch we dont really know whats the set volume on the system. So you have to turn the knob all the way up or down to synchronize it. But there are ways how to solve it in the code, for example, turn the volume down multiple times in the setup function, so we are really sure that we are starting from zero, but i think im fine for now so lets move to the actual pcb creation. I will use keycard mainly because its free and i will create a new project from template and i will select arduino uno. That will create me a shield from arduino uno lets. Double click, the schematic editor and move all the pins to the middle, get rid of those extra lines and start adding the components. Lets start with led and just not select the footprint here, because i cannot see the 3d view in here, so i will place it rotated with the r and then add the resistor type in r select, ok, rotate. It add a graph connection, for example, by copying the existing one on the right place and then just fire everything just like we did with the real arduino now its time to set the footprint. So right click select edit footprint and open the editor, and this one has the advantage that i can see the 3d view.

If i want to so ill, just open it put it on the side and try to find the right footprint. I already know the length and the diameter of my resistor because ive measured it, but the p stands for. I guess the size of the footprint and ive decided to go with the smallest one. I will set the footprint also for the led, and it should be pretty straightforward, because im using three millimeter led so its just a matter of selecting the right category and selecting the three millimeter led and im going with clear one. Just because thats, the one im using the first type of component is the potentiometer so ill. Add that one as well and connect these sides to ground and five volts. It doesnt matter that much which one is which but its important to connect the middle part to a0. As for the footprint for the potentiometer, ive decided to open the category for the truehole potentiometers and just list through all the items to see. If something is quite similar to what i have and after measuring it, this one seems to be the right one note that not all the footprints have the 3d model of the component lets annotate the schematics, and we can move to pcb creation for that lets. Select update pcb from schematics then select update pcb, and we can place the components anywhere on the shield. Now it might be a good time to talk about how i want my pcb to look like, so i have this board, which is also the shield, so its the same size as my board, and i want to use it together with this potentiometer.

So it will be sitting somewhere in the middle of the board and there will be leds around this. So as i turn them up, the leds will light up, but i also want to use the iron knob, which is much bigger. You can see it barely fits on the board, so i was thinking i will use the same layout so now the leds will be actually below the knob and there should be enough clearance to fit those in there and, if not, i can probably bend those leds. A little bit so that was the game plan. It turned out that if you are using a kick it for 2 days like i was it its quite hard to do something like that. So ive done the next logical thing and it would be exporting the svg file from kitkat and using a different application for the design phase, in my case, thats adobe illustrator. But you can use inkscape as well. So after importing the svg file into adobe illustrator, i did change the color slightly, so i can see it better and then i have separated elements into individual layers and individual logical groups, so its easier to work with those – and this is really just copy paste grouping And ungrouping standard stuff ive also created this blue crosshair that is aligned to the center of the board, and it will be origin around which i will rotate the elements later on. Speaking of rotation, ive, measured that the potentiometer that i have has the gap around 40 degrees, which leaves the rotation to 360 minus 40 degrees.

And since i have 10 leds to fill up the space, it will take up 32 degrees. Here it is nicely visualized. So i will rotate the resistor move it to the center of the board and then use the transformation effect to move it to the beginning of the position, using the right angle, of course, and then use a very same transformation effect to create 10 of different copies. I will do the same thing with leds and i dont really need to display the text next to resistor and leds since im, using only one type, so that will make it look a little bit cleaner, ive measured the sizes of my knobs, which are 40 and 35 millimeters and ive created those helper layers, so i can see those clearly and i move the resistors and leds in a way that the leds are outside the smaller knap, but at the same time inside or below the bigger nap once im happy with the result. I recall everything to be only black and white and then export this as a png image and the size really doesnt matter that much as long as i know, whats the original size of the document in either millimeters or inches once exported. I use the image converter tool from kicad to import that png file and look at the black and white picture output. Ive noticed that the board outline is gray so its not showing in there so ill increase the threshold a little bit to show the board outline as well set layer to user layer echo1, which is like a helper and make sure that the size is set properly.

In my case, thats, 80 by 60 millimeters and then just export this to clipboard in kiket. I will just press ctrl v and try to align this as closely to the original board as possible. Then reposition the potentiometer, the resistor and the led, and i can double click the component and open the footing properties and set the rotation angle, exactly how i want it to be for the first resistor and first led ive also decided to hide all the additional text. Elements for those components to match what ive, already designed in illustrator lets talk about how to pull the components around the circle. So the first thing is set the origins by selecting place, grid origin and then clicking anywhere to set the crit origin, then go to preferences and make sure that the grid origin is selected for display options, select the components which you want to rotate. In my case, its the register and the led and select special tools create an array in here put in all the details, so the center will be 0 0 angle, 32 and count 10., ignore the gs in the middle ive accidentally copied the image as well. I will switch back to illustrator and create a dick marks by drawing a line and applying the transformation effect for rotation, and i will create two versions of the bigtick marks just to find out how to do a different line. Bits look like, and the smallest stick marks in between the big ones, by changing the angle to be minus 3.

2 degrees, then add some text and maybe a logo and again export this as png image import into bitmap converter and this time export it as a front. Silk screen layer into clipboard place inside kitkat and put it on the right position. I will double click, the g symbol and make it invisible and at this point its worth checking the board in the 3d view, just to make sure that everything is laid out properly and it looks fine. So we can probably start adding traces and collecting components, but lets do one more sanity check and that will be printing this on a piece of paper and poking the holes in there and placing the actual components in those holes. You know just to make sure that everything will fit nicely, so i did start connecting the virus. Ive made it based on the proximity, so the last led goes to pin number two. The one before goes to pin number three and so on, but ive quickly noticed that there might be not enough space in in between those leds and those pins, and i was probably right. There is very little space to put all those wires in. So, in the same case, instead of me trying to solve this in kitkat, ive exported this into illustrator and just hand drawn those wires to make sure that they will fit and then, when i was sure that those will fit. I have switched back to kick and draw those wires and of course i have to change the schematics a little bit because now its not sequential anymore.

But that should be fine, because inside our arduino code we can as well change the order of the pins. And this is the final board, as you can see, ive moved the resistors to the back and i also put all the wires to the back side where the boards are actually no connections on the front side of the board and thats. Quite intentional, because i thought maybe the tick marks will be done on the copper layer which i havent done in this version, but i might still do it in the next version. What i have done is to put some additional graphics on the back side of the board to see how it will look like the combination of the copper layer, the mask and the silk screen. And then the next step is to export the caribbean files. Using the plot function from the file menu and make sure to generate the drill files as well then go to the pcb by website and upload. The gerber file wait a minute and really the only changes ive made to the settings was to change the solar mask. Color from green to black, but that doesnt change the price of the board place the order and just wait, but the weight really wasnt that long it took less than a week to get the package delivered. Funnily enough, the tracking information was reporting that the package will be delivered later than that, and i was very pleased to see that the finished pcb look exactly the way like i designed it in the kitkat.

So it was great. Everything looks nice and clean, and i really like the black color of the pcb. I think it will look great together with the knobs, so the next step is to solder everything together and see if it also works. So this is the solar board. The potentiometer and leds are the front side of the board, and the resistors are on the back side of the board, and i have two of those boards soldered right now. So for one board i will use a smaller app that will make the leds go outside with an app and for the other one. I will use a bigger knob. In that case, the leds will be hidden below the nap. The first board uses blue leds, which are probably too bright, or maybe my camera is just too sensitive to this wavelength. I dont already know, but i do like the appearance, especially together with the nap surprisingly, when its hidden below the big knob. You dont see much when youre working from front. You of course, can see it from the side. So i was thinking. Maybe there are ways how to blur those lights a little bit so ive asked my friend who has laser cutter to cut me those acrylic sheets in the same size as this arduino shield and ive, actually exported the dxf file right from kitkat. After that, ive used a spray paint to make those translucent, and i do like the way they turn out, but obviously dont see the tick marks on the pcb anymore, because everything is just blurred.

So in the end, i have one shield, with a translucent acrylic over the pcb and blue leds, with this big knob and an air shield with orange leds using 1k resistors. So the light is very dim and for this shield im using clear, alkaleric and smart knob, i would like to create more versions, but unfortunately, im out of components right now, so thats it thats. My first pcb ever. I hope you like it. If you have any comments or questions, please put those down in the comment section if youve already created your first pcb, i would love to see. Please put the link in the comment section as well. I will check it out for sure and thats it.

https://www.youtube.com/watch?v=6cqvTHCuDto