# OberBot ## Projekte die damit möglich sind - Line following robot - Kartographierung - Hindernis Erkennung ## Software Neben der Implementierung in C / C++ ist die Programmierung in MicroPython möglich. Am besten kapseln wir die ganze Hardware noch schön in ein Modul. Folgender Beispiel-Code lässt die Roboter gerade aus fahren: ``` import machine import time stepLeft = machine.Pin(0, machine.Pin.OUT) stepRight = machine.Pin(12, machine.Pin.OUT) dirLeft = machine.Pin(2, machine.Pin.OUT) dirRight = machine.Pin(13, machine.Pin.OUT) motorDisable = machine.Pin(14, machine.Pin.OUT) motorDisable.off() dirLeft.off() dirRight.off() while 1: stepLeft.on() stepRight.on() time.sleep_ms(1) stepLeft.off() stepRight.off() time.sleep_ms(1) ``` - [Oberbot Python Library](https://git.oberlab.de/oberbot/python) - [MicroPython Doku](http://docs.micropython.org/en/latest/esp8266/tutorial/index.html) - [WebREPL](http://micropython.org/webrepl/) ## IDE [https://github.com/mu-editor/mu](https://github.com/mu-editor/mu) ``` git clone https://github.com/mu-editor/mu.git cd mu pip3 pip install -r requirements.txt python3 run.py ``` ## Aktuelle Hardware Hypothese Favorisierte Lösung: Wemos D1 mini mit steppern und A4988 Treibern. Alles Weitere wird, wenn möglich über I2C angeschlossen. Kostenübersicht bei schneller Beschaffung:
BauteilAnzahlKostenGesamtkostenStatus
[WEMOS D1 Mini](https://www.ebay.de/itm/ESP8266-ESP-12-D1-Mini-WiFi-Develop-Kit-Development-Board/143003871118)14,104,10lagernd
[Boost Converter](https://www.ebay.de/itm/SX1308-Step-Up-Booster-Converter-Spannungsregler-Wandler-DC-DC-2-24V-2-28V/162475858855)13,413,41bestellt
[A4988](https://www.ebay.de/itm/5stk-StepStick-Stepper-Motor-A4988-Driver-Module-fur-Reprap-3D-Drucker-TE906/123465083534)21,162,32lagernd
[stepper](https://www.ebay.de/itm/3Sets-28BYJ-48-DC5V-Stepper-Motor-with-4-Phase-5-Wire-ULN2003-Driver-Board-TE759/132816404359)2 4,46lagernd
[port expander](https://www.ebay.de/itm/NEU-PCF8574T-Remote-8-bit-I-O-expander-IOT-I2C-Bus-Arduino-Raspberry-Pi-DIY-209/282747767852)11,991,99chips lagernd stangenware
Gesamtkosten knapp über 17 Euro. Und das noch ohne Spielerreien. Shopping in Europa macht keinen Spaß!!! ![😉](https://twemoji.maxcdn.com/v/12.1.2/72x72/1f609.png) Status: für Prototypen Bei den Steppern ist der ULN2003 schon dabei! Eventuell Versuch mit port expander und uln2003 Pinout revision 0 ``` d1 mini pro reserved | RST TX | UART / programmer | A0 RX | UART / programmer reserved servo | D0 D1 | I2C SCL motor enable | D5 D2 | I2C SDA motor rechts step | D6 D3 | motor links step motor rechts dir | D7 D4 | motor links dir | D8 GND | | 3V3 5V | ``` ## I2C Bus
AdresseDevice
0x20port expander 1
0x29TOF
0x3CDisplay
0x68IMU
## Hardware Optionen - Schrittmotoren: [28BYJ-48](https://de.aliexpress.com/item/Smart-Elektronik-Neue-Marke-28BYJ-48-DC-5-v-Reduktion-Schritt-Motor-Getriebe-Schrittmotor-4-Phase/32864445067.html) mit - ULN2003 - Vorteil: geht mit 5 Volt Nachteil: 8 Pins Verbraucht - A4988 Driver Vorteil: Step/Dir Interface - dadurch nur 4 Pins. Einstellbarer Strom. Nachteil: operational >8V!. Der mit [Stepup converter](https://de.aliexpress.com/item/2-24-V-zu-2-28-V-2A-DC-DC-SX1308-Step-UP-Einstellbare-Power-Module/32873124342.html) - Controller: ESP8266 plain: Vorteil: Bauhöhe - [WEMOS D1 Mini](https://de.aliexpress.com/item/Smart-Electronics-D1-mini-Mini-NodeMcu-4M-bytes-Lua-WIFI-Internet-of-Things-development-board-based/32659152063.html) vorteilhaft, da programmer mit drauf. - Upgrade: ESP32 - eventuell notwendig wegen IO pins - Line following hardware: [IR Sensoren](https://de.aliexpress.com/item/10pcs-IR-Infrared-Obstacle-Avoidance-Sensor-Reflection-Photoelectric-Module-for-Arduino-Reflective-Photoelectric/32807780678.html). Min 2, besser 4 - TOF sensor [VL53L0X](https://de.aliexpress.com/item/GY-530-VL53L0X-World-smallest-Time-o-f-Flight-ToF-laser-ranging-sensor/32738458924.html) - mpu6050 - [OLED](https://de.aliexpress.com/item/0-96-Zoll-IIC-Serien-Wei-Oled-display-modul-128X64-I2C-SSD1315-12864-Lcd-bildschirm-Bord/32840168680.html) - [port expander](https://www.aliexpress.com/item/PCF8574-PCF8574T-I-O-for-I2C-Port-Interface-Support-Cascading-Extended-Module/32673494148.html) Kosten:
BauteilAnzahlKosten
mpu605010,66 $
A498820,75 $
28BYJ-4821,25 $
UL200320,40 $
WEMOS D1 Mini12,15 $
VL53L0X12.61 $
Stepup Converter10.34 $
IR Sensoren40,28 $
OLED11,95 $
portexpander10,80 $
Gesamtkosten: 13,6 $ Was kostet 3D Druck?! ## Supply Chain Management ![😉](https://twemoji.maxcdn.com/v/12.1.2/72x72/1f609.png)
BauteilAnzahlKosten pro StückAnmerkungStatus
[WEMOS d1 mini](https://www.aliexpress.com/item/1PCS-D1-mini-Mini-NodeMcu-4M-bytes-Lua-WIFI-Internet-of-Things-development-board-based-ESP8266/32843721010.html)202.25black friday + DHL eCommerce shipping10 bestellt
[A4988](https://www.aliexpress.com/item/3D-printer-machine-driver-module-A4988-A4983-StepStick-Stepper-Motor-Driver/32459985724.html)400.80black friday + DHL eCommerce shipping26 bestellt
[stepup](https://www.aliexpress.com/item/2-24V-to-2-28V-2A-DC-DC-SX1308-Step-UP-Adjustable-Power-Module-Step/32873124342.html)200.34 14 bestellt
[IR sensor](https://www.aliexpress.com/store/product/10pcs-TCRT5000-infrared-reflectance-sensor-Obstacle-avoidance-module-tracing-sensor-tracing-module/1817254_32676606328.html)+400.41black friday + DHL eCommerce shipping40 bestellt
[28BYJ-48 5v](https://www.aliexpress.com/item/1pcs-Wholesale-28BYJ-48-Lead-25cm-Stepper-Motor-DC-5V-4-Phase-Step-Motor-Reduction-Drop/32946280978.html)401.42black friday + ePacket (20-25 tage)17 bestellt
[oled](https://www.aliexpress.com/item/WAVGAT-White-ouble-color-128X64-OLED-LCD-LED-Display-Module-For-Arduino-0-96-I2C-IIC/32828120727.html)201.94black friday. uncooler versand. nur 10 stück ordern10 bestellt
[dupont cable, f/f](https://www.aliexpress.com/item/40PIN-Dupont-Line-10CM-20CM-30CM-Male-to-Male-Female-to-Male-and-Female-to-Female/32891879068.html)5x40alle 3.3 200 bestellt
[motor connector](https://www.aliexpress.com/item/50PCS-Lot-XH2-54-Pin-Header-Connector-2P-3P-4P-5P-6P-7P-8P-9P-10P/32820868041.html)11.13für 50 stück!50 bestellt
[pin header farbig](https://www.aliexpress.com/item/10PCS-40Pin-1x40P-Male-Breakable-Pin-Header-Strip-2-54mm-Long-Blue-Red-White-Green-Yellow/32863408765.html)1 mal je schwarz, rot, gelb, grün2preis für alle4x400 bestellt
[dupont housing 4 pin](https://www.aliexpress.com/item/For-dupont-connector-6pin-single-row-2-54mm-for-dupont-plastic-shell-through-hole-100pcs-lot/32637991458.html)1x1001.69 100 bestellt
[dupont housing 2 pin](https://www.aliexpress.com/item/For-dupont-connector-6pin-single-row-2-54mm-for-dupont-plastic-shell-through-hole-100pcs-lot/32637991458.html)1x1001.21 100 bestellt
[batterie halter](https://www.aliexpress.com/item/1pc-AA-Size-Battery-Storage-Box-Case-Holder-Leads-With-1-2-3-4-Slots-Container/32848865853.html)104.4erst mal 10. muss erst getestet werden!10 bestellt
[schalter](https://www.aliexpress.com/item/21-15mm-On-Off-Boat-Car-Rocker-Switch-2Pin-6A-10A-250V-125V-AC-Button-Best/32914963172.html)101.75erst mal 10. muss erst getestet werden!10 bestellt
[taster](https://www.aliexpress.com/item/10Pc-Limit-Switch-Push-Button-Switch-1A-125V-AC-Mouse-Switch-3Pins-Micro-Switch/32923912315.html)2x101.24erst mal 20. muss erst getestet werden!//
[PCB Fertiger](https://www.electrodragon.com/product/pcb-service/)