The biggest problem that I had was dealing with my stepper motor. I'll be using the KP35FM2 ‐ 035 stepper motor, made by Japan Servo. I had no idea what the specifications are for these motors. I couldn't find any datasheet on the internet. To make matters worst, the store owners don't know the specifications either.I found a similar model (KP35FM2 ‐ 044) and to power this motor, I need to apply up to 24V and a maximum current of 500ma. I found an old power adapter which outputs 9V, at 500ma. I have enough current to keep the motor going but applying a lower voltage would result in weaker torque.
I redesigned my scanner and it is a major improvement from my initial design. I replaced my panning servo motor with a stepper motor. A stepper motor is a type of motor which can turn at a specific degree. In my case, my stepper motor can turn at 1.8 degrees per step. This would mean it would take 200 steps to complete a full cycle.
The biggest issue with my previous design was that the sensor's position is constantly changing. I need to minimize this, since my program assumes that the distance readings are all relative to the same point. The image below shows that the IR sensor will always be at the pivot point. Also, the tilting servo will only rotate from 0° to 90°.
![]() |
Tilt Angle: 45° |
![]() |
Tilt Angle: 0° |
There will be 2 main scanning modes which can be selected within the arduino code. The only difference between these modes is the stepper motor's maximum panning angle. For example, if I set the maximum number of steps equal to 100 (or 180 degrees), then the sensor's field of vision is within 180 degrees.
Partial Scan
This scanning technique is ideal for detecting a small area (example: a corner). I modified the code in such a way so that the stepper motor will only increment 100 steps (or 180 degrees). The images below are the scanning results of 2 laundry boxes, placed perpendicular to each other. To see the scanner in action, a video is posted at the end of this post.
![]() |
Top View |
Full 360 Degree Scan
This scanning technique is a little different than before. Since a stepper motor is capable of rotating a full cycle, I decided to take advantage of this. The scanner will make a full 360 degree turn and once it's cycle is completed, the tilting servo will be incremented by 1 degree. This process is repeated until the tilting servo reached 90 degrees.
I tried to scan my recycling box and the results are slightly disappointing. As you can see below, the scanner seems to behaving erratically on a certain area of the box.This is one of the biggest setbacks.
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjievtf1u-pwFEYbfrZNSks-O5rU9oyRP22q0A-l6RPLCyPcvcOuIpiwBEiuqg0FioIbcfSJP7sssF0mgYxP6cqPax4umz0_nfsJdYrwI9mcTJ4hIkfndifWD-Eh8uJ3QWv2_J3FFvmTms/s320/WP_000391.jpg)
It seems that the was a small error within my code. There are hundreds of lines of code(2 seperate scripts) and finding the bug was incredibly difficult. After a successful scan, the images produced by matlab is amazing.
![]() |
Note: the scale of the graph changes in different perspectives |
Parts:
- 1x servo motor (dagu medium servo)
- 1x bipolar stepper motor (KP35FM2 ‐ 035 by japan servo)
- 1x SN754410 Quad Half H-Bridge (to control the stepper motor)
- 1x medium range IR sharp sensor (range of 10-80cm)
- an external power source for the motor
It took a lot of hard work and dedication to complete this ambitious project.