Cansat 2023/2024
Introduction
Use
- Raspberry Pi
- TF03 Lidar
- Temperature Sensor
- Pressure sensor
The price is totally
Theory / Hypothesis
Hypothesis. We are able to detect
Raspberry Pi
- Raspberry Pi Zero 2W
- Raspberry Pi Pico
- Raspberry Pi Zero W
- Raspberry Pi Zero
Radio 433 MHz
Great idea about frequencies: https://electronics.stackexchange.com/questions/493610/how-can-arduino-send-an-rf-signal-at-433-mhz
- processor clock frequencies
- speed of processing
- data rate
- "carrier" frequencies
Some models:
- APC220
- 433 MHz DC 5 V RF Receiver & Transmitter Module Himbeere. See LastminuteEngineers.
- RFM210LCF-433D radio receiver https://hackaday.com/2023/02/16/decoding-433-mhz-signals-with-arduino-raspberry-pi/
- Transmitter Model No: MX-FS-03V (marked XD-FST)
- Receiver Model No: MX-05V (marked XD-RF-5V)
- HC-12 transmitter: half-duplex; 100 channels 433.4 - 473.0 MHz; 1 km. See https://www.allaboutcircuits.com/projects/understanding-and-implementing-the-hc-12-wireless-transceiver-module/. The circuit is Si4463.
- nRF24L01, see LastMinuteEngineers. Not, because 2.4GHz.
Also is needed USB TTL Converter.
APC220: apc220cfg.ino. Terminal v1.9b by Br@y++ https://sites.google.com/site/terminalbpp/. https://static1.squarespace.com/static/607d6dc320b1be007db03750/t/6103f1a1bce34815144b959f/1627648418459/APC220_Datasheet.pdf https://stackoverflow.com/questions/28528072/how-to-use-apc220-radio-communication-module-in-raspberry-pi uses UART. Frequency: 418MHz-455MHz.
Low power device 433 MHz https://en.wikipedia.org/wiki/LPD433.
Some tutorials
- https://wolles-elektronikkiste.de/en/433-mhz-radio-with-arduino
- https://robocraze.com/blogs/post/how-433mhz-rf-module-works-interfacing-with-arduino
- https://www.instructables.com/Decoding-and-sending-433MHz-RF-codes-with-Arduino-/
Antenna
Antenna connector types: https://www.arcantenna.com/blogs/news/how-to-identify-coaxial-connectors.
The extension cable of APC220 is coax cable with SMA connecto
Inputs
- SPI. Serial Peripheral Interface
- I2C
- UART (Serial) Transmit: GPIO14, receive: GPIO15. We need more UART (Lidar and radio) USB UART (FTDI) is possible. https://www.dfrobot.com/index.php?route=product/product&product_id=147#.UOamLG-sh8E Raspberry Pi 4 supports 4 UART interfaces (https://forums.raspberrypi.com//viewtopic.php?t=244827).
Analog to digital converters.
Analog Inputs
Eg. MCP3008 analog-to-digital converter (ADC). See https://randomnerdtutorials.com/raspberry-pi-analog-inputs-python-mcp3008/ This requires soldering and a lot of wires.
PiMoroni IO Expander.
Temp
- DS18B20 + 4.7 kOhm resistor. DS18B20 is a digital
- DHT11 Temp and humidity sensor
- NTC and ADC
Pressure
Some Sensors available
Prefer a tubed version!
- MPRLS Ported Pressure Sensor: Attach a tube on it. I2C
- SCP1000 Pressure sensor breakout board
- BMP180
- GY-BMP280
- BME680
- MPS20N0040D Pressure Transducer
LidaR TF03
Long Manual https://acroname.com/sites/default/files/assets/tf03_product_manual_v0.4_en.pdf
TF (ToF; Time of Flight). https://www.sparkfun.com/products/19421
- Range ~100 m
- Resolution ~0.01 m/ Accuracy 0.1 m.
- Frame rate 1Hz - 1000 Hz
- wavelength: 905 nm. Laser class 1 (IEC 60825)
- Angle 0.5 deg; Spot size @100 m 28x28 cm2.
- Current ˝200 mA. Power ~1W
- Dimensions 44x43x32 mm3.
- Weight 77g
- IP67
- Mounting holes for M3 screws
- Connector: Molex 1.25 or Molex SD-51021-007 (1.25 W/B) 7 pin or mh1.25-7p. Pin to pin pitch is 1.25 mm. Identity electrical connectors: https://core-electronics.com.au/guides/Identify-Electrical-Connectors/#Molex
See more
- https://cdn.sparkfun.com/assets/2/c/5/6/0/Benewake_10152020_TF03_100-1954064.pdf
- https://cdn.sparkfun.com/assets/4/e/5/b/5/PM-15180.pdf
Need to measure angle. Use an accelerometer
Note the laser safety. Check whether the power supply is working properly, and whether the voltage level is kept within the range of the rated input voltage. If the power supply is normal, the TF03 lens will display a faint red light.
No | Color | Standard: Pin | Standard: Function | RS485: PIN | RS485: Function |
---|---|---|---|---|---|
1 | Red | Vcc | Power | Vcc | Power |
2 | White | CAN_L | CAN_L | RS485-B/RS232-RX | Receive |
3 | Green | CAN_H | CAN_H | RS485-B/RS232-TX | Transport |
4 | |||||
5 | Blue | UART_RX | Receive | UART_RX | Receive |
6 | Brown | UART_TX | Transport | UART_TX | Transport |
7 | Black | GND | Ground | GND | Ground |
The standard version of TF03 supports both, UART and CAN communication interface. The default interface is UART. The CAN mode can be set by sending command, but two interfaces cannot output simultaneously.
The default TX/RX pins on an Arduino board are the D0(RX) and D1(TX) pins.
Data bit | Definition | Description |
---|---|---|
Byte0 | Frame Header | 0x59 |
Byte1 | Frame Header | 0x59 |
Byte2 | DIST_L | DIST low 8-bits |
Byte3 | DIST_H | DIST high 8-bits |
Byte4 | Reserved | |
Byte5 | Reserved | |
Byte6 | Reserved | |
Byte7 | Reserved | |
Byte8 | Checksum | Checksum = Byte0 + Byte2 + ... 0 Byte7 |
Lidar & Arduino
Connections
- Arduino: D0 (RX), TF03: 6 (Brown, UART TX)
- Arduino: D1 (TX), TF03: 5 (Blue, UART RX)
The serial port version of TF03 adopts UART-LVTTL interface, and the output level is LVTTL level (0-3.3V).
Lidar Voltage: 5 - 24 V (https://cdn.sparkfun.com/assets/2/c/5/6/0/Benewake_10152020_TF03_100-1954064.pdf); Current 150 mA @ 5V, 80 mA @ 12V, 50 mA @ 24 V. Power consumption: 1 W.
Communication protocol UART
- Baud rate 115200
- Data bit 8
- Stop bit 1
- Checksum bit None
void setup(){
Serial.begin(9600);
Serial1.begin(11200);
}
void loop(){
while (Serial1.available() > 0) {
char receivedChar = Serial1.read();
Serial.println(receivedChar);
}
}}
See also https://lastminuteengineers.com/tfmini-s-lidar-sensor-arduino-tutorial/
IMU
MPU-6050 accelerometer and gyroscope and temperature.
SD card logger
Lot of different versions and vendors. Use SD and SPI libraries. Most of them uses 3.3 V but some modules contains voltage regulator (eg AMS1117-3V3) to supply the 3.3 V and level translator from 5V to 3.3V.
Some modules (eg DS1307 or the newer version PCF8523) contains Real Time Clock. This module works with I2C. For programming, see JeeLab's RTC library.
See eg https://learn.adafruit.com/adafruit-data-logger-shield/using-the-sd-card , https://randomnerdtutorials.com/guide-to-sd-card-module-with-arduino/
Note the memory usage; see Global memory reduction when using spi sd
- the flash area is partitioned between usable app (roughly sketch code) space and usable filesystem space.
- The Arduino SD library uses an internal file block caching (512 bytes) to improve performance. It is possible to read directly from a file block on the SD but that would be very slow. Every 16 bytes read would require reading from file block, discharging all preceding bytes (as the file block is read serially), reading the 16 bytes, and then stopping the block read.