Screw Counting Machine

Since I started offering the parts to build an IndyMill I have been looking at various ways to optimize the process of preparing, packing, and branding. I think some of the things I am doing might be interesting for some of you as I am always trying to find the most DIY, easy and eco-friendly solutions. I will share more details about different methods and projects I created at Indystry.cc but in this project, I would like to focus on the most time-consuming problem – counting the screws.

To illustrate how big of a problem that was let me tell you more about the set of screws for IndyMill. There are 13 different types of screws and nuts, in total 255 screws. So far every single screw had to be manually counted. I took great care when packing the screws and usually double-counted everything to make sure that each set was perfect.

There are also bearings in the kit, only 10 of them so that’s easy to count. It takes about 8 hours to create 20 sets with all the components, considering I am not selling the parts at a huge volume it wasn’t a big problem but still there is plenty of room for improvement. The goal for this project was easy – building a machine that is able to easily, quickly, and accurately count screws.

While the goal was pretty well defined getting all 3 subgoals at once is not easy at all and most likely will take at least a few iterations. For that reason from the beginning, I decided to treat this project as a prototype that lets me verify the idea and its feasibility. To test the idea and build a prototype we usually don’t need a lot and for that reason, I used cheap components, 3D printed parts, and thin plywood.

Design

Design

Parts and files

You can find all the files required to build this project on my GitHub:

OpenScrewCounter
GitHub repository for open-source machine for precise and reliable screw counting. Designed with 3D printed and laser cut parts as well as Pi Pico based electronics.

And here is a list of parts I used for this project with links to some of them. Keep in mind that as I mentioned this is a prototype of a new machine I would like to build in the future. There are a lot of things that could be upgraded to make the machine more reliable and in general better.

NameAmountLink
Raspberry Pi Pico1https://amzn.to/3FnSxVT
DC motor1https://amzn.to/405kJVr
7 segment display1https://bit.ly/40bwYQB
Buttons3https://amzn.to/3yK9nul
6804 Bearing1https://amzn.to/40ppZDR
Some screwsa lothttps://amzn.to/3leCWBm

This is not a complete list of parts as there are a lot of small electronic components and also most likely you will have to adapt the project to your needs.

Manufacturing

There are some 3D-printed parts you have to print on your own. It really doesn’t matter that much whether you use PLA or PETG, any material will do. Personally, I used PLA for this project. There are also plywood parts that I cut with a CO2 laser. Those parts can be easily replaced with 3D printed parts in case you don’t have an access to a laser cutter. Another alternative is to machine them with a CNC machine.

For printing, I used my slightly modified Ender3 printer. When I think about it now, this printer is already 4 years old and the only thing I replaced is the motherboard (I wanted to have silent TMC drivers, the original was perfectly fine and there was no reason to replace it), build plate (I broke the original one and adhesion on this golden powder plate is better) and plenty of nozzles. Everything else is as it originally was on the ender.

As a laser, I used my Epilog Zing 16. It is a really cool, professional and unfortunately pricey laser cutter. This cutter is a prize I won during one of the contests organized by Instructables, you should check them out! A cheaper alternative that require some upgrades out of the box to turn it into a usable and capable laser is a K40 laser like this one.

All the files are in the GitHub repository linked above.

Assembly

Assembly is so straightforward that I am not going to explain it in detail there. You need some M3 and M5 screws, wood glue might be useful to join plywood parts. In my video you can see some clips from the assembly but keep in mind I assembled the machine at 5 different stages of the design there and the final one differs a bit.

Problems

Instead of listing the problems let’s focus on the solutions:

  • Bigger drum – this is the element that holds the screws. It’s not big enough to hold a lot of screws. For my use case, it’s just a bit slow but I could easily use it as it is. But because I always want my projects to be appealing to a large audience I know a bigger drum may be beneficial.
  • Better motor with an encoder – I used a very cheap motor, like a very very cheap motor, you can buy it for about a dollar. The next version should incorporate a more powerful motor capable of turning at slower and higher speeds depending on the need. Additionally, an encoder shall be used to allow for stall detection.
  • More accurate laser sensor – using an LED and a photoresist is a decent solution but not accurate enough. Implementing two of these sensors to really make sure that the screws are properly counted is also to be considered.
  • Bigger display with button/encoder – to control all the settings
  • External communication interface – SPI, I2C or CAN to integrate the machine with other machines. For example a rotary table with containers of screws to allow for continuous counting.

I am pretty sure there is a lot more to upgrade, if you have any ideas and want to share them, feel free to send me an email.

Electronics, breadboard, CNC machining a PCB

Starting with a breadboard prototype where modifying anything is really easy is always a good idea. So I started by connecting Pi Pico with 7 segment display to check if everything work as intended. The simple circuit assembled on the breadboard is presented in the image below.

And after that, I moved to KiCAD to design the schematic and PCB layout. My plan was to make the PCB on my own with a modified CNC machine that I made just for PCB machining. And the result of that process you can see on the image above as well as in the video. PCB files are available in the GitHub repository as well.

Programming

Pi Pico or RP2040 can be programmed in Python and since I tried using this microcontroller I completely fell in love with it. Python is definitely my favorite programming language and as I am studying data science now for my master’s degree I am using it quite often for university projects.

The fun part while programming was using ChatGPT to write a function for controlling the 7-segment display. It wasn’t perfect it wasn’t working straight from the chat but the errors were easy to spot and fix. So definitely using this cool AI technology saved me some time for this project.

Other than that firmware for the project is rather simple. You can upload it to the pico with Thonny a simple IDE.

Final thoughts

Honestly, unfortunately, it’s not yet “production ready” I am not going to use it to pack the screws as I can’t trust it. The counting process is not reliable enough. I can use it as a machine that assists me during counting but to be 100% sure I have to count it manually too. So what’s next? Second better, bigger and more expensive version. Not a prototype but a production-ready unit. Follow my YouTube channel and Instagram to be notified when the project is ready, you can also support my work on Patreon:

3D Printed duct fan

This is a 3D printed duct fan that can be used with a 775 motor or a popular BLDC (for example 2212). It can obviously also be adapted to any other motor. It’s an open-source project so below you can find STL files and .F3D files of a project so that you can easily modify and adapt it to your needs.

Consider supporting my work:

Become a Patron!

Files

Below you can download ZIP with all the STL and F3D files of the duct fan, fans, and air filter attachments that I designed. You can also find here the PDF with all of my measurements and plots. Feel free to print, modify and share with others.

Tests and measurments

In the beginning, there was just an idea for a simple duct fan but later I thought that I can optimize it and design a better fan. In order to do that I experimented a lot and measure the performance of each fan while noting everything in a spreadsheet. Later I made a lot of plots to show how each fun perform and you can see all of that here:

https://docs.google.com/spreadsheets/d/1bWz74lslCTUJS_hIYJnpoS_NEaYTMo8m/edit?usp=sharing&ouid=113317919185968062988&rtpof=true&sd=true

You can also find a PDF version of that in the ZIP above.

Here you have 6 most interesting plots where you can observe the difference between performance of each fan and how the measuring method influences the end result.

How to build a robot?

Robots are cool, I think we all agree on that. Right here I would like to give you a short introduction to all the topics that you will most likely face while building your first robot. In the beginning, I just wanted to say no worries, building simple robots is not hard at all, most of it doesn’t even require any soldering (sometimes you may need to solder cables to motors, but for simple robots that’s the only soldering required).

I also wanted to point out the difference between a robot and not a robot. Some tutorials refer to an RC car as a robot but in reality robot is a device that can work on it’s own. At the same time it’s not about fancy futuristic artificial intelligence or humanoid robots, it’s about simple tasks that are solved by the robot completely without human interaction. So a line follower or an obstacle avoiding robot are great examples of ROBOTS while a “robot” and a human with a remote next to it is not a robot.

Keep in mind that this is not a complete tutorial with code, schematic and DIY instruction. It’s meant as introduction to all the topics you should know about in order to even start and understand some of the robotics tutorials so that instead of mindlessly following those you understand what’s going on.

If you want to start easily with a kit, you can check out something like this with all the parts, chassis, motors, sensors, and Arduino. If you prefer to buy components individually check out the list below.

Here you can see a short one minute introduction video, and to learn more about all the topics continue reading:

Microcontroller

Microcontroller is a brain of the robot, all the logic, conditions and calculations are performed in here. To simplify it we can say that microcontroller is just a very very simplified computer, the internal structure is more or less similar. There is no screen or keyboard, just a chip with pins. By writing the program you can read pin states set conditions (if statements for example) do some math and set output pins conditions or communicate with other modules, sensors etc.

There are a lot of different types of microcontrollers but if you are just starting you should take a look at Arduino UNO (which is actually more than just a microcontroller, it uses Atmega328 as a microcontroller but Arduino is rather an ecosystem and collection of development boards). Any Arduino board is very easy to start with and Arduino UNO is additionally quite affordable (Original boards start at 23 USD or you can buy a Chinese Arduino clone for 5 USD). With UNO you can build blinking LEDs, learn electronics and programming, simple robots, home automation, measuring devices and even CNC machines! If you need more pins (trust me if you are just starting you don’t need more pins) you can buy Arduino Mega.

NameStore 1Store 2
Original Arduino UNOhttps://bit.ly/2MuCKMwhttps://bit.ly/3ormF7N
Clone Arduino UNOhttps://bit.ly/3t5gk59https://bit.ly/3osuWIi
Original Arduino Megahttps://bit.ly/2YnfYsQhttps://bit.ly/3pt5vro
Clone Arduino Megahttps://bit.ly/3aqqXHBhttps://bit.ly/2M3BsZf

Of course Arduino is not the only way to go. You can read about programming STM microcontrollers, AVR, or lately released Raspberry Pi Pico (programmed with C++ or Python). There are some more advanced boards like Maix Sipeed with an integrated screen and camera programmed with Python. You can also take a look at single-board computers like Raspberry Pi 4B or BeagleBone Black. But all of those examples are probably not the best for beginners.

Sensors

In order to build a robot (not an RC car) we need sensors. Sensors are devices that measure physical things and transform those readings into electrical signals so that we can read those with microcontroller. For example, to build object avoiding robot we need an ultrasonic sensor that will measure the distance between a robot and an obstacle. This distance or actually two-way time of travel of sound that is processed into the distance can further be processed to decide if the obstacle is close enough to stop the robot or turn. With 2 conditional statements (if(…){}) you can write a simple program for such a robot.

Another popular sensor for simple robots is a line sensor that can be used to build a line follower, that is a robot that follows the black line. By using three of those sensors at the front of the robot you can write a simple program that will drive forward when the line is detected by the sensor in the middle, if the line is detected by the right sensor it should turn right, and if the left sensor detects line you need to turn left. This is a simple example of a not really efficient program for a line follower but it works really well 🙂

There are other types of sensors, there is a sensor to measure everything you can think of air quality, pressure, soil pH sensor, LIDARs, movements sensors etc. Once you get more familiar with basic sensors you can start playing with those a bit more advanced. Ultrasonic sensor and line sensor are probably the easiest to start with and pretty straight forward to use.

NameStore 1Store 2
Line Sensorhttps://bit.ly/39q4qLxhttps://bit.ly/2MxQTbW
Ultrasonic Sensorhttps://bit.ly/3t1Quz7https://bit.ly/2YjCqTD
Sensor Kithttps://bit.ly/3aqzXfRhttps://bit.ly/39rnmJT

Motors

There is many options when it comes to motors for robotics but because this is an introduction I will focus only on simple and cheap motors. You should pay attention to the rated voltage and current of the motors. Usually, you should look for motors with voltage of about 5 to 12V. There should be a way to mount wheels or you will have to look for a DIY solution. In order to increase the torque and lower the RPM motor should have a built-in gearbox. To start I recommend those plastic yellow motors, those are not great and you wouldn’t build the most amazing robot ever with those but to start those are great!

NameStore 1Store 2
Yellow Motorshttps://bit.ly/3orwWknhttps://bit.ly/3pseObk
Small Motorshttps://bit.ly/3oqqgTmhttps://bit.ly/3adWmMX
Bigger Motorshttps://bit.ly/3qZZVxbhttps://bit.ly/3pthhSC

Motor driver (H Bridge)

There is no way to drive a motor directly with an Arduino, don’t even try because you will break it. In order to control the motors we need a motor driver also called H bridge. Again there is a lot of options and most of them are very similar. Main differences are max voltage and current that can be handled by a driver or some additional features. Some simple and popular drivers are listed below.

NameStore 1Store 2
L298https://bit.ly/36h9IH5https://bit.ly/3cgeLvq
L9110Shttps://bit.ly/3acjcVlhttps://bit.ly/3qYZyTI

Cables, Breadboards

Obviously, you will need some cables and a breadboard to connect everything together. They’re nothing complicated, buy some female-female, female-male, male-male cables. When it comes to breadboard use a bigger one for bigger projects and a smaller one for smaller projects, usually power rails on the sides are very useful.

NameStore 1Store 2
Cableshttps://bit.ly/2L20vLGhttps://bit.ly/2M2yGDx
Breadboardhttps://bit.ly/3cj6t67https://bit.ly/3t3MGgP

Chassis

In order to attach everything together, you will need a chassis. You can buy a set with chassis, motors and wheels or you can try to find your own DIY solution and make a chassis out of plastic or even cardboard (that’s how I built my first robot).

NameStore 1Store 2
Chassis 1https://bit.ly/3t3LJF7https://bit.ly/3cfuaw1
Chassis 2https://bit.ly/3a9Ebbmhttps://bit.ly/3cnsX5N

Batteries

The battery is always a really problematic part of building robots. The most common choice is a LiPo battery but it’s a little bit dangerous, you have to take care of it and be careful because discharging the cells under 3.2V may damage the battery. Those batteries are sold as 1S, 2S, 3S and so on which means one, two or three cells because each cell has a nominal voltage of 3.7V a two-cell battery has a nominal voltage of 7.4V (and a max voltage of 8.4V). Batteries vary with capacity, the bigger the capacity the longer you can power the robot. There is also max current that can be drawn from a battery this is labeled as for example 10C and it means that capacity multiplied by 10 will give the max amperage that you can draw from a battery.

Another (probably safer) way to go is to use protected 18650 batteries. It’s also more complicated because you need to create a battery pack on your own and combine a few of those batteries in parallel or in series. Professionally those batteries are spot welded together but you can just easily use a battery box to keep them together.

I don’t recommend going with AA or AAA batteries as you will need to recharge or replace those very often (it’s not good for the climate and your wallet) and the max current of those isn’t enough for some motors.

NameStore 1Store 2
2S LiPohttps://bit.ly/3iUpE7qhttps://bit.ly/2M2ILAn
3S LiPohttps://bit.ly/3qX8sRwhttps://bit.ly/2M2ILAn
4S LiPohttps://bit.ly/3iWMQSkhttps://bit.ly/2M2ILAn
18650 Batteryhttps://bit.ly/3a4ys6whttps://bit.ly/3orRskO
18650 Boxhttps://bit.ly/3a9hIv7https://bit.ly/36jr8Dh

Programming

A lot of people are scarred by programming, I am not really sure why. Programming is easy, you don’t need math to create simple robots! If you have any experience with C++ or similar programming languages you can start programming Arduino right now. If you don’t no worries, there is a lot of great tutorials and examples online. Once you start and try to write your own programs you will realize that it’s not that hard.

You can find some cool tutorials on official arduino website:

https://www.arduino.cc/en/Tutorial/HomePage

Or just type “Arduino tutorial” into YouTube and you will find thousands if videos on this topic!

I hope this article helped you a bit with your robotics journey! If so don’t forget to share with friends and share you progress on Instagram by tagging me: @nikodembartnik and @indystry

Have a nice day!

How to build 3D printed Dremel CNC?

Try typing Dremel CNC to Google or Youtube, the internet is filled with my videos and tutorials about building 3D printed Dremel CNC. I kind of feel just like repeating over and over the same content and that is creatively hard for me because I like creating new stuff the most and not focusing on past projects.

At the same time, I understand that a lot of people want to build DIY Dremel CNC because it’s simple, cheap, and inexpensive, totally understandable! A CNC machine that can be easily 3D printed and assembled with easy to buy components, that was the goal of this project, and looking at reviews of hundreds of makers all around the world I think the project turned out perfectly! I am more than happy that such a simple idea of mine can help so many makers, businesses and people. As you may know, I am working on a new bigger CNC machine called IndyMill, that’s why I created this website to share all the info about this machine, release files, and maybe even create a small business out of that! But I don’t want to forget about Dremel CNC and I know there is still a lot of people that want to build it but don’t know where to start. That’s why I made this post, actually, the first one on indystry.cc, I hope to make some more in the near future 🙂 Let’s start!

Continue reading “How to build 3D printed Dremel CNC?”