zoukankan      html  css  js  c++  java
  • Project Woosah Tu (五色土)

     

    I bought this Raspberry Pi (model B) in spring 2013, I hadn't done too much with it except for some PyGame coding stuff. So recently, I wanted to reboot my robotic project. (For those who are not familiar with Raspbery Pi, it's a 35 dollar mini computer running Linux on a SD card, it has GPIO pins you can do cool stuff with.)

    These are the main components I want to build:

    - Two tank tracks so it can move: turn both on, it will move forward; one on one off, it can turn left/right.

    - Webcam: I have an old webcam from a decade ago. My Kinnect sensor could also be used potentially. I bought an external power cable for Kinnect about 2 summers ago, during which i was trying to utilize the open kinnect library to build a motion controlled Dragon Ball Z game.

    - Monitor: it what be cool to have a small monitor working, display like a smiling face. (Inspired by the Big Bang Theory episode in which Shelton built a really cool bot, very funny story.)

    Alright, let's get started!

    Legos and building blocks: you will never be too old to play it. Btw, don't you guys think MineCraft is like a 3D Multiplayer version of Legos?

    Arudino inventor's toolkit: resistors, LEDs, transistors, diode, servo, different sensors, etc., at least i have something to start with.

    USB splitter: kinda useful, since Pi only has 2 USB ports.

    Edimax wireless plug: very easy to set up the network. Btw i had to change the keyboard setting to US cuz by default it was using UK keyboard, the position of symbols are quite different.

    I also bought a case for pi, which fits it percectly.

     

    I built one of these last year; so i ordered another one and assembled it real quick.

    I removed the original AA battery holder. I Built a simple circuit which uses transistors to amplify the pins so i can control the moters from program.

    Notice that don't ever try to connect motor to pi directly, the pins won't have enough currency. Also the bigger issue is that the Back EMF Suppression could damage your Pi.

    http://instagram.com/p/leMQT3Ghwj/#

    So i need to find a way to power Pi. How do we provide a stable 5V output? using AAs is not a good idea, first, chargables ones could provide 4.8V, which is not sufficient. 4 Regulars ones could provide 6V, which is too high. In addition, we have to make sure the voltage is stable.

    I bought this Anker battery which has 15000mAh, that is a lot capacity. I could also use it to charge my iPhone when i am travelling. The downside is this battery is way too heavey, 11.2 ounce (317g), and it's also kind of big. I cannot fit it in; so....i built this trailer to carry it.




    After assemble Lego stuff and put everything together. I got my first iteration done:

    http://instagram.com/p/lgt7rLmh72/#

    I can control it through terminal from another computer or anthing that supports ssh terminal. There are SSH tools/apps for smart phones.




    In the meanwhile, the 7 inch monitor had arrived. i also bought another 12 V output adapter for it. After some tweaking, i managed to make the monitor work. The resolution wasn't too great; I woudn't program with it.

    http://instagram.com/p/lb0MCSmh9h/#

    By installing the motion library, the old webcam could work as a webservice, very neat.

    As for Software, i used python to program the pins. It's fairly simple, aslo there are tons of tutorials online.




    I also ordered a 4-wheel robotic car from China. After it arrived, i replace it with the tank tracks. This one has faster chassis.

     http://instagram.com/p/lluWlCGhwp/#

    Lego + glue:

    left) webcam could mount and unmont easily.
    right) I only uses the 2 wheels in front, in the back I simply use Lego wheels. The height is just perfect.


    NOW: I have to solve the battery problem. After some conducted some research, I realized that I need to get a battery regulator, which coud allow a wide range of input voltage, and output a stable 5V for USB devices. Couldn't find anything i can use from Fry's so i ordered one on Amazon, it ships from China as well. I have to wait now...


    Found this one from fry's, 6 AA batteries series connected could provide 9 V, this will be used as the input for the future regulator.

    Normally an AA battery is around 24g, so 6*24=144g, with this i could reduce 55% of the weight from battery.


    The next step is to build a controller.

    ....

    Django is the way to go, make a web service that handle requests and control the robot!

    Since its python, i could easily implement CV algorithms.

    to be continued....

  • 相关阅读:
    used内存较大,实际top查看系统进程中并没有占用这么多内存
    查看LINUX进程内存占用情况
    关于ConcurrentHashMap的key和value不能为null的深层次原因
    Linux修改用户所在组方法
    原因可能是托管的PInvoke签名与非托管的目标签名不匹配
    vs2019 实现C#调用c++的dll两种方法
    java jvm 参数 -Xms -Xmx -Xmn -Xss 调优总结
    java 读取文件的几种方式和通过url获取文件
    Idea中Maven的默认配置 (非常好)
    去哪儿网models数据更新
  • 原文地址:https://www.cnblogs.com/antai/p/3617040.html
Copyright © 2011-2022 走看看