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.
Posts made by Vladut Grecu
-
RE: Powering with LiPo a mini pro without regulator
-
RE: Powering with LiPo a mini pro without regulator
Neither. Those will boost it till 5v. You need something like this.
-
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.
-
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. -
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 -
RE: Scene controller based on old x10 remote
@tigra
Idiotic question.. That remote had a wireless thingy.. Why not use that? -
[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 -> SPIOn 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 runapt-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 - Exitor
CTRL+X - Exit
y - I want to save the file
ENTER - ConfirmWe 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 NRFMister 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 -
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)
-
RE: Clone 2 skelets Relay and Button's
@tomrask said:
Please modify your sketch like thisfor (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.
-
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.
-
RE: Powering with LiPo a mini pro without regulator
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
-
RE: Powering with LiPo a mini pro without regulator
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.
-
RE: Powering with LiPo a mini pro without regulator
The original nrf may support 3.6 but the chinese models that i have die faster :'/
-
RE: sensor library compile problem after a change (SOLVED)
Glad to be useful. I am using the tmrh20 libs.
https://github.com/tmrh20/RF24 -
RE: sensor library compile problem after a change (SOLVED)
Can you check your
RF24.cpp
andRF24.h
to be certain that you have theRF24::printDetails();
function?
Do you include theRF24.h
? (I know that it would throw you more errors if you didn't, but better be sure than sorry )
Try using it in another sketch and see if it's working.
I used your code and it compiled. -
RE: Powering with LiPo a mini pro without regulator
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.
-
RE: Raspberry GPIO NRF24l01+ make error
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. -
RE: Clone 2 skelets Relay and Button's
Can you post the serial output of the Arduino?
-
RE: Raspberry GPIO NRF24l01+ make error
@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. -
RE: Powering with LiPo a mini pro without regulator
Did you consider not recharging the battery over 3.3v? The nrf's 3.3v is a must. You can't go over 3.378v. (tested by me, before the poor little guy fried)
-
RE: Gateway device
After finish my rpi gateway i think i will focus on the esp. I just wait for some local sellers to drop their prices(Easter, etc)
-
RE: Motion, Lux, RGB
You are missing something
MyMessage lightMsg(CHILD_ID_LIGHT, V_LIGHT); MyMessage dimmerMsg(CHILD_ID_LIGHT, V_DIMMER);
You just process the messages for:
MyMessage motionMsg(Motion_CHILD, V_TRIPPED); ////Motion MyMessage luxMsg(CHILD_ID_LIGHT, V_LIGHT_LEVEL);////Lux
-
RE: Raspberry GPIO NRF24l01+ make error
You have to setup your arduino with a static node id. Something like
gw.begin(incomingMessage, 10, false); or gw.begin(null, 10, false); or gw.begin(null, 10);
10 is the node id.
From my knowledge the raspi lib for nrf does not support the automatic node id. (or is just pimatic)
Anyways, I don't use sensors. I just command the Arduino from raspi and my way of verifying the connection is the serial monitor linked to the arduino node. If it's found by the raspi and if he found the raspi the end of each line will best=ok;
If you get
st=fail;
You either did not set up the right node id or you need a capacitor on the nrf.
Before you test the lib you can test the link with a serial arduino gateway and see what is going on. -
RE: Gateway device
@tbowmo Did you consider using a ESP8266 WIFI Module?
You can easily program it and get the atmega off the part's list.How to directly program an inexpensive ESP8266 WIFI Module @ Hackaday.com
-
RE: 230V power supply to Arduino
If you don`t go over 50-60% of the amps that that charger can output, there will be no problems. I suggest you replace the capacitor on the 5V area with a bigger one and change the 220/110v capacitor with a higher quality one. What I figure from your pictures is that the black charger doesn't have a bridge rectifier.. It's safer for you to use one. (Don't forget about the fuse)
-
RE: Arduino 220V AC wattmeter
When you implement it with your relay you can call the readings only when the relay is on. That way you get accurate measures and don`t overload the mcu
-
RE: Raspberry GPIO NRF24l01+ make error
@sj44k -> https://github.com/mysensors/Raspberry
Download that. First compile the librf24-bcm folder. Then compile the Raspberry one.
From https://github.com/mysensors/Raspberry/tree/master/librf24-bcm
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
The numbering for rpi is:
1 2 3 4 5 6 7 8 9 10 etc
Don`t forget to enable the SPI from the raspbian config.
To test your connection, simply open your program
./PiGatewaySerial
It should print you something like this:root@raspberrypi:/home/pi/Raspberry# ./PiGatewaySerial Starting PiGatewaySerial... Protocol version - 1.4 Created PTY '/dev/pts/3' 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
-
RE: pimatic-mysensors controller plugin
I would like to help you make a color picker for rgb leds and a slider for random pwm outputs
-edit-deviceClasses = [ MySensorsDHT MySensorsBMP MySensorsPIR MySensorsSwitch MySensorsPulseMeter MySensorsButton MySensorBattery MySensorsDevDimmer ]
and
class MySensorsDevDimmer extends env.devices.DimmerActuator constructor: (@config,lastState, @board) -> @id = config.id @name = config.name @_state = lastState?.state?.value env.logger.info "MySensorsDevDimmer" , @id , @name, @_state @board.on('rfValue', (result) => if result.sender is @config.nodeid and result.type is V_LIGHT and result.sensor is @config.sensorid state = (if parseInt(result.value) is 1 then on else off) env.logger.info "<- MySensorDevDimmer " , result @_setState(state) ) super() changeStateTo: (state) -> assert state is on or state is off if state is true then _state = 1 else _state = 0 datas = {} datas = { "destination": @config.nodeid, "sensor": @config.sensorid, "type" : V_LIGHT, "value" : _state, "ack" : 1 } @board._rfWrite(datas).then ( () => @_setState(state) )
But i get :
Could not initialize the plugin "mysensors": MySensorsDevDimmer is not defined
I know that this won`t actually work because of the :
state = (if parseInt(result.value) is 1 then on else off)
and the :
if state is true then _state = 1 else _state = 0
What I don't get is why does it throw me that error. (Don't go hard on me, I just learned the basics of coffee script only for this)