• RE: Best VOC sensor for detecting a wide range of VOC's?

    @eiten I haven't yet made any progress on finding a good VOC sensor, but along the way I did find out something interesting regarding CO2: namely, if you sleep with your bedroom door closed at night, then the odds are good that the CO2 levels rise to surprisingly high and unhealthy levels.

    The better CO2 sensors are factory calibrated and never again need recalibration for the life of the sensor (usually around 10 years or so), because they are used in HVAC systems to control fresh air intake to guarantee indoor air quality. As a for instance, here is one such CO2 sensor: https://www.digikey.com/en/products/detail/senseair/006-0-0008/15790694 At around $50 for just the sensor element itself, it's not exactly cheap, but then again, I'd say it's worth it, because who wants to be burdened by remembering to calibrate their CO2 sensors?

    Ideally, I'd like to find a sensitive VOC sensor that also will never require calibration.

    Nearly all, and maybe all, of the off-the-shelf IAQ montoring stuff that you might buy for, say, $300 or less seems to require periodic calibration. For that reason, this might be one of those occasions where build is rather than buy.

    posted in Hardware
  • Best VOC sensor for detecting a wide range of VOC's?

    I purchased a number of different consumer-ready off-the-shelf VOC monitors (priced in the range of $100-$300) from amazon for detecting the presence of VOCs (volatile organic compounds) in the air, and I'm finding that most of them detect very little of what's in the air, even if it's something I can plainly smell. 😞 What I want is a sensor (a canary in the coal mine) that will alert me as to whether there might be something in the air that I should be concerned about. From that point I would then have the somewhat arduous job of figuring out what it is. However, if I don't know it's there in the first place, then I'll never know to look further. So, I guess what I'm looking for is a sensor that's sensitive to a wide assortment of VOCs. Any recommendations?

    posted in Hardware
  • RE: CNC PCB milling

    Of possible interest: Here's a guy who is building an inexpensive open source ethernet controller for stepper motors:
    What happend to Ethersweep? Project Update! – 12:36
    — Neumi

    If you listen to the end, it's revealed that there is now generous funding available which allows people to do this kind of open-source development as a full time job, which is what he is now doing. For that reason, I think there's a good chance he will complete his project within the allowed 6 months., and so by the deadline it will likely be nicely polished.

    posted in General Discussion
  • RE: Awesome tip: run LinuxFX instead of Windows!

    @skywatch said in Awesome tip: run LinuxFX instead of Windows!:

    @NeverDie Thanks - Interestingly they show a free version on their site still. Did they revert due to bad publicity?

    https://www.linuxfx.org/

    I stopped following it, but I seem to recollect that the free version was noticeably missing things--otherwise, who'd buy the paid-for version? Anyway, its standing on Distro-watch has fallen considerably. It may seem unfair to niche distros, but I think it's generally better to stick with the more popular distros, unless you have good reason to choose otherwise.

    posted in General Discussion
  • RE: NewbiePCB sensors dying of old age

    Some humidity sensors are known to lose accuracy with age. For instance, the Si7021 is known to have this problem. If that matters to you, then the best choice is to pick sensors that have datasheets and which have specs as to their expected longevity or accuracy over time. Then buy from mouser/digikey to be certain you're getting the real thing rather than factory rejects or counterfeits.

    For extra insurance, I avoid electrolytic capacitors entirely whenever possible. I buy only 7XR rated ceramic capacitors that are overspec'd. The difference in price is small compared to a failure down the road.

    posted in General Discussion
  • RE: Awesome tip: run LinuxFX instead of Windows!

    @skywatch said in Awesome tip: run LinuxFX instead of Windows!:

    @NeverDie So how is it going for you? Have you tried USB devices with it? Did they work well? I am thinking of being able to run Win x64 SDR software on this but still wonder if it will work - Will try it out as soon as I can and report back. Meantime any hints or opinions you have would be good if you can share.

    Sometime after I made the original post the LinuxFX people decided they wanted to charge people money for their flavor of the OS. As near as I can tell, it kinda imploded after that. So, I settled on Linux Mint (Cinnamon version), and I'm happy with it. I still use Windows for programs that are only supported to run under windows, like Fusion360, rather than try to use wine to get it to run under Linux, but for everything else Linux Mint works great. Fast, stable, and without all the sluggishness you typically get (sooner or later) with Windows.

    posted in General Discussion
  • Using chatgpt to write code for the nrf52840....

    I haven't confirmed whether the offered solution will work or not, but it took only one second to generate, so on that basis alone I'm impressed.

    Anyone here using chatgpt for actual coding of any kind?

    By way of example, I gave this prompt:

    Without using zephyr, write a program for the nrf52840 to send a "Happy Birthday!" text message using the proprietary radio mode.
    

    and chatgpt's response was:

    To send a "Happy Birthday!" text message using the nRF52840 in proprietary radio mode without using the Zephyr RTOS, you can use Nordic Semiconductor's nRF5 SDK. Here's a basic example of how to create a custom radio communication program for the nRF52840. Please note that this code is a simplified example, and in a real-world scenario, you would implement error handling and more robust communication protocols.

    Transmitter (TX) Code:

    #include <stdint.h>
    #include <stdbool.h>
    #include "nrf.h"
    #include "nrf_gpio.h"
    
    #define RADIO_CHANNEL 76  // Choose a custom channel
    
    void radio_init(void) {
        NRF_RADIO->TXPOWER = RADIO_TXPOWER_TXPOWER_0dBm;
        NRF_RADIO->FREQUENCY = RADIO_CHANNEL;
        NRF_RADIO->MODE = RADIO_MODE_MODE_Nrf_2Mbit;
        NRF_RADIO->SHORTS = 0;
        NRF_RADIO->PCNF0 = (1 << RADIO_PCNF0_LFLEN_Pos);
        NRF_RADIO->PCNF1 = (1 << RADIO_PCNF1_WHITEEN_Pos) | (3 << RADIO_PCNF1_BALEN_Pos);
        NRF_RADIO->BASE0 = 0xE7E7E7E7;
        NRF_RADIO->BASE1 = 0x43434343;
        NRF_RADIO->PREFIX0 = 0x55443322;
        NRF_RADIO->TXADDRESS = 0x00;
        NRF_RADIO->RXADDRESSES = 0x01;
    }
    
    void radio_send(const uint8_t *data, uint8_t length) {
        NRF_RADIO->PACKETPTR = (uint32_t)data;
        NRF_RADIO->EVENTS_READY = 0;
        NRF_RADIO->EVENTS_END = 0;
    
        NRF_RADIO->TASKS_TXEN = 1;
        while (NRF_RADIO->EVENTS_READY == 0);
    
        NRF_RADIO->TASKS_START = 1;
    
        while (NRF_RADIO->EVENTS_END == 0);
        NRF_RADIO->EVENTS_END = 0;
    
        NRF_RADIO->TASKS_DISABLE = 1;
        while (NRF_RADIO->EVENTS_DISABLED == 0);
    }
    
    int main(void) {
        nrf_gpio_cfg_output(20); // LED on pin 20
    
        radio_init();
    
        while (1) {
            // Message to send
            uint8_t message[] = "Happy Birthday!";
            uint8_t message_len = sizeof(message) - 1; // Exclude null-terminator
    
            // Send the message
            radio_send(message, message_len);
    
            // Toggle an LED to indicate a transmission
            nrf_gpio_pin_toggle(20);
    
            // Delay between transmissions
            for (int i = 0; i < 1000000; i++) {
                __NOP();
            }
        }
    }
    

    Receiver (RX) Code:

    #include <stdint.h>
    #include <stdbool.h>
    #include "nrf.h"
    #include "nrf_gpio.h"
    
    #define RADIO_CHANNEL 76  // Should match the transmitter's channel
    
    void radio_init(void) {
        NRF_RADIO->TXPOWER = RADIO_TXPOWER_TXPOWER_0dBm;
        NRF_RADIO->FREQUENCY = RADIO_CHANNEL;
        NRF_RADIO->MODE = RADIO_MODE_MODE_Nrf_2Mbit;
        NRF_RADIO->SHORTS = 0;
        NRF_RADIO->PCNF0 = (1 << RADIO_PCNF0_LFLEN_Pos);
        NRF_RADIO->PCNF1 = (1 << RADIO_PCNF1_WHITEEN_Pos) | (3 << RADIO_PCNF1_BALEN_Pos);
        NRF_RADIO->BASE0 = 0xE7E7E7E7;
        NRF_RADIO->BASE1 = 0x43434343;
        NRF_RADIO->PREFIX0 = 0x55443322;
        NRF_RADIO->TXADDRESS = 0x00;
        NRF_RADIO->RXADDRESSES = 0x01;
    }
    
    void radio_receive(uint8_t *data, uint8_t *length) {
        NRF_RADIO->PACKETPTR = (uint32_t)data;
        NRF_RADIO->EVENTS_READY = 0;
        NRF_RADIO->EVENTS_END = 0;
    
        NRF_RADIO->TASKS_RXEN = 1;
        while (NRF_RADIO->EVENTS_READY == 0);
    
        NRF_RADIO->TASKS_START = 1;
    
        while (NRF_RADIO->EVENTS_END == 0);
        NRF_RADIO->EVENTS_END = 0;
    
        NRF_RADIO->TASKS_DISABLE = 1;
        while (NRF_RADIO->EVENTS_DISABLED == 0);
    
        *length = NRF_RADIO->RXMATCH;
    }
    
    int main(void) {
        nrf_gpio_cfg_output(20); // LED on pin 20
    
        radio_init();
    
        while (1) {
            uint8_t message[16]; // Adjust the buffer size as needed
            uint8_t message_len = 0;
    
            // Receive a message
            radio_receive(message, &message_len);
    
            // Toggle an LED to indicate a reception
            nrf_gpio_pin_toggle(20);
    
            // Process the received message (e.g., print it)
            if (message_len > 0) {
                message[message_len] = '\0'; // Null-terminate the received data
                printf("Received: %s\n", message);
            }
        }
    }
    

    This code sets up a transmitter (TX) and receiver (RX) using the nRF52840's radio peripheral. The TX repeatedly sends the "Happy Birthday!" message, and the RX receives and prints any incoming messages. Make sure both devices are configured to use the same radio channel and have matching radio settings.

    Remember to adapt this code to your specific hardware setup and application requirements, and consider adding more robust error handling for a production-quality solution.

    posted in General Discussion
  • RE: Which one should i choose? PIR or microwave sensor

    Supposedly PIR doesn't work through glass (e.g. if looking for motion through a window), whereas I presume a microwave sensor might still work.

    posted in Hardware
  • RE: Anyone using/tried the E28-2G4M27S 2.4Ghz LoRa SX1280 27dB module?

    ^^^This. Good point. Maybe do some testing with RadioLib to see whether or not you experience the same problem.

    posted in General Discussion
  • Looks as though the raspberry pi pico will provide 16-bit PWM duty-cycle resolution

    Contrast that 65535 step resolution to the 255 step duty-cycle resolution on Arduino's, and that is a big improvement for control of, say, a DIY DC-DC converter. For instance, if you want to build your own DIY solar MPPT boost converter (good luck finding one to buy in the commercial market. Probably 99%+ of those are step-down MPPT controllers, with only a rare bird being a step-up MPPT controller). The pi pico's are just $4 each at mouser and Adaruit ( https://www.adafruit.com/product/4864 ) for the genuine article, not some sketchy knock-off. Just thought I'd mention it, as I think most people aren't aware of it. I'm not sure whether or not a more stripped down version of the pi pico would consume significantly less current. If so, then it might be quite compelling: a fully formed pi pico board for $4 vs. an atmega328p chip alone for $3 (note: as a reference, these are present market prices on mouser).

    posted in General Discussion