Bliksem: Difference between revisions

From RevSpace
Jump to navigation Jump to search
No edit summary
No edit summary
 
(4 intermediate revisions by the same user not shown)
Line 25: Line 25:


== Hardware ==
== Hardware ==
Pins:
 
* MOSI/SDA -> ESP8266 D7
{| class="wikitable"
* MISO -> ESP8266 D6
!AS3935!!Wemos D1 mini
* SCK/SCL -> ESP8266 D5
|-
* IRQ -> ESP8266 D2
|MOSI/SDA||D7
* SI -> ESP8266 D3
|-
* CS -> ESP8266 D8
|MISO||D6
* GND -> ESP8266 GND
|-
* Vdd -> ESP8266 3.3V
|SCK/SCL||D5
|-
|IRQ||D2
|-
|SI||D1
|-
|CS||D8
|-
|GND||GND
|-
|Vdd||3.3V
|}


== Software ==
== Software ==
Runs on an ESP8266, no source code available...
New source code: [https://github.com/bertrik/bliksem bliksem on github]


Most recently updated code appears to be:
Features:
https://github.com/sparkfun/SparkFun_AS3935_Lightning_Detector_Arduino_Library
* hardware is configured in SPI mode
* uses sparkfun AS3935 library
* AS3935 is used with default settings, we add some extra detection for spurious lightning:
** ignore anything but the lightning interrupt (chip/library still triggers spurious interrupts from time to time)
** distance has to be > 1 km, energy has to be > 0
* syncs time using NTP
* publishes on MQTT as a simple JSON message:
** status topic "revspace/sensors/bliksem/<chipid>/status": can be "online" or "offline"
** value topic "revspace/sensors/bliksem/<chipid>/bliksem": contains a JSON string of the most recent detection, e.g. {"time":1566721631,"distance":8,"energy":44229}


=== old stuff ===
Output from existing binary:
Output from existing binary:
<pre>
<pre>
Line 79: Line 99:
(Re-)connecting MQTT
(Re-)connecting MQTT
</pre>
</pre>
Output from the built-in web page:
  Latest strike: 1953460078 (seconds sinds epoch) at 117km

Latest revision as of 10:28, 25 August 2019

Status

2017/07/21: ding is besteld!

2017/11/24: ding hangt en doet 't! mqtt topic revspace/bliksem/16166904

2018/05/10: er zit een web-page op (http://10.42.45.122/) die vertelt wanneer de laatste bliksem was en de afstand ook. ook doet-ie mdns dus je moet 'm kunnen vinden zonder dhcp-inzage

Wat is het

Laten we blikseminslagen in een omtrek van 40km op een of andere manier zichtbaar maken in de space.

Dat op basis van een AS3935 sensor. Flok koopt 'm en soldeert er een Wemos D1 aan vast en doet er mqtt software op.

Wie doet mee

  • Flok: 10e + wemos d1
  • Jelle: 10e
  • Lukkie: 10e
  • Benadski: 6e
  • Gori : 5e

S-l300.jpg

Op ebay: http://www.ebay.com/itm/232111328523 let op de portokosten! E.e.a. kost qua geld 40,45 dollar (inclusief verzendkosten). Dat is ongeveer 35,16 euro.

Hardware

AS3935 Wemos D1 mini
MOSI/SDA D7
MISO D6
SCK/SCL D5
IRQ D2
SI D1
CS D8
GND GND
Vdd 3.3V

Software

New source code: bliksem on github

Features:

  • hardware is configured in SPI mode
  • uses sparkfun AS3935 library
  • AS3935 is used with default settings, we add some extra detection for spurious lightning:
    • ignore anything but the lightning interrupt (chip/library still triggers spurious interrupts from time to time)
    • distance has to be > 1 km, energy has to be > 0
  • syncs time using NTP
  • publishes on MQTT as a simple JSON message:
    • status topic "revspace/sensors/bliksem/<chipid>/status": can be "online" or "offline"
    • value topic "revspace/sensors/bliksem/<chipid>/bliksem": contains a JSON string of the most recent detection, e.g. {"time":1566721631,"distance":8,"energy":44229}

old stuff

Output from existing binary:

scandone
state: 0 -> 2 (b0)
state: 2 -> 3 (0)
state: 3 -> 5 (10)
add 0
aid 8

connected with revspace-pub-2.4ghz, channel 9
dhcp client start...
cnt 
ip:10.42.43.11,mask:255.255.0.0,gw:10.42.42.1
Playing With Fusion: AS3935 Lightning Sensor, SEN-39001
beginning boot procedure....
set up for indoor operation
capacitance set to 8x13
AS3935 manual cal complete
Reg 0x00: 36
Reg 0x01: 34
Reg 0x02: 194
Reg 0x03: 32
Reg 0x04: 0
Reg 0x05: 0
Reg 0x06: 0
Reg 0x07: 63
Reg 0x08: 13
0
*WM: 
*WM: AutoConnect
*WM: Connecting as wifi client...
*WM: Already connected. Bailing out.
*WM: IP Address:
*WM: 10.42.43.11
MDNS responder started
Go!
(Re-)connecting MQTT

Output from the built-in web page:

 Latest strike: 1953460078 (seconds sinds epoch) at 117km