Skip to content
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
Vladut GrecuV

Vladut Grecu

@Vladut Grecu
About
Posts
29
Topics
1
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Powering with LiPo a mini pro without regulator
    Vladut GrecuV Vladut Grecu

    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.

    Hardware

  • Powering with LiPo a mini pro without regulator
    Vladut GrecuV Vladut Grecu

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

    Hardware

  • Clone 2 skelets Relay and Button's
    Vladut GrecuV Vladut Grecu

    @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.

    My Project

  • [Tutorial] Raspberry Pi NRF24l01 direct connection
    Vladut GrecuV Vladut Grecu

    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.

    Controllers raspberry pi nrf24l01

  • Scene controller based on old x10 remote
    Vladut GrecuV Vladut Grecu

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

    My Project controller remote scene

  • Scene controller based on old x10 remote
    Vladut GrecuV Vladut Grecu

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

    My Project controller remote scene

  • [Tutorial] Raspberry Pi NRF24l01 direct connection
    Vladut GrecuV Vladut Grecu

    [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

    Controllers raspberry pi nrf24l01

  • Powering with LiPo a mini pro without regulator
    Vladut GrecuV Vladut Grecu

    @m26872 said:

    the power loss from extra cycles would be neglectable

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

    Hardware

  • Clone 2 skelets Relay and Button's
    Vladut GrecuV Vladut Grecu

    @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.

    My Project

  • Clone 2 skelets Relay and Button's
    Vladut GrecuV Vladut Grecu

    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.

    My Project

  • Powering with LiPo a mini pro without regulator
    Vladut GrecuV Vladut Grecu

    The rezistors + the code that needs to be run? The extra cycles for you to read the Analog pin? I go with the idea that if there is allready a measuring in the arduino anyway why do i need to reinvent the wheel? The voltage divider thingy is ok if you want to measure voltages that go over the vcc value

    Hardware

  • Powering with LiPo a mini pro without regulator
    Vladut GrecuV Vladut Grecu

    What I don`t get is why you want to cut the 3.3v regulator when you only get a 220 micro Amps consumption reduction and the resistors that you use to measure the actual voltage over the Analog pin use way more..

    Use the internal arduino voltage measure. You will see 3.3v even if you get over 3.3v but what you actually need know is when the voltage drops under 3.3v so you know when you have to start recharging your li-po.

    Hardware

  • Powering with LiPo a mini pro without regulator
    Vladut GrecuV Vladut Grecu

    The original nrf may support 3.6 but the chinese models that i have die faster :'/

    Hardware

  • sensor library compile problem after a change (SOLVED)
    Vladut GrecuV Vladut Grecu

    Glad to be useful. I am using the tmrh20 libs.
    https://github.com/tmrh20/RF24

    Troubleshooting

  • sensor library compile problem after a change (SOLVED)
    Vladut GrecuV Vladut Grecu

    Can you check your RF24.cpp and RF24.h to be certain that you have the RF24::printDetails(); function?
    Do you include the RF24.h? (I know that it would throw you more errors if you didn't, but better be sure than sorry :D )
    Try using it in another sketch and see if it's working.
    I used your code and it compiled.

    Troubleshooting

  • Powering with LiPo a mini pro without regulator
    Vladut GrecuV Vladut Grecu

    It lasted 2 minutes because you read the sensor way to often. For an extended battery life you need to put the arduino to sleep for as much as possible and read the sensors value very rarely.

    Hardware

  • nRF24L01+PA+LNA
    Vladut GrecuV Vladut Grecu

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

    General Discussion

  • Raspberry GPIO NRF24l01+ make error
    Vladut GrecuV Vladut Grecu

    Move the pin on 22. The actual 22 pin not gpio22. Full restart the pi.

    I think you can cat the /dev/ttyMySensorsGateway. In the way I use it(with pimatic) all the commands are logged.

    Controllers

  • Clone 2 skelets Relay and Button's
    Vladut GrecuV Vladut Grecu

    Can you post the serial output of the Arduino?

    My Project

  • Raspberry GPIO NRF24l01+ make error
    Vladut GrecuV Vladut Grecu

    @sj44k
    Tell me where did you connected the CE Pin on rPi..
    Do you have another Arduino so you can burn a serial gateway into it? So we can be sure that your Mega is sending and receiving properly?
    From your Arduino output he clearly does not link with the nrf on the Raspberry.

    Controllers
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular