發表文章

目前顯示的是 2021的文章

LoraGateway with RAK2245 and Pi zero W

圖片
  I have a rak2245 pi hat,  it's designed for pi3, but I wish to use on pizero W, since a simple forwarder won't use too much power. After the assembly, the search start! Documentation from RAKwireless:  https://downloads.rakwireless.com/LoRa/RAK2245-Pi-HAT/ page of start guide:  https://docs.rakwireless.com/Product-Categories/WisLink/RAK2245-Pi-HAT/Quickstart/ the firmware is made for pi3+ or Pi4. to apply to pi zero W, you have to be careful with gateway EUI, since the TTN gateway EUI is a manipulation of Mac(add FF FE in middle), the firmware use ether mac, you have to choose wireless wlan0 on zero W. RAKwireless also make a pi zero w gateway as wise Gate Developer D0+ WisGate Developer D0+ is a LoRaWAN® developer gateway with GPS function. It is a device composed of a the RAK2246 Pi HAT LPWAN Concentrator module and Raspberry Pi Zero W. Class A and C compliant based on Semtech ®  SX1308 chip https://docs.rakwireless.com/Product-Categories/WisGate/RAK7246G/Overview/ while l

LTM light weight telemetry

 https://github.com/iNavFlight/inav/wiki/Lightweight-Telemetry-(LTM) start with $T, followed by function byte, then payload, end with CRC(XOR of payload bytes) Function Byte Usage Frequency G GPS Frame 5Hhz at > 2400 baud A Attitude Frame 10 Hz at > 2400 baud S Status Frame 5Hhz at > 2400 baud O Origin Frame 1 Hz rate N Navigation Frame (iNav extension) ~4 Hz rate X GPS eXended data (iNav extension) 1 Hz rate https://ardupilot.org/rover/docs/common-ltm-telemetry.html Good example on decodeing LTM https://github.com/vierfuffzig/LTM2MAVLink/blob/master/LTM2MAVLink/LTM2MAVLink.ino * LightTelemetry protocol (LTM) * * Ghettostation one way telemetry protocol for really low bitrates (1200/2400 bauds). * * Protocol details: 3 different frames, little endian. * G Frame (GPS position) (2hz @ 1200 bauds , 5hz >= 2400 bauds): 18BYTES * 0x24 0x54 0x47 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xC0 * $ T G --------LAT---

Sensor fusion MPU6050

 https://github.com/kriswiner/MPU6050/wiki/Affordable-9-DoF-Sensor-Fusion Attitude Heading Reference System (AHRS) https://github.com/kriswiner/MPU6050 most of the lib on 6050 are based on I2Cdev: for arduino you need this one: https://github.com/jrowberg/i2cdevlib/tree/master/Arduino/MPU6050 also you need this in your folder https://github.com/jrowberg/i2cdevlib/tree/master/Arduino/I2Cdev For the IIC connection, directly read out sensor data seems to be fine. But when I use interrupt of esp8266on DMP, from time to time, it fails on IIC. lower the speed does not help... I switch back to pro mini, it works fine....even with a IIC OLED

Current sensing WCS1700 with arduino 328P

圖片
 I have made one years ago with Allegro (ASC 750?) current sensor on a arduino  5V 328 with zigbee for wireless. it was a RC project for testing duck fan current in a safe distance. it was 2011.. This time I wish to make one for my electrical motorbike(Soco TC). the battery pack is 72V 30Ah, the motor is about 3Kw. But seeing the wiring and performance I don't think it would delivey 3Kw... This time, I use Winson WCS1700 current sensor It's a very similar sensor, you don't need to cut you wire but you have to find a way to pass the hole. if you look at the sheet, you may believe it will measure current like: A=1/2Vdd+(Vout-1/2Vdd)*1000/33 But above table lack of data of operating the sensor on other voltage. Winson provide 2 set of testing data, one for 5V operation and on e for 3.3V operation. This make thing more clear: 1. the zero current voltage is not exactly 1/2 Vdd, it's 2.4677 for 5V Vdd(a little bit less than 1/2 Vdd), and 1.7323 for 3.3Vdd(a little more than 1