Navigation

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

    Vladut Grecu

    @Vladut Grecu

    6
    Reputation
    29
    Posts
    1144
    Profile views
    0
    Followers
    0
    Following
    Joined Last Online
    Email vlad@redcodenetwork.ro Website redcodenetwork.ro Location Iasi, Romania

    Vladut Grecu Follow

    Best posts made by Vladut Grecu

    • [Tutorial] Raspberry Pi NRF24l01 direct connection

      [EDIT] - I uploaded a script in the next post that does everything I explained below

      I have installed MINImal raspBIAN which is a raspBIAN without a gui. So this should work for you guys.

      First of all you have to
      1. Undo your Overclock. If you have any. (SPI does not like Overclocked pi's)

      2. Enable SPI

      Details:

      On a normal raspbian image this can be done either on a fresh install (when you config your pi) or you can type in terminal sudo raspi-config
      From there you go into ADVANCED OPTIONS -> SPI

      On a minimal image you don't have the luxury of raspi-config. You have to manually activate it.
      (I already had it enabled but you can check)
      (If you don't have sudo installed on your image just run apt-get install sudo)

      sudo nano /etc/modprobe.d/raspi-blacklist.conf

      Make sure there IS a # before blacklist spi-bcm2708, so it looks like this…
      #blacklist spi-bcm2708

      If there is no line like that, you can add it. It won't do any harm.
      CTRL+O - Save
      ENTER - Confirm
      CTRL+X - Exit

      or

      CTRL+X - Exit
      y - I want to save the file
      ENTER - Confirm

      We have to edit now the config.txt.
      sudo nano /boot/config.txt

      add this to the end of the line
      dtparam=spi=on

      Save and exit.

      Reboot your pi.
      sudo reboot

      Enjoy using SPI. (Source)

      3.Downloading the files

      Details:

      You have 2 options. wget and git-clone. I'll start with:

      a. git-clone

      If you don't have git-clone you need to install the git tools. (Yes, git is related to github)
      sudo apt-get install git

      After you installed git you simply navigate to the folder that you wish to install the program and type:
      sudo git-clone https://github.com/mysensors/Raspberry.git

      This will download a zip, unarchive it and.. It does all the jobs for you.

      b. wget

      Some ppl are old-school and go the hard way or they just enjoy it done this way.

      Navigate to the folder that you wish to install the program and type:
      wget https://github.com/mysensors/Raspberry/archive/master.zip (this will download you the zip)

      Unzip the file

      If you don't have unzip installed just type
      sudo apt-get install unzip

      unzip master.zip -d /home/pi/Raspberry (you can specify any directory that you want instead of the /home/pi/Raspberry)

      4.Edit and compile what you downloaded

      In the Raspberry folder you have some files and some folders.
      The majority of ppl (including me) forget to complile the libs for the NRF24l01.
      This is the library provided by [TMRH20]{http://tmrh20.github.io} (He has some interesting stuff there including an audio library for NRF24l01.)
      Back to our stuff.
      Go to the Raspberry folder then into librf24-bcm.
      cd Raspberry/librf24-bcm/

      Type
      make

      Go back to the Raspberry folder
      cd ..

      Type
      make
      5.Connecting the NRF

      Mister TMRH20 tells us that we need to connect the NRF24l01 this way

      PIN		NRF24L01	RPI				RPi -P1 Connector
      1		GND			rpi-gnd			(25)
      2		VCC			rpi-3v3			(17)
      3		CE			rpi-gpio22		(15)
      4		CSN			rpi-gpio8		(24)
      5		SCK			rpi-sckl		(23)
      6		MOSI		rpi-mosi		(19)
      7		MISO		rpi-miso		(21)
      8		IRQ			Not Connected
      

      Connect everything like that except for the CE pin

      Run the PiGatewaySerial
      ./PiGatewaySerial

      It shoud prin something like this:

      Starting PiGatewaySerial...
      Protocol version - 1.4
      Created PTY '/dev/pts/1'
      Gateway tty: /dev/ttyMySensorsGateway
      ================ SPI Configuration ================
      CSN Pin          = CE0 (PI Hardware Driven)
      CE Pin           = Custom GPIO25
      Clock Speed      = 8 Mhz
      ================ NRF Configuration ================
      STATUS           = 0x0e RX_DR=0 TX_DS=0 MAX_RT=0 RX_P_NO=7 TX_FULL=0
      RX_ADDR_P0-1     = 0xe7e7e7e7e7 0xc2c2c2c2c2
      RX_ADDR_P2-5     = 0xff 0xc4 0xc5 0xc6
      TX_ADDR          = 0xe7e7e7e7e7
      RX_PW_P0-6       = 0x00 0x00 0x20 0x00 0x00 0x00
      EN_AA            = 0x3b
      EN_RXADDR        = 0x07
      RF_CH            = 0x10
      RF_SETUP         = 0x23
      CONFIG           = 0x0e
      DYNPD/FEATURE    = 0x3f 0x06
      Data Rate        = 250KBPS
      Model            = nRF24L01+
      CRC Length       = 16 bits
      PA Power         = PA_LOW
      

      Look at line 7 CE Pin = Custom GPIO25
      Connect the CE pin where it says you should.

      Here are some pictures with the GPIO connector on the rPi.
      https://www.google.ro/search?q=raspberry+pi+gpio&tbm=isch

      posted in Controllers
      Vladut Grecu
      Vladut Grecu
    • RE: nRF24L01+PA+LNA

      Take a look here https://www.youtube.com/watch?v=lR60toEjHl8

      posted in General Discussion
      Vladut Grecu
      Vladut Grecu
    • RE: [Tutorial] Raspberry Pi NRF24l01 direct connection

      Here is a script I made that does all the things above
      RasNRF-GPIO.sh
      Tell me how it went. Did it helped you? Did you found a bug? Any input, bad or good is appreciated.

      posted in Controllers
      Vladut Grecu
      Vladut Grecu

    Latest posts made by Vladut Grecu

    • RE: Powering with LiPo a mini pro without regulator

      Oh.. for the gas sensor they are ok. Last one (green) seems a little bit more polished. The presence of the usb port is not important, you can solder it off. The usb is the output. Check the picture again. It's your choice.

      posted in Hardware
      Vladut Grecu
      Vladut Grecu
    • RE: Powering with LiPo a mini pro without regulator

      Neither. Those will boost it till 5v. You need something like this.

      posted in Hardware
      Vladut Grecu
      Vladut Grecu
    • RE: Clone 2 skelets Relay and Button's

      @tomrask said:

      From your serial output, I think that the problem is with vera.(config, etc.. I don`t use vera)
      The node presents your devices and the gateway recognizes them correctly.

      send: 1-1-0-0 s=0,c=0,t=3,pt=0,l=5,st=ok:1.4.1
      The nr 0 relay has been presented
      
      send: 1-1-0-0 s=1,c=0,t=3,pt=0,l=5,st=ok:1.4.1
      The nr 1 relay has been presented
      
      send: 1-1-0-0 s=2,c=0,t=0,pt=0,l=5,st=ok:1.4.1
      The nr 2 switch has been presented
      
      send: 1-1-0-0 s=3,c=0,t=0,pt=0,l=5,st=ok:1.4.1
      The nr 3 switch has been presented
      
      send: 1-1-0-0 s=4,c=0,t=0,pt=0,l=5,st=ok:1.4.1
      The nr 4 switch has been presented
      

      I guess you pressed the buttons to test them but when you press button nr 3 (child4) you got an error

      send: 1-1-0-1 s=4,c=1,t=0,pt=2,l=2,st=fail:1
      read: 1-0-1 s=4,c=1,t=0,pt=2,l=2:1
      

      You either wrongly configured vera to use child 4 as something else rather than a button (and it doesn't expect for an update, even if you present it as a button and it says that is ok) or it's beyond my understanding.

      I will kindly ask @hek to to take a look over what I said and verify the integrity of the code presented but before that, I'll try to do your setup and report back.

      posted in My Project
      Vladut Grecu
      Vladut Grecu
    • RE: [Tutorial] Raspberry Pi NRF24l01 direct connection

      Here is a script I made that does all the things above
      RasNRF-GPIO.sh
      Tell me how it went. Did it helped you? Did you found a bug? Any input, bad or good is appreciated.

      posted in Controllers
      Vladut Grecu
      Vladut Grecu
    • RE: Scene controller based on old x10 remote

      @hek
      Sometimes simple is just to complicated in a complicated world. Most of us are used to old forums format 😄

      posted in My Project
      Vladut Grecu
      Vladut Grecu
    • RE: Scene controller based on old x10 remote

      @tigra
      Idiotic question.. That remote had a wireless thingy.. Why not use that?

      posted in My Project
      Vladut Grecu
      Vladut Grecu
    • [Tutorial] Raspberry Pi NRF24l01 direct connection

      [EDIT] - I uploaded a script in the next post that does everything I explained below

      I have installed MINImal raspBIAN which is a raspBIAN without a gui. So this should work for you guys.

      First of all you have to
      1. Undo your Overclock. If you have any. (SPI does not like Overclocked pi's)

      2. Enable SPI

      Details:

      On a normal raspbian image this can be done either on a fresh install (when you config your pi) or you can type in terminal sudo raspi-config
      From there you go into ADVANCED OPTIONS -> SPI

      On a minimal image you don't have the luxury of raspi-config. You have to manually activate it.
      (I already had it enabled but you can check)
      (If you don't have sudo installed on your image just run apt-get install sudo)

      sudo nano /etc/modprobe.d/raspi-blacklist.conf

      Make sure there IS a # before blacklist spi-bcm2708, so it looks like this…
      #blacklist spi-bcm2708

      If there is no line like that, you can add it. It won't do any harm.
      CTRL+O - Save
      ENTER - Confirm
      CTRL+X - Exit

      or

      CTRL+X - Exit
      y - I want to save the file
      ENTER - Confirm

      We have to edit now the config.txt.
      sudo nano /boot/config.txt

      add this to the end of the line
      dtparam=spi=on

      Save and exit.

      Reboot your pi.
      sudo reboot

      Enjoy using SPI. (Source)

      3.Downloading the files

      Details:

      You have 2 options. wget and git-clone. I'll start with:

      a. git-clone

      If you don't have git-clone you need to install the git tools. (Yes, git is related to github)
      sudo apt-get install git

      After you installed git you simply navigate to the folder that you wish to install the program and type:
      sudo git-clone https://github.com/mysensors/Raspberry.git

      This will download a zip, unarchive it and.. It does all the jobs for you.

      b. wget

      Some ppl are old-school and go the hard way or they just enjoy it done this way.

      Navigate to the folder that you wish to install the program and type:
      wget https://github.com/mysensors/Raspberry/archive/master.zip (this will download you the zip)

      Unzip the file

      If you don't have unzip installed just type
      sudo apt-get install unzip

      unzip master.zip -d /home/pi/Raspberry (you can specify any directory that you want instead of the /home/pi/Raspberry)

      4.Edit and compile what you downloaded

      In the Raspberry folder you have some files and some folders.
      The majority of ppl (including me) forget to complile the libs for the NRF24l01.
      This is the library provided by [TMRH20]{http://tmrh20.github.io} (He has some interesting stuff there including an audio library for NRF24l01.)
      Back to our stuff.
      Go to the Raspberry folder then into librf24-bcm.
      cd Raspberry/librf24-bcm/

      Type
      make

      Go back to the Raspberry folder
      cd ..

      Type
      make
      5.Connecting the NRF

      Mister TMRH20 tells us that we need to connect the NRF24l01 this way

      PIN		NRF24L01	RPI				RPi -P1 Connector
      1		GND			rpi-gnd			(25)
      2		VCC			rpi-3v3			(17)
      3		CE			rpi-gpio22		(15)
      4		CSN			rpi-gpio8		(24)
      5		SCK			rpi-sckl		(23)
      6		MOSI		rpi-mosi		(19)
      7		MISO		rpi-miso		(21)
      8		IRQ			Not Connected
      

      Connect everything like that except for the CE pin

      Run the PiGatewaySerial
      ./PiGatewaySerial

      It shoud prin something like this:

      Starting PiGatewaySerial...
      Protocol version - 1.4
      Created PTY '/dev/pts/1'
      Gateway tty: /dev/ttyMySensorsGateway
      ================ SPI Configuration ================
      CSN Pin          = CE0 (PI Hardware Driven)
      CE Pin           = Custom GPIO25
      Clock Speed      = 8 Mhz
      ================ NRF Configuration ================
      STATUS           = 0x0e RX_DR=0 TX_DS=0 MAX_RT=0 RX_P_NO=7 TX_FULL=0
      RX_ADDR_P0-1     = 0xe7e7e7e7e7 0xc2c2c2c2c2
      RX_ADDR_P2-5     = 0xff 0xc4 0xc5 0xc6
      TX_ADDR          = 0xe7e7e7e7e7
      RX_PW_P0-6       = 0x00 0x00 0x20 0x00 0x00 0x00
      EN_AA            = 0x3b
      EN_RXADDR        = 0x07
      RF_CH            = 0x10
      RF_SETUP         = 0x23
      CONFIG           = 0x0e
      DYNPD/FEATURE    = 0x3f 0x06
      Data Rate        = 250KBPS
      Model            = nRF24L01+
      CRC Length       = 16 bits
      PA Power         = PA_LOW
      

      Look at line 7 CE Pin = Custom GPIO25
      Connect the CE pin where it says you should.

      Here are some pictures with the GPIO connector on the rPi.
      https://www.google.ro/search?q=raspberry+pi+gpio&tbm=isch

      posted in Controllers
      Vladut Grecu
      Vladut Grecu
    • RE: Powering with LiPo a mini pro without regulator

      @m26872 said:

      the power loss from extra cycles would be neglectable

      You are right. But 220uA are neglectable aswell. (For me at least)

      posted in Hardware
      Vladut Grecu
      Vladut Grecu
    • RE: Clone 2 skelets Relay and Button's

      @tomrask said:
      Please modify your sketch like this

      for (int sensor=0, pin=RELAY_1; sensor<NUMBER_OF_RELAYS;sensor++, pin++) {
          // Register all sensors to gw (they will be created as child devices)
          gw.present(sensor, S_LIGHT);
          Serial.print("\nThe nr ");
          Serial.print(sensor);
          Serial.print(" relay has been presented\n");
          // Then set relay pins in output mode
          pinMode(pin, OUTPUT);   
          // Set relay to last known state (using eeprom storage) 
          digitalWrite(pin, gw.loadState(sensor)?RELAY_ON:RELAY_OFF);
        }
      

      and

       for (int i = NUMBER_OF_RELAYS; i < (NUMBER_OF_RELAYS+NUMBER_OF_SWITCHES); i++)
        {
          gw.present(i, S_DOOR);
          Serial.print("\nThe nr ");
          Serial.print(i);
          Serial.print(" switch has been presented\n");
          delay(250);
        }
      

      And post the serial output again.

      posted in My Project
      Vladut Grecu
      Vladut Grecu
    • RE: Clone 2 skelets Relay and Button's

      There is something going on with you code. It tells your gateway that you only have 3 devices (0,1,2)

      send: 1-1-0-0 s=0,c=0,t=0,pt=0,l=5,st=ok:1.4.1
      send: 1-1-0-0 s=1,c=0,t=0,pt=0,l=5,st=ok:1.4.1
      send: 1-1-0-0 s=2,c=0,t=0,pt=0,l=5,st=ok:1.4.1
      

      I'll look into it when I get home, later this day.

      posted in My Project
      Vladut Grecu
      Vladut Grecu