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
OitzuO

Oitzu

@Oitzu
About
Posts
272
Topics
11
Shares
0
Groups
0
Followers
0
Following
1

Posts

Recent Best Controversial

  • Solar powered observation nesting box network
    OitzuO Oitzu

    As the title said, i'm currently building/build a set of solar powered nesting box nodes, to observe the inner of said boxes. (By Picture)
    The Gateway (a RPi) is also solar powered and connected with a UMTS stick to the internet.

    I'm currently writing a series of blog-post of this MySensors powered project. :)

    http://blog.blackoise.de/category/nesting-box/

    My Project

  • Sending image-data over the MySensors network.
    OitzuO Oitzu

    Just if anyone is interested in sending image-data over the mysensors network:
    I now have some sort of working proof on concept.
    I'm able to take a picture with a serial camera connected to a arduino nano and transmit it over my MySensors network.
    The transmitting of the taken picture takes about 40 seconds, has a resolution of 640x320 and a size of 50kb.

    Development

  • Marijuana detector module
    OitzuO Oitzu

    @Anticimex said:

    What's wrong with a few herbs?

    Maybe he just wants to change the lights, music etc. in his living room to get a more fitting scene for his current activities? :)

    General Discussion

  • MySensors Contest 2016
    OitzuO Oitzu

    @hek said:

    :star: 25th of Mars 12:00 CET :star:

    25th of Mars? Well... Mark Watney will probably win this one. :P

    Announcements

  • Sending image-data over the MySensors network.
    OitzuO Oitzu

    The Perl-Script i'm using instead of a controller, because obviously no controller supports this yet.

    #!/usr/bin/perl
    use Device::SerialPort;
    use POSIX qw(strftime);
    use Data::Dumper;
    use Time::HiRes qw (sleep);
    use Time::HiRes qw(time);
    my $port = Device::SerialPort->new("/dev/ttyUSB1");
    $| = 1;
    use Time::HiRes qw(time);
    
    $port->baudrate(115200);
    $port->databits(8);
    $port->parity("none");
    $port->stopbits(1);
    
    my $buffer;
    my %transfers;
    
    print "Waiting for incoming transfers...\n";
    
    while (1) {
    	my ($count,$saw)=$port->read(256);
    	if($count > 0 || length($buffer) > 0)
    	{
    		$buffer .= $saw;
    		my ($cmd, $rest) = split(/\n/, $buffer, 2);
    		if(defined($rest))
    		{
    			if(@m = $cmd =~ /([0-9]*);([0-9]*);([0-9]*);([0-9]*);([0-9]*);(.*)/g)
    			{
    				my ($node_id, $child_sensor_id, $message_type, $ack, $sub_type, $payload) = @m;
    		#		print "node_id: $node_id, child_sensor_id: $child_sensor_id, message_type: $child_sensor_id, ack: $ack, sub_type: $sub_type, payload: $payload \n";
    				if($sub_type eq "25")
    				{
    					if($payload eq "START" && $transfers{$node_id}{'state'} == 0)
    					{
    						print "New transfer incoming from node $node_id.\n";
    						$transfers{$node_id}{'start_time'} = time();
    						$transfers{$node_id}{'state'} = 1;
    						$transfers{$node_id}{'count'} = 0;
    						my $time = strftime("%Y-%m-%d-%H-%M-%S", localtime);
    						open ($transfers{$node_id}{'FH'}, ">>node-".$node_id."-".$time.".jpg");
    						binmode($transfers{$node_id}{'FH'});
    					}
    					
    					if($payload eq "END" && $transfers{$node_id}{'state'} == 1)
    					{
    						close($transfers{$node_id}{'FH'});
    						$transfers{$node_id}{'state'} = 0;
    						my $duration = time() - $transfers{$node_id}{'start_time'};
    						my $bps = $transfers{$node_id}{'count'} * 24 / $duration;
    						my $pps = $transfers{$node_id}{'count'} / $duration;
    						print "Transfer from $node_id finished.\n";
    						print "$duration seconds, $bps Bytes/s, $pps Packets/s\n";
    					}
    				}
    				elsif($sub_type eq "24")
    				{
    					if($transfers{$node_id}{'state'} == 1)
    					{
    						$transfers{$node_id}{'count'}++;
    						print { $transfers{$node_id}{'FH'} } pack('H*',$payload);
    					}
    				}
    			}
    			$buffer = $rest;
    		}
    	}
            #Check for timeout
            while(($node_id) = each %transfers)
            {
    	        my $duration = time() - $transfers{$node_id}{'start_time'};
                   	if($duration > 120 && $transfers{$node_id}{'state'} == 1)
                    {
                    	close($transfers{$node_id}{'FH'});
                            $transfers{$node_id}{'state'} = 0;
                            print "Warning: Timeout from node $node_id. Transfer cancelled.\n";
                    }
    	}
    	sleep (0.001);
    }
    

    The sketch:

    #include <MySensor.h>
    #include <SPI.h>
    #include <Adafruit_VC0706.h>
    #include <SoftwareSerial.h>
    
    #undef DEBUG
    
    SoftwareSerial cameraConnection = SoftwareSerial(6,7);
    
    Adafruit_VC0706 cam = Adafruit_VC0706(&cameraConnection);
    
    #define CHILD_ID 3
    
    MySensor gw;
    MyMessage msg(CHILD_ID,V_VAR1);
    MyMessage msg2(CHILD_ID,V_VAR2);
    
    void setup()  
    {  
      gw.begin();
    
      gw.present(CHILD_ID, S_CUSTOM);  
      
      if (cam.begin()){}
      else { return; } //Abort the transfer if camera does not initialize
    
      cam.setImageSize(VC0706_640x480);
      delay(3000);
      snapAndSend();
      cam.reset();
    }
    
    //Do nothing.
    void loop() 
    {
    
    }
    
    void snapAndSend()
    {
      cam.takePicture();
      uint16_t jpgLen = cam.frameLength();
      Serial.print("Sending Picture of ");
      Serial.print(jpgLen, DEC);
      Serial.println(" Bytes.");
      gw.send(msg2.set("START"));
      while (jpgLen > 0)
      {                     //Send off 24 bytes of data at a time
        uint8_t *buffer;
        uint8_t bytesToRead = min(24, jpgLen);
        buffer = cam.readPicture(bytesToRead);
        gw.send(msg.set(buffer, bytesToRead));
        jpgLen -= bytesToRead;
      }
      Serial.println("Done.");
      gw.send(msg2.set("END"));
    }
    

    Hardware:
    Typical MySensors-Node and a Serial TTL Camera like this:
    http://aliexpress.com/item/NEW-RS232-TTL-JPEG-Digital-Serial-Port-CCTV-Camera-Module-SCB-1-with-video-out-Support/1975852463.html

    2015-07-30 19.38.29 - Kopie.jpg

    Development

  • one question ! about interference wave !
    OitzuO Oitzu

    @TRS-80 you may want to look at RTL-SDR http://www.rtl-sdr.com/about-rtl-sdr/

    If you just want to scan on the nrf24l01+ channel range, this is maybe enough for you: https://maniacbug.github.io/RF24/scanner_8pde-example.html

    Vera

  • Solar powered observation nesting box network
    OitzuO Oitzu

    Part 4 posted: http://blog.blackoise.de/2016/04/building-a-connected-nesting-box-network-part-4/

    Now with 90% less text and 60% more pictures! :P

    My Project

  • Solar powered observation nesting box network
    OitzuO Oitzu

    @drock1985 would be great!
    tweet tweet
    tweett

    My Project

  • How does RF work?? Electro-sensible problems
    OitzuO Oitzu

    Hello @OPatrick! :)
    The modules are only emitting when needed. They don't keep something like an active sync by default.
    The strength of the signals can be configured and should be as strong as needed but as low as possible.
    How often signals are emitted depends strongly on your sketches / use cases.
    But in "stand-by" the modules are completly powered down and don't emit any signals.

    I wouldn't worried that much. The nrf24l01+, by example, works in the 2.4ghz band with a relativly low signal strength. The human skin itself is a barrier that these signals can not penetrate.

    Hardware

  • [SOLVED] 2 X nrf24l01+pa+lna with RF24_PA_MAX
    OitzuO Oitzu

    Just if anybody else is running into this problem:
    Shielding the module with tinfoil against RF worked great! With the tinfoil shield i got over 1km reach in a clear line of sight!

    Troubleshooting

  • AC light dimmer with 2x TRIAC
    OitzuO Oitzu

    @ahmedadelhosni
    http://www.ebay.com/itm/KEMO-M028-Power-control-110-240-V-AC-2600-VA-Made-in-Germany-/251096815198
    as example..they are relativ expensive.. see it more as an example. :)

    My Project

  • Infrared Temp Sensor
    OitzuO Oitzu

    @hek said:

    @Sander-Stolk said:

    Maybe to check if the misses is ovulating?

    I need no temp sensor for that one. ;)

    Maybe you want to add an moisture sensor to that? :P

    Hardware

  • [SOLVED] 2 X nrf24l01+pa+lna with RF24_PA_MAX
    OitzuO Oitzu

    @Zeph said:

    @Zeph said:

    @Oitzu The range was greatly improved by using a far-aday cage.

    Sorry, it was meant to be a throw-away pun, not an insight.

    ... now i got it... haha... sorry. You know how many germans does it takes to change a lightbulb?
    One. We are very efficient and don't have humour. ;)

    Troubleshooting

  • MySensors on ATTINY85
    OitzuO Oitzu

    @ted you are probably searching for this: https://github.com/Oitzu/mysensors-Arduino-attiny/tree/master/libraries/MySensors

    But i need to seriously warn you, it is horribly outdated. The repository do not got the love it needed. ^^

    My Project attiny

  • NRF24L01+ range of only few meters
    OitzuO Oitzu

    @petewill about shielding: you should have looked on the link http://blog.blackoise.de/2016/02/fixing-your-cheap-nrf24l01-palna-module/ . I explained it that often that i decided to write a blog article about it. :P

    Hardware

  • What is the difference between arduino nano (FT232 chip) and arduino nano CH340 chip ?
    OitzuO Oitzu

    The FT232 and the CH340 are both serial to usb ICs.
    The CH340 is often used on Chinese Arduino clones.

    There is no difference on the user side, expect that you need to download and install drivers on windows for the CH340. (On Linux included)

    Personally i'm happy that they are switching to the ch430 instead of using ftdi ft232 clones.

    Troubleshooting

  • Solar powered observation nesting box network
    OitzuO Oitzu

    And now finally part 5 online:
    http://blog.blackoise.de/2016/05/building-a-connected-nesting-box-network-part-5/
    Which finally includes links to the actual pictures the network takes. :)

    My Project

  • NRF24L01+ range of only few meters
    OitzuO Oitzu

    @pkjjneal said:
    it only sends packets if I am physically touching the nRF board itself with my finger.

    Also read: http://blog.blackoise.de/2016/02/fixing-your-cheap-nrf24l01-palna-module/
    Its a typical behaviour i observed on badly shielded modules.

    Hardware

  • What is the difference between arduino nano (FT232 chip) and arduino nano CH340 chip ?
    OitzuO Oitzu

    @Reza what controller are you using? Its all a matter of, if the host-system can handle the ch340 ic.

    Troubleshooting

  • Sending image-data over the MySensors network.
    OitzuO Oitzu

    Hm... i see. I thought there could be maybe a hidden functionallity to directly pipe and stream it trough the MySensors network.
    But this could work as well, i just need to chomp it up and puzzle it together on the other side.

    Development
  • Login

  • Don't have an account? Register

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