Navigation

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

    RFM69

    @RFM69

    13
    Reputation
    36
    Posts
    488
    Profile views
    1
    Followers
    0
    Following
    Joined Last Online

    RFM69 Follow

    Best posts made by RFM69

    • RE: Direct pairing of two nodes implementation

      Finally got it working, and starting to understand it, had to change a few things, perhaps because its on latest version of mysensors, or possible because of old values in eproms.

      Thanks for sharing, want to make a few changes or additions to suit my needs will share more as I have something working.

      posted in Development
      RFM69
      RFM69
    • RE: Best CNC for milling/routing wood?

      Or you could try a MPCNC link text. I'm just finishing one myself.

      posted in General Discussion
      RFM69
      RFM69
    • RE: Direct pairing of two nodes implementation

      @monte 🙂 I was wondering if you'd used it or what your experience of it was. I'm also just enjoying learning by doing... but wanted to see the node to node communication working and more easily configurable. I'd like to configure this from the controller also perhaps.

      I've moved much of the functionality to its own class so that it can be more easily added to nodes. Heres what I've got so far.

      I used avdweb_Switch.h to simplify and abstract a little the button press/etc.

      I'd still like to clear up a little and add a few more things, like having multiply nodes paired together etc.

      Its still pretty much your origional code.

      There was a small error that both nodeid & sensorid had to be different from the master and slave paired node... that was in gateway.ico

      Gate Way.ico

      /**
      * The MySensors Arduino library handles the wireless radio link and protocol
      * between your home built sensors/actuators and HA controller of choice.
      * The sensors forms a self healing radio network with optional repeaters. Each
      * repeater and gateway builds a routing tables in EEPROM which keeps track of the
      * network topology allowing messages to be routed to nodes.
      *
      * Created by Henrik Ekblad <henrik.ekblad@mysensors.org>
      * Copyright (C) 2013-2015 Sensnology AB
      * Full contributor list: https://github.com/mysensors/Arduino/graphs/contributors
      *
      * Documentation: http://www.mysensors.org
      * Support Forum: http://forum.mysensors.org
      *
      * This program is free software; you can redistribute it and/or
      * modify it under the terms of the GNU General Public License
      * version 2 as published by the Free Software Foundation.
      *
      *******************************
      *
      * DESCRIPTION
      * The ArduinoGateway prints data received from sensors on the serial link.
      * The gateway accepts input on seral which will be sent out on radio network.
      *
      * The GW code is designed for Arduino Nano 328p / 16MHz
      *
      * Wire connections (OPTIONAL):
      * - Inclusion button should be connected between digital pin 3 and GND
      * - RX/TX/ERR leds need to be connected between +5V (anode) and digital pin 6/5/4 with resistor 270-330R in a series
      *
      * LEDs (OPTIONAL):
      * - To use the feature, uncomment any of the MY_DEFAULT_xx_LED_PINs
      * - RX (green) - blink fast on radio message recieved. In inclusion mode will blink fast only on presentation recieved
      * - TX (yellow) - blink fast on radio message transmitted. In inclusion mode will blink slowly
      * - ERR (red) - fast blink on error during transmission error or recieve crc error
      *
      */
      
      // Enable debug prints to serial monitor
      #define MY_DEBUG
      
      
      // Enable and select radio type attached
      //#define MY_RADIO_NRF24
      //#define MY_RADIO_NRF5_ESB
      #define MY_RADIO_RFM69
      #define MY_RFM69_FREQUENCY RFM69_433MHZ
      //#define MY_RADIO_RFM95
      
      // Set LOW transmit power level as default, if you have an amplified NRF-module and
      // power your radio separately with a good regulator you can turn up PA level.
      #define MY_RF24_PA_LEVEL RF24_PA_LOW
      
      // Enable serial gateway
      #define MY_GATEWAY_SERIAL
      
      // Define a lower baud rate for Arduino's running on 8 MHz (Arduino Pro Mini 3.3V & SenseBender)
      #if F_CPU == 8000000L
      #define MY_BAUD_RATE 38400
      #endif
      
      // Enable inclusion mode
      #define MY_INCLUSION_MODE_FEATURE
      // Enable Inclusion mode button on gateway
      //#define MY_INCLUSION_BUTTON_FEATURE
      
      // Inverses behavior of inclusion button (if using external pullup)
      //#define MY_INCLUSION_BUTTON_EXTERNAL_PULLUP
      
      // Set inclusion mode duration (in seconds)
      #define MY_INCLUSION_MODE_DURATION 60
      // Digital pin used for inclusion mode button
      //#define MY_INCLUSION_MODE_BUTTON_PIN  3
      
      // Set blinking period
      #define MY_DEFAULT_LED_BLINK_PERIOD 300
      
      // Inverses the behavior of leds
      //#define MY_WITH_LEDS_BLINKING_INVERSE
      
      // Flash leds on rx/tx/err
      // Uncomment to override default HW configurations
      //#define MY_DEFAULT_ERR_LED_PIN 4  // Error led pin
      //#define MY_DEFAULT_RX_LED_PIN  6  // Receive led pin
      //#define MY_DEFAULT_TX_LED_PIN  5  // the PCB, on board LED
      
      #include <MySensors.h>
      
      unsigned long currentTime = 0;
      int waitTime = 10000;
      int masterNodeAddr = 0;
      bool masterNodeAddrPresent = 0;
      int masterSensorAddr = 0;
      char str1[8];
      char str2[8];
      bool pairing = 0;
      
      //Messages for answering pairing requests
      MyMessage msg(254,V_VAR2);
      MyMessage msg2(254,V_VAR2);
      
      //Time counter function instead delay
      boolean isTimeUp(unsigned long *timeMark, unsigned long timeInterval) {
          if (millis() - *timeMark >= timeInterval) {
              *timeMark = millis();
              return true;
          }
          return false;
      }
      
      void setup()
      {
      	// Setup locally attached sensors
      }
      
      void loop()
      {
        //We are keeping ids of pairing nodes only for 10 seconds while pairing
       if(isTimeUp(&currentTime, waitTime)) {
        masterNodeAddr = 0;
        masterNodeAddrPresent = 0;
       }
      }
      
      void receive(const MyMessage &message) {
        //I used specific message type for filtering out pairing request
        if (message.type == V_VAR1) {
          Serial.print("Incoming message. Node - ");
          Serial.print(message.sender); Serial.print("-");
          Serial.print(message.sensor);
          Serial.println(message.getString());
          // If we had already a pairing requests within the last 10 seconds ? Then lets setup ready to pair
          if (!masterNodeAddrPresent) {
            currentTime = millis();
            masterNodeAddr = message.sender;
            masterSensorAddr = message.sensor;
            masterNodeAddrPresent = 1;
          }
          // Listening for the second node slave to request pairing.
          else if (message.sender != masterNodeAddr ) { //&& message.sensor != masterSensorAddr) {
            //Construct message string with node and sensor ids 
            snprintf(str2, 7, "%d;%d", message.sender, message.sensor);
            snprintf(str1, 7, "%d;%d", masterNodeAddr, masterSensorAddr); 
            Serial.print("First address: ");  Serial.print(str1); Serial.print("Second address: "); Serial.println(str2);
            // Send answer to nodes
            msg.setDestination(message.sender);
            send(msg.set(str1), true);
            wait(500);
            Serial.println("Sent message to second address");
            msg2.setDestination(masterNodeAddr);
            send(msg2.set(str2), true);
            wait(500);
            Serial.println("Sent message to first address");
            masterNodeAddr = 0;
            masterSensorAddr = 0;
            masterNodeAddrPresent = 0;
            Serial.println("Pairing finished");
          }
        }
      }
      

      Button.ico

      /*
       * Description on node
       */
      
      // Enable debug prints to serial monitor
      #define MY_DEBUG
      
      // Enable and select radio type attached
      #define MY_RADIO_RFM69 
      #define MY_RFM69_FREQUENCY RFM69_433MHZ
      
      #include <MySensors.h>
      
      #define CHILD_ID 3
      
      #include <avdweb_Switch.h>
      #include "pair.h"
      
      #define SET_BUTTON_PIN 5 // Arduino Digital I/O pin for button/reed switch
      #define BUTTON_PIN 4  // Normal button PIN
      Switch button = Switch(BUTTON_PIN);
      
      PairLocal pairLocal = PairLocal(SET_BUTTON_PIN);
      
      
      // I think send to controller the button regardless if its paired directly 
      void presentation()
      {
        // Send the sketch version information to the Controller in case node is'nt paired
        //if (!paired) {
          sendSketchInfo("Binary paired button", "1.0");
          present(CHILD_ID, S_MOTION);
        //}
      }
      
      void before()
      {
        pairLocal.before();
      
        //optionally pass function in, This button node won't recieve messages to do something from a slave
        uint16_t ptr = &arryChange;
        pairLocal.setParedMessageRecievedFunction(ptr);
      }
      
      // Function called when a paired master node sends a message
      void arryChange()
      {
      
      }
      
      void setup()
      {
        pairLocal.setup();
      }
      
      void loop()
      {
        pairLocal.loop();
      
        // Process our own sensors additional button 
        button.poll();
        // button was pushed
        if (button.pushed()) {   
          pairLocal.sendPairedMesage();
          } else {
         // if (!paired) {
            //MyMessage msg(CHILD_ID, V_TRIPPED);
            //send(msg.set(0)); // NOT SURE IF WE NEED THIS ????
      //    }
        } 
      }
      
      
      void receive(const MyMessage &message)
      {
        pairLocal.receive(message);
      
        // Do any additional processing here.
      }
      

      Relay.ico

      /*
       * Description on node
       */
      
      // Enable debug prints to serial monitor
      #define MY_DEBUG
      
      // Enable and select radio type attached
      #define MY_RADIO_RFM69 
      #define MY_RFM69_FREQUENCY RFM69_433MHZ
      
      #include <MySensors.h>
      
      #define CHILD_ID 1
      #define RELAY_PIN  5  // Arduino Digital I/O pin number for relay
      #define RELAY_ON 1  // GPIO value to write to turn on attached relay
      #define RELAY_OFF 0 // GPIO value to write to turn off attached relay
      #define SET_BUTTON_PIN 4
      
      bool relayState;
      
      MyMessage msg(CHILD_ID,V_LIGHT);
      
      #include <avdweb_Switch.h>
      #include "pair.h"
      
      PairLocal pairLocal = PairLocal(SET_BUTTON_PIN);
      
      // I think send to controller the button regardless if its paired directly 
      void presentation()
      {
        // Send the sketch version information to the gateway and Controller
        sendSketchInfo("Relay", "1.0");
      
        present(CHILD_ID, S_LIGHT, "Test light", true);
      
        // Send saved state to gateway (using eeprom storage)
        send(msg.set(relayState),true);
      }
      
      void before()
      {
        pairLocal.before();
      
        // Setup the relay
        pinMode(RELAY_PIN, OUTPUT);
        digitalWrite(RELAY_PIN, 1);
        delay(1000);
        digitalWrite(RELAY_PIN, 0);
      
        // Set relay to last known state (using eeprom storage)
        relayState = loadState(CHILD_ID);
        digitalWrite(RELAY_PIN, relayState ? RELAY_ON : RELAY_OFF);
      }
      
      void setup()
      {
        pairLocal.setup();
      
        //optionally pass function in, Relay change state
        uint16_t ptr = &processPairMessageFromMaster;
        pairLocal.setParedMessageRecievedFunction(ptr);
      }
      
      void loop()
      {
        pairLocal.loop();
      }
      
      void receive(const MyMessage &message)
      {
        pairLocal.receive(message);
      
        // Additional process message from Gateway
        if (message.type == V_LIGHT && !message.sender) {
            // Change relay state
            relayState = message.getBool();
            digitalWrite(RELAY_PIN, relayState ? RELAY_ON : RELAY_OFF);
            // Store state in eeprom
            saveState(CHILD_ID, relayState);
            // Write some debug info
            Serial.print("Incoming change. New status:");
            Serial.println(relayState);
          } 
      }
      
      // Function called when a paired master node sends a message
      void processPairMessageFromMaster()
      {
      	Serial.println("Relay changed state by master node");
      	digitalWrite(RELAY_PIN, relayState ? RELAY_OFF : RELAY_ON);
          relayState = relayState ? 0 : 1;
      }
      
      posted in Development
      RFM69
      RFM69
    • RE: Best CNC for milling/routing wood?

      @neverdie They've already answered the concrete idea, many people consider that, but a simple center support I think solves the problem. They have nice forums over at the vicious.com link I shared.

      posted in General Discussion
      RFM69
      RFM69
    • RE: Best CNC for milling/routing wood?

      @neverdie The same web site has a few other designs for larger machines.

      posted in General Discussion
      RFM69
      RFM69
    • RE: Best CNC for milling/routing wood?

      @neverdie Generally I get the feeling from reading other peoples experience that its a mistake to quickly make the machine too big because of rigidity. But people do make mods to address this issue or to add heavier spindles.

      Heres one mod i/d like to do link text

      But to change the size just need to get new pipes which even if you use SS they are they cheapest part.

      posted in General Discussion
      RFM69
      RFM69
    • RE: CNC PCB milling

      Perhaps slightly off topic but I wanted to share very interesting youtube channel of FRANK from Germany link text who's been working on a PCB pick and place module along with a CNC tool changer in the video above.

      Very inginious, and clever work if you've not come accross his videos and work yet.! alt text

      posted in General Discussion
      RFM69
      RFM69
    • RE: CNC PCB milling

      @scalz Agreed... the P&P is beyond my knowledge level, but what I found fascinating in what and how he was doing the project to make something himself, how he evolved the project was very interesting.

      He's got something similar for a tool changer on a 3d printer which is very nicely designed... along with the software and controllers.

      posted in General Discussion
      RFM69
      RFM69
    • RE: CNC PCB milling

      @neverdie you mean the tool changer, yes he has a blog and git pages where he shares. Its neccessary to speed control with current limiting breaking the spindle, which he's done via cheap ebay motor controller and arduino. Same goes for the spindle locking mechanism powered by a servo. and the CNC software..

      Heres the git link text

      Heres the blog link text

      Its not step by step, perhaps he'll get their but I know he'll be happy if people copy, or chime in :), or add

      posted in General Discussion
      RFM69
      RFM69
    • RE: CNC PCB milling

      @neverdie I'm gathering parts to make the same 3d printer with the carbon rods. I understood the weight reduction on the moving parts with carbon rods was the reason to go for them. And with the light 3d printer head that model can print much faster because of the stability and lightness. Which perhaps dosn't apply for the 2418 cnc ?

      posted in General Discussion
      RFM69
      RFM69

    Latest posts made by RFM69

    • RE: CNC PCB milling

      @executivul Thanks makes sense and I just started to read simular explaination in other places, but yours helped.

      How about rpm ? Is it generally considered that higher RPM is better, or at least not being limited by a low speed ? I've seen 1 300w spindle rated at 60,000rpm would this be better than a higher power slower spindle ?

      posted in General Discussion
      RFM69
      RFM69
    • RE: CNC PCB milling

      @neverdie so to get the max rated RPM out of a dc motor you need to operate at its max rated voltage ? with no PWM ?

      Running a DC motor rated at say 12-60V with PWM at only 12V would never get to top speed ?

      Am I understanding correctly ? Thanks for the link

      posted in General Discussion
      RFM69
      RFM69
    • RE: CNC PCB milling

      @neverdie 🙂 Now I'm even more confused with this difference between brushed and brushless...

      posted in General Discussion
      RFM69
      RFM69
    • RE: CNC PCB milling

      @neverdie Thanks thats what I thought, but I'm confused about the voltage range of some of the spindles. They use variable DC voltage to regulate speed ? I don't thinks so, they use PWM at any voltage I provide it with, no ?

      So the V range specified on DC spindle is just what it can be driven at, and its the PWM which actually controls the speed ? Is this right ?

      Thanks

      posted in General Discussion
      RFM69
      RFM69
    • RE: CNC PCB milling

      Just found a more powerful one...
      @rfm69 link text

      So could this or the 30A version, power an 800w DC 0-48V motor ?

      posted in General Discussion
      RFM69
      RFM69
    • RE: CNC PCB milling

      @coddingtonbear What materials are you milling ?

      I want to get a spindle for mostly wood, just hobby, but don't want to go too cheap, and face buying over when I realize its just not > W

      posted in General Discussion
      RFM69
      RFM69
    • RE: CNC PCB milling

      I'm also looking for a good spindle so thanks for the links and comments.

      Thought I'd share this link text. Its the 30A High Power Single way H-bridge DC Motor Driver Module. That "Frank From Germany" found and is using as part of his tool changing, along with a current sensor so he can brake, reverse and control speed on his tool changer, via arduino, to make it all work.

      posted in General Discussion
      RFM69
      RFM69
    • RE: Best CNC for milling/routing wood?

      @bjornhallberg Thanks for the info, I got a bit frustrated trying to find this on the rawcnc website... i was in some loop, very frustrating.

      I'm going to learn with the mpcnc and then posisble upgrade if I can justify it, or feel more flush. But thanks for the info...

      This shipping costs, can be a big factor, so I do understand, but the openness and transparency or generally communicating well, which you don't get at all from most china suppliers, and some closer is just as important.

      posted in General Discussion
      RFM69
      RFM69
    • RE: Best CNC for milling/routing wood?

      @bjornhallberg Any estimate on the cost of mechanical parts ?

      posted in General Discussion
      RFM69
      RFM69
    • RE: 💬 Easy/Newbie PCB for MySensors

      feeding too much solder into the joint before you've heated up both sides, and melting the solder on the iron instead of the pins or board before those parts are hot enough.

      posted in OpenHardware.io
      RFM69
      RFM69