Navigation

    • Register
    • Login
    • Search
    • OpenHardware.io
    • Categories
    • Recent
    • Tags
    • Popular
    1. Home
    2. GaryStofer
    • Profile
    • Following
    • Followers
    • Topics
    • Posts
    • Best
    • Groups

    GaryStofer

    @GaryStofer

    5
    Reputation
    29
    Posts
    795
    Profile views
    0
    Followers
    0
    Following
    Joined Last Online

    GaryStofer Follow

    Best posts made by GaryStofer

    • ArduinoProMini to nRF24L patch PCB with battery holder and Switch

      I made a little PCB that connects an Arduino ProMini i.e. see here with a nRF24L module and contains two LEDs one Switch and a voltage divider to measure the battery voltage. The board can be ordered from here OSH PCBs for about $3 for 3 PCBs, in the US at least.

      Send me a message if you want the Eagle PCB files.

      See schematic below -- follow notes on schematic -- Do not power with 5V serial adapter, radio will not like 5V.

      Schematic.png There is a slight silkscreen mistake on the pcb near SV2: Mosi should read Miso.

      Pro mini used : ArdProMini.JPG

      New Pro Mini atmega328 5V 16M Replace ATmega128 Arduino Compatible Nano SU

      $1.90
      Sold out
      posted in Hardware
      GaryStofer
      GaryStofer
    • X10 lights and appliance control via X10-RF protocol from MySensor gateway

      I made a MySensor gateway node that works as a bridge to an existing X10 system. It allows to control the X10 light and appliance modules from the home automation software. The setup consists of a X10 remote which has been modified so that the digital signal from the gateway keys the transmitter. The X10 controller then receives the data package and does it's thing on the AC line to control the switches. Any existing X10 remote or alarm sensor can be used. I had an old key-fob with broken buttons that became the donor transmitter. When hacking the remote one looks for the signal from it's IC that normally keys the transmitter and disconnects that to feed the signal from the MySensor node instead. A scope is handy to find which pin is the right one.

      The GIT with the Arduino script for the Gateway/X10 controller can be found at [https://github.com/garyStofer/MyMySensors2.1] . The X10 house code is hard-coded to 'A" and I limited the number of switches arbitrarily to 12, but the avid Arduino enthusiast will quickly see how to modify the code to suit. It is not necessary that the X10 part be implemented on the MySensor gateway, it could just as well be done on a separate node.

      If there is any interest I will add some pictures and schematics.

      posted in My Project
      GaryStofer
      GaryStofer
    • RE: Started with MySensors and about to give up (some feedback)

      @alex28 Hi Alex, sorry for your frustration.

      I think documentation, either incomplete or outdated, is the crux of most open source projects.

      I can not speak to the Hardware you used to try to get a network up as I have stuck to the more simple approach of using the simple Arduino ( ATmel328P) nodes for both sensors, repeaters and gateways, while using a RPI as the network controller with something like Domoticz running on it. I started years ago , even before the RFM069 was an option and made PCBs that incorporate the NRF24 and the ATMEL 328P along with the necessary voltage regulators etc. Maybe it was easier to get started then because there where less options and less misleading documentation was available, but I don't recall running into any problems worthwhile of mentioning or having the level of frustrations you have encountered.

      I have two sites running with 8 and 12 nodes each. All sensors running on batteries. The range of the NRF24 is limited in that I only get through one or two sheet rock walls inside the house, but using the NRF24 module with the built in PA/LNA on the gateway and one repeater opened up the range considerably. I'm fairly positive that all the NRF modules I have a re clones....

      I use the serial gateway on the Atmel328p and connect that directly to the serial port of the Rpi Zero-W, without USB adapters then run Domoticz on the PI to get onto the internet .

      If you look on OSH - PCB you will find many good PCBs that you can make MYsensors nodes with using the more simple Arduino platform.

      Most of my frustrations stemmed from the Linux configuration for the RPI so that it doesn't clobber the SD card on surprise power failure.

      Cheers -- Gary

      posted in General Discussion
      GaryStofer
      GaryStofer
    • RE: [SOLVED] NRF24 Sniffer and V2.1 Library

      @Yveaux So I found the problem now.

      The disconnect between the sniffer and the network running V2.1 stemmed from the change in the way the NETWORK_BASE_ID is defined.

      In the sniffer and V1.51 of the lib it is defined as a single uint64_t but in the V2.1 lib it is defined as a list of 5 individual bytes which are then later used to initialize a 5 byte char array via a macro.

      Since earlier I had chosen a different NETWORK_BASE_ID from the default this uint64_t defined ID was now used to initialize the 5 byte array, except of course that only the first location got assigned anything. Luckily all of this happened without a compiler warning or error...

      After I changed the NETWORK_BASE_ID in my nodes & gateway to use the 5 individual bytes format in the correct order everybody is all 😄 again. Even my V1.51 sensors that have not been recompiled yet seem to be just fine with the network.

      Thanks

      posted in Hardware
      GaryStofer
      GaryStofer

    Latest posts made by GaryStofer

    • RE: Started with MySensors and about to give up (some feedback)

      For people who like a clean PCB sensor or serial gateway node based on Atmel 328P for battery or 5-12V operation check out the PCB I made here on https://oshpark.com/shared_projects/5RV25Fc0. It incorporates the voltage regulators , capacitors and connector to simply plug in a NRF24 module and be done with it. Soldering is required but not terribly difficult. I usually just depopulate an Arduino nano for most of the parts ...

      posted in General Discussion
      GaryStofer
      GaryStofer
    • RE: Started with MySensors and about to give up (some feedback)

      @alex28 Hi Alex, sorry for your frustration.

      I think documentation, either incomplete or outdated, is the crux of most open source projects.

      I can not speak to the Hardware you used to try to get a network up as I have stuck to the more simple approach of using the simple Arduino ( ATmel328P) nodes for both sensors, repeaters and gateways, while using a RPI as the network controller with something like Domoticz running on it. I started years ago , even before the RFM069 was an option and made PCBs that incorporate the NRF24 and the ATMEL 328P along with the necessary voltage regulators etc. Maybe it was easier to get started then because there where less options and less misleading documentation was available, but I don't recall running into any problems worthwhile of mentioning or having the level of frustrations you have encountered.

      I have two sites running with 8 and 12 nodes each. All sensors running on batteries. The range of the NRF24 is limited in that I only get through one or two sheet rock walls inside the house, but using the NRF24 module with the built in PA/LNA on the gateway and one repeater opened up the range considerably. I'm fairly positive that all the NRF modules I have a re clones....

      I use the serial gateway on the Atmel328p and connect that directly to the serial port of the Rpi Zero-W, without USB adapters then run Domoticz on the PI to get onto the internet .

      If you look on OSH - PCB you will find many good PCBs that you can make MYsensors nodes with using the more simple Arduino platform.

      Most of my frustrations stemmed from the Linux configuration for the RPI so that it doesn't clobber the SD card on surprise power failure.

      Cheers -- Gary

      posted in General Discussion
      GaryStofer
      GaryStofer
    • RE: 2AAA battery NRF24 Sensor PCB with ATmega 328p

      @neverdie said in 2AAA battery NRF24 Sensor PCB with ATmega 328p:

      Hmmm ... is that accurate? I thought digital LO may be higher than actual GND.

      Yes, perfectly accurate. The output stage is a FET switch and the current it switches to GND is ~2 micro amps, It's 0V. One could measure the VCC an other way not needing a voltage divider by configuring the ADC so that it uses the VCC as the reference and then measure the internal 1.1V reference. However that takes re-configuring the ADC each time into and out of this mode if you need the ADC for other measurements as well and doesn't save any pins.

      posted in My Project
      GaryStofer
      GaryStofer
    • RE: 2AAA battery NRF24 Sensor PCB with ATmega 328p

      @neverdie
      The LDO is only used when running from 5 or 12V supplies. Cant measure 3.3V with a 1.1V reference .

      posted in My Project
      GaryStofer
      GaryStofer
    • RE: 2AAA battery NRF24 Sensor PCB with ATmega 328p

      On this board I use a resistor voltage divider with the low end connected to a digital pin instead of ground. When a voltage reading is to be obtained the digital pin is commanded to become an output and set low, then wait for the filter capacitor to charge, take the reading and set the pin back to input. The same digital pin also has the push button switch connected which is checked elsewhere in the code, in that case the two resistors making up the voltage divider become the pull-up resistor for the switch . So the resistors and digital pin serve double duty. The internal reference of the 328p ( 1.1V ) is used as the reference for the ADC , which results in a very precise result.
      0_1574438687721_nrfMySensor_v1.2.png

      posted in My Project
      GaryStofer
      GaryStofer
    • 2AAA battery NRF24 Sensor PCB with ATmega 328p

      Here is a MySensor node implementation on a PCB that can be ordered at OSHPARK.com. It contains a "Arduino pro - mini" chip( ATmega 328p) and has the footprint for a nrf24 radio built in as well as footprints for the necessary voltage regulators and capacitors if the node is to be run from 5V or 7-12V supplies. The Bat+/Bat- solder positions take either a 2 AAA or a 2 AA battery case. When used as a battery operated node, for example as a door/window sensor the batteries last about 2 years. The node has a built in way of measuring the battery voltage that doesn't itself deplete the battery slowly and features two LEDs driven from one digital pin.

      The PCB's can be ordered at OSHPARK.com in the US , search in the shared project for "nrfMysensor. They cost around $9 per 3. Soldering is not too terribly hard. The smallest components are the two LEDs which can be left out. The arduino chip can be "harvested" from a pro/mini board, either the 8mhz/3.3V version for battery operation or the 16mhz/5V version for 5V-12V operation. Or load the appropriate bootloader onto a blank chip.

      The EagleCAD board and schematic files can be found here :https://github.com/garyStofer/Eagle5_PCB/tree/master/nRF_Mysensor. The schematic contains notes on various build options.

      Some example of using the boards in a battery scenario can be found here https://github.com/garyStofer/MyMySensors2.1 Wire_Trip_alarm and PIR_alarm_PCint

      nrfMySensor

      posted in My Project
      GaryStofer
      GaryStofer
    • sleep(0) in V2.1 doesn't sleep indefinitely anymore. Used to powerdown and sleep in V1.5

      For battery powered nodes that need to completely sleep between events sleep(0) could be used in V1.5 in conjunction with the pin change interrupts on portC of an ATmega 328p. It would gracefully power down the radio and then enter the CPU into sleep mode until a pin change event on port C woke it up. In V2.1 sleep(0) simply returns. PortC pin-change mode is needed because INT0 and INT1 only work on either falling or raising level changes but not on either edge at the same time on the 328p .

      I modified the file MyHwAVR.cpp as follows to restore the missing functionality back into V2.1 : Lines 150 and up:

      int8_t hwSleep(unsigned long ms)
      {
      
      
      	if (ms>0) {
      		// sleep for defined time
      		hwInternalSleep(ms);
      		return MY_WAKE_UP_BY_TIMER;
      	} else {  // Fix for missing feature that allowed (in 1.5.1) to use the pin chnage interrupt with a sleep(0) to completely power down the system
      		// sleep until ext interrupt triggered
      		hwPowerDown(SLEEP_FOREVER);
      		return 0;
      	}
      
      
      }
      

      Let me know if this is the correct venue to bring this to the attention of the code maintainers, or if I should go and furnish a git pull request or something like that.

      Or if this has been addressed in post V2.1.1 releases
      Thanks
      gary

      posted in Bug Reports
      GaryStofer
      GaryStofer
    • X10 lights and appliance control via X10-RF protocol from MySensor gateway

      I made a MySensor gateway node that works as a bridge to an existing X10 system. It allows to control the X10 light and appliance modules from the home automation software. The setup consists of a X10 remote which has been modified so that the digital signal from the gateway keys the transmitter. The X10 controller then receives the data package and does it's thing on the AC line to control the switches. Any existing X10 remote or alarm sensor can be used. I had an old key-fob with broken buttons that became the donor transmitter. When hacking the remote one looks for the signal from it's IC that normally keys the transmitter and disconnects that to feed the signal from the MySensor node instead. A scope is handy to find which pin is the right one.

      The GIT with the Arduino script for the Gateway/X10 controller can be found at [https://github.com/garyStofer/MyMySensors2.1] . The X10 house code is hard-coded to 'A" and I limited the number of switches arbitrarily to 12, but the avid Arduino enthusiast will quickly see how to modify the code to suit. It is not necessary that the X10 part be implemented on the MySensor gateway, it could just as well be done on a separate node.

      If there is any interest I will add some pictures and schematics.

      posted in My Project
      GaryStofer
      GaryStofer
    • RE: MySensors weather station

      @dbemowsk Initially I uses an AS5030 encoder, but then I switched to the EM-3242 as it's much cheaper and smaller and does the same. My board has an Op-amp inverter to change the sense of angle to voltage so that the magnet can run on the top of the chip rather than on the bottom. Only problem we had with the EM-3242 was that it has no hysteresis which shows up at the 360/0 junction.

      posted in Enclosures / 3D Printing
      GaryStofer
      GaryStofer
    • RE: MySensors weather station

      I did some wind speed and direction sensor boards that I use in my own weather station design. All solid state and high resolution with analog signal readout, voltage for direction, 8 pulse per rev for speed. For inspiration see http://wws.us.to. Gary

      posted in Enclosures / 3D Printing
      GaryStofer
      GaryStofer