Raspberry Pi
Siirry navigaatioon
Siirry hakuun
Sekalaisia ideoita ja ajatuksia Raspberry Pi:n käytöstä pienoisrautatien kanssa.
Märklinin ohjaus Raspberry Pi:llä
Kommunikointi eri Raspberry Zero -korttien välillä voidaan tehdä RS-485 väylää käyttäen ja esimerkiksi MODBUS-protokollalla. Tämä protokolla mahdollistaa yksittäisten bittien ja sanojen kirjoittamisen ja lukemisen toisilta väylään kytketyiltä laitteilta.
GPIO ajatuksia
Seuraavia lähtöjä ja tuloja olisi hyvä olla:
- tulot
- on/off-tulo, esim kontaktikiskot (vrt S88)
- lähestymisanturi, esim junan havaitsemiseen ilman kosketusta.
- lähdöt, toteutus esim MC14094-piirillä
- on/off relelähtö: jänniteen kytkeminen oheislaitteelle
- pwm-lähtö: esim valaistuksen voimakkuuden säätäminen
- pulssilähtö: esim vaihteiden ohjaukseen. Pulssin pituus säädettävissä, kuten esim CS:ssä.
- Servo. PWM-lähtö servon ohjaukseen
- Moottoriohjaus. Tasavirtamoottorit ja askelmoottorit.
GPIO lähdöt: http://pinout.xyz/
Optotriac esim MOC3052
piirivalintaan http://www.onsemi.com
Junan IR havainnointi
https://www.azatrax.com/ir-model-train-detector.html
Raspberry Pi:n versiot
| Type | Model A | Model B | Compute Module* | Zero | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Generations | 1 | 1 + | 1 | 1 + | 2 | 2 ver 1.2 | 3 | 1 | 3 | 3 lite | PCB ver 1.2 | PCB ver 1.3 |
| Release date | February 2012 | November 2014 | April–June 2012 | July 2014 | February 2015 | October 2016 | February 2016 | April 2014 | January 2017 | November 2015 | May 2016 | |
| Target price | US$25 | US$20 | US$35 | US$25 | US$35 | US$35 | US$35 | US$30 (in batches of 100) | $30 | $25 | US$5 | US$5 |
| Architecture | ARMv6Z (32-bit) | ARMv7-A (32-bit) | ARMv8-A (64/32-bit) | ARMv6Z (32-bit) | ARMv8-A (64/32-bit) | ARMv6Z (32-bit) | ||||||
| SoC | Broadcom BCM2835 | Broadcom BCM2836 | Broadcom BCM2837 | Broadcom BCM2835 | Broadcom BCM2837 | Broadcom BCM2835 | ||||||
| CPU | 700 MHz single-core ARM11 76JZF-S | 900 MHz 32-bit quad-core ARM Cortex-A7 | 900 MHz 64-bit quad-core ARM Cortex-A53 | 1.2 GHz 64-bit quad-core ARM Cortex-A53 | 700 MHz single-core ARM11 76JZF-S | 1.2 GHz 64-bit quad-core ARM Cortex-A53 | 1 GHz single-core ARM11 76JZF-S | |||||
| GPU | Broadcom VideoCore IV @ 250 MHz (BCM2837: 3D part of GPU @ 300 MHz, video part of GPU @ 400 MHz) OpenGL ES 2.0 (BCM2835, BCM2836: 24 GFLOPS / BCM2837: 28.8 GFLOPS) MPEG-2 and VC-1 (with license), 1080p30 H.264/MPEG-4 AVC high-profile decoder and encoder (BCM2837: 1080p60) | |||||||||||
| Memory (SDRAM) | 256 MB (shared with GPU) | 512 MB (shared with GPU) as of 4 May 2016. Older boards had 256 MB (shared with GPU) | 1 GB (shared with GPU) | 512 MB (shared with GPU) | 1 GB (shared with GPU) | 512 MB (shared with GPU) | ||||||
| USB 2.0 ports | 1 (direct from BCM2835 chip) | 2 (via the on-board 3-port USB hub) | 4 (via the on-board 5-port USB hub) | 1 (direct from BCM2835 chip) | 1 (direct from BCM2837 chip) | 1 Micro-USB (direct from BCM2835 chip) | ||||||
| Video input | 15-pin MIPI camera interface (CSI) connector, used with the Raspberry Pi camera or Raspberry Pi NoIR camera | 2× MIPI camera interface (CSI) | None | MIPI camera interface (CSI) (rev 1.3) | ||||||||
| Video outputs | HDMI (rev 1.3), composite video (RCA jack), MIPI display interface (DSI) for raw LCD panels | HDMI (rev 1.3), composite video (3.5 mm TRRS jack), MIPI display interface (DSI) for raw LCD panels | HDMI (rev 1.3), composite video (RCA jack), MIPI display interface (DSI) for raw LCD panels | HDMI (rev 1.3), composite video (3.5 mm TRRS jack), MIPI display interface (DSI) for raw LCD panels | HDMI, 2× MIPI display interface (DSI) for raw LCD panels, composite video | Mini-HDMI, 1080p60, composite video via marked points on PCB for optional header pins | ||||||
| Audio inputs | As of revision 2 boards via I²S | |||||||||||
| Audio outputs | Analog via 3.5 mm phone jack; digital via HDMI and, as of revision 2 boards, I²S | Analog, HDMI, I²S | Mini-HDMI, stereo audio through PWM on GPIO | |||||||||
| On-board storage | SD, MMC, SDIO card slot (3.3 V with card power only) | MicroSDHC slot | SD, MMC, SDIO card slot | MicroSDHC slot | MicroSDHC slot, USB Boot Mode | 4 GB eMMC flash memory chip | MicroSDHC | |||||
| On-board network | None | 10/100 Mbit/s Ethernet (8P8C) USB adapter on the USB hub | 10/100 Mbit/s Ethernet, 802.11n wireless, Bluetooth 4.1 |
None | ||||||||
| Low-level peripherals | 8× GPIO plus the following, which can also be used as GPIO: UART, I²C bus, SPI bus with two chip selects, I²S audio +3.3 V, +5 V, ground | 17× GPIO plus the same specific functions, and HAT ID bus | 8× GPIO plus the following, which can also be used as GPIO: UART, I²C bus, SPI bus with two chip selects, I²S audio +3.3 V, +5 V, ground.
An additional 4× GPIO are available on the P5 pad if the user is willing to make solder connections |
17× GPIO plus the same specific functions, and HAT ID bus | 46× GPIO, some of which can be used for specific functions including I²C, SPI, UART, PCM, PWM | 40× GPIO ("unpopulated header") | ||||||
| Power ratings | 300 mA (1.5 W) | 200 mA (1 W) | 700 mA (3.5 W) | 600 mA (3.0 W) | 800 mA (4.0 W) | 200 mA (1 W) | 700mA (3.5 W) | ~160 mA (0.8 W) | ||||
| Power source | 5 V via MicroUSB or GPIO header | |||||||||||
| Size | 85.60 × 56.5 mm, not including protruding connectors | 65 × 56.5 × 10 mm, same as HAT board | 85.60 × 56.5 mm, not including protruding connectors | 85.60 × 56.5 × 17 mm | 67.6 × 30 mm | 67.6 × 31 mm | 65 × 30 × 5 mm | |||||
| Weight | 31 g | 23 g | 45 g | 7 g | 9 g | |||||||
| Console | Micro-USB cable or a serial cable with optional GPIO power connector | |||||||||||
| Generation | 1 | 1 + | 1 | 1 + | 2 | 2 ver 1.2 | 3 | 1 | 3 | 3 lite | PCB ver 1.2 | PCB ver 1.3 |
| Type | Model A | Model B | Compute Module* | Zero | ||||||||
* all interfaces are via 200-pin DDR2 SO-DIMM connector.