用Arduino制作智能垃圾桶

作者: 少儿创客 | 来源:发表于2016-09-08 07:59 被阅读1329次

    挥手就能开的垃圾桶

    【转载自】http://www.instructables.com/id/Robotized-Trashcan/?ALLSTEPS
    【作者】 AlexGyver
    【翻译】964683112@qq.com


    If you’re looking to add some smarts to your kitchen, perhaps a robotic trashcan may be a good start. Take this recent project from Alex Gyver, for example, who built a bin that opens whenever he waves his hand above it.
    如果你想让你的厨房显得更加智能化,也许做一个机器人垃圾桶是一个不错的开始。Alex Gyer最近就做了这样的一个只要你在上面挥手就会打开的垃圾篓。
    In Gyver’s case, the can has two modes–one that raises the lid for 10 seconds when a hand is 10 to 30 centimeters away, and another for three seconds when 30 to 70 centimeters away. The latter is clearly for when you have to quickly throwing something out.
    在Gyver的例子里,垃圾篓有两种动作模式,当你手离它10到30厘米的时候会开盖10秒钟,或者当你离它10到30厘米的时候也会打开盖子3秒钟。后面这种模式正好是我们快速扔东西时候的动作。
    The system consists of an Arduino, an inexpensive range ultrasonic sensor, and a servo motor. The distances and times can easily be adjusted by editing the sketch.
    整套装置由一块Arduino板子,一个很便宜的超声波传感器以及一个舵机组成。感应距离和开盖时间可以通过程序方便的调节。
    Sound like something you’d like in your house, office or dorm? Check out the entire project on Instructables here.
    是不是很想在你的家里,办公室或者卧室放一个,访问Instructables网站获取详情。

    Step 1: 材料清单

    这个板子可以普通的Arduino代替



    超声波传感器

    回形针

    舵机

    开关

    The brain of all system is arduino, so you can change all distances and times very easy, editing the sketch. The - it is a bucket for detergent. Sensor is cheap range ultrasonic sensor for arduino, and actuator is servo motor, all these components I’ve bought very cheap on aliexpress, links in the video's description. The connection rod I will make of paper clip.
    整个系统的核心是Arduino,因此可以方便地通过修改代码修改感应距离和时间。这是一个洗涤桶。传感器是一个便宜的超声波传感器,执行器是一个伺服舵机,我在国际版淘宝上以很便宜的价格购买了这些组件,视频描述里会提供购买地址。合页和舵机的连杆用回形针制作。

    • Arduino nano $2 Arduino nano 2美元
    • Range sensor $0.5 超声波传感器0.5美元
    • Servo $1 舵机1美元
    Step 2: 设计开发机械机构








    Show All Items
    I get rid of all useless plastic parts from trashcan. I decided to design the can opening mechanism, so I measuring all parts of mechanism and sketching it on paper in real scale. Cap is showed in 2 positions, opened and closed. Mechanism is very simple: there is a hinge on the cap and connection rod to servo. But will this mechanism will enable to operate? Let's find it out, using the autodesk force effect motion.
    我拆掉了垃圾桶所有没什么用的塑料部分。我决定自己设计垃圾桶的盖子开关装置。我测量了装置的所有部分并且一比一绘图。桶盖画了两个视图,打开和关闭。整套装置和简单,在桶盖和舵机的连接之间有一个铰链。但是设计合理吗,我们在Autodesk应用(手机应用)里测试一下(好吧歪果仁软件用的很溜啊)。
    iTunes download link ITunes下载地址
    Google Play download link Google Play下载地址
    I take a photo of my sketch and upload it in force effect application. In this application I can build my mechanism and explore it. Servo can turn on angle of 180 degrees, so cap can't close. I change some dimensions and mechanism works perfectly, I like it. Now, looking on this sketch, I make some corrections in my sketch. And using my sketch, i can find all dimensions by measuring them with rule! Now we are ready to build it.
    我把的草图拍照并上传到这个应用。通过这个应用我可以搭建我的机构并且探索。舵机可以旋转180°,因此盖子盖不上。我修改了尺寸和结构然后就能够很好的开关了。你可以看到我在草图上做了一些修改。通过草图我可以测量出我需要的结构的尺寸。让我们开始制作我们的智能垃圾桶吧。
    Step 3: 制作铰链




    I will make a hinge from a tincan metal. Just cut off some strip, fold it and mark an axis. Bend some legs and make a hole for shaft. I just glue it to the cap, so process both surfaces with abrasive and glue.
    (小编在此感叹歪果仁的动手能力真溜啊)用易拉罐做一个合页,剪一部分,抛光,弯折出支架,并且为轴大空。然后我把合页站到盖子上,所以盖子和合页都要打磨然后再黏合。
    Step 4: 安装舵机





    Make a mark for servo's shaft place, like on the sketch. Temporarily attach servo with tape and mark 4 holes to fix a servo with cable ties.
    在垃圾桶上标出舵机轴的位置,和草图要一致。先把舵机用胶带临时固定,然后在桶上打四个孔,用绑带把舵机绑在垃圾桶上
    Now I am making a connection shaft of huge paper clip. Insert it in hinge and servo. I’m finally bending paper clip to fix it.
    然后用纸做了一个轴,然后用曲别针把舵机和合页连接到一块。最后在回形针末端弯一个勾固定。
    Step 5: 安装超声波传感器






    It's time for the range sensor. Get some dimensions and mark them on the cap and make necessary holes. Connect wires to sensor and fix them all on cap with hot glue.
    接下来我们安装超声波传感器,测量传感器的尺寸并且在盖子上做记号然后大空。把导线接到传感器上然后用热熔胶固定到盖子上。
    Step 6: 按钮开关

    Make a hole for switch on the side of your thrashcan, solder wires and place button.
    在垃圾桶一侧开一个孔安装开关,把导线焊到开关上并且安装开关。
    Step 7: 电路图和设计图

    So, you can change all distances and timings in the sketch. Also, measuring of distance is arithmetical mean by 3 metering.
    然后你就可以通过代码来调整感应距离和盖子打开的时间。当然要反复测量距离。
    robo_trashcan.ino代码文件

    Step 8: The rubber



    You can see that servo is weak, so closing of the cap is faster than opening it, it’s because of the gravity. Let's fix it with simplest accumulator of mechanic energy - a rubber. Rubber will stretch on falling, and compress on rising, helping servo to open the cap.
    舵机性能比较弱,因为重力的原因盖盖比开盖快的多。我们用最简单的蓄力装置,橡皮筋来解决。盖盖的时候橡皮筋被拉开,比较慢,开盖的时候收缩,帮助舵机打开盖子。
    Step 9:供电





    You can power this system by dc power supply. All electronics I fix by cable tie and cover by not transparent tape. Also, you can build all mechanism outside the trashcan, but I wanted to make robo trashcan that is ordinary outside, just a sensor is showed up.
    你可以用直流电源给这套装置供电。所有的电子装置我都用绑带固定比并且用不透明胶带站起来。你也可以把所有的东西都放到垃圾桶外面。因为我的垃圾桶主要放到室外,所以只保留了传感器在外面。
    Step 10: 大功告成




    There is a problem with power, because arduino consumes 20 mAms. It is so much. 5 ah powerbank can power this trashcan only for a week. So it is good idea to use attiny13 or another MK instead of arduino.
    So, it is robo trashcan, that is opening its cap when you pass your hand above it.
    这套装置由个缺点,因为Arduino消耗20mAms.耗电太多一个5ah的移动电源只能用一星期。所以推荐使用attiny13或者其他MK替代Arduino。
    这就你在它上面挥手就会开盖的智能垃圾桶。
    最后附上视频

    小编说:这个视频用到的Arduino知识很少,就用到了一个舵机和超声波传感器,然而做出了非常实用的设计,这其中设计机械结构对国内的学生来说要理解通用技术,还用到了手机app来辅助进行设计,动手制作合页,连杆,钻孔等,用到了传统木工、金工的工具,充分的体现了创客的精髓。创客是创造性解决问题的人,创客最终要回到现实,不是一帮沉迷于技术的geek。

    相关文章

      网友评论

        本文标题:用Arduino制作智能垃圾桶

        本文链接:https://www.haomeiwen.com/subject/nnrsettx.html