Shinji
Published © GPL3+

Off-grid Waterproof Protection for Field Prototype Tests

Off-grid Waterproof Protection for Field Prototype Tests using a Solar Panel, Mobile Battery and a Ethernet Cable

BeginnerFull instructions provided24 hours42
Off-grid Waterproof Protection for Field Prototype Tests

Things used in this project

Hardware components

Plastic Enclosure, Precision Miniature Case
Plastic Enclosure, Precision Miniature Case
×1
desiccant (Diatomaceous earth reccomended)
×1
Mobile Battery (commercially available in Japan)
A battery with overcharge and over-discharge protection and a capacity of around 3000mAh is sufficient. PSE certification is generally all that's needed.
×1
LED string illumination
Used for the pass-through test. The link is Japanese one but anything that can be powered via a USB Type-A plug will be available.
×1
Empty wine bottle
We'll make a makeshift pass-through test lamp by packing it with LED strings. Make sure to use an empty wine bottle. I used a small bottle of red wine that I bought at a hotel during my first business trip to Germany. After the test, you can continue to use it as a bedside lamp.
×1
Solar Panel, 3.5W, micro USB
×1
Ethernet Cable, 1 m
Ethernet Cable, 1 m
×1
RJ45 breakout board
Used to sensor or LED devices
×1
RJ45 breakout board for bread board
Used in main plastic enclosure
×1
Supercapacitor, 0.22 F
Supercapacitor, 0.22 F
I bought a supercapacitor 5.5V - 0.22F from uxcell Japan.
×1

Software apps and online services

VS Code
Microsoft VS Code

Hand tools and fabrication machines

Cut-resistant gloves
This is needed absolutely to save your fingers to be lost.
Hot glue gun (generic)
Hot glue gun (generic)
Drill / Driver, Cordless
Drill / Driver, Cordless
Multitester
This is used to test the continuity of each core wire in an Ethernet cable. Any device capable of measuring resistance can be used.

Story

Read more

Schematics

The schematic

The schematic diagram of the immortal field prototype.

Code

Introducing the Watchdog Timer

C/C++
Code Snippet for introducing the watchdog timer in the pico-sdk
#include "hardware/watchdog.h"
// In a loop
  // Long processing time of up to 5 seconds
  int state = cyw43_arch_wifi_connect_timeout_ms(
              WIFI_SSID, WIFI_PASSWORD, CYW43_AUTH_WPA2_AES_PSK, 5000
  );
  // Always feed your guard dog after a long period of work.
  watchdog_update();
  // If you absolutely need them to sleep for more than 8 seconds,
  // you can use a for loop.
  for (int i = 0; i < 10; i++) {
    sleep_ms(1000);
    watchdog_update(); // Do not forget feeding
  }

High Side Switching

C/C++
The high side switching for defeating the ghost of LEDs
// Define pin numbers depending on your microcontroller board
const uint LED_SOURCE  = 17;
const uint LED_RED     = 13;
const uint LED_GREEN   = 14;
const uint LED_BLUE    = 15;

// Make a function to turn off all LEDs
void turn_off_all_leds(void) {
    gpio_put(LED_SOURCE, 0);
    gpio_put(LED_RED, 1);
    gpio_put(LED_GREEN, 1);
    gpio_put(LED_BLUE, 1);
}

// Make a function to ready all LEDs
void ready_all_leds(void) {
    gpio_put(LED_SOURCE, 1);
    sleep_ms(20);
}

// Use above functions in controlling LEDs
void haniwa_led_blink_red(int seconds) {
    // Call "ready" at first
    ready_all_leds();
    for (int i = 0; i < seconds; i++) {
        gpio_put(LED_RED, 0);
        sleep_ms(500);
        gpio_put(LED_RED, 1);
        sleep_ms(500);
        watchdog_update();
    }
    // Call "turn-off" immediately after use to save energy
    turn_off_all_leds();
}

HANIWA-Guardian

Source codes for haniwa guardian

Credits

Shinji
4 projects • 0 followers
Ph. D. in Engineering, Optics, 3D Holograms. Designer for High Power Laser Manufacturing Systems. Project Leader regarding Metal AM Monitor.

Comments