My Slim 2AA Battery Node


  • Hardware Contributor

    @GertSanders Good job! If you go the SMD way I think a lot could be done. Perhaps matching AAA width? Leave some (only few) SMD pads open for sensor connection, no proto area, etc.



  • oh, yes. You have right, the battery fits in it, but its a little bit too big so i cant close the cover. Damn i didnt try it before.
    ok the i have to look for a graeter duct.


  • Hero Member

    Currently this is my favorite board. Minimal size, traditional components and just enough breadboard space. A few variations:
    0_1454859878498_upload-23af4fbe-6938-4079-9fc4-d149c8950370 Soldered an 8 mHz resonator (a 'crystal' which does not need the capacitors) for a more stable clock.

    0_1454860192227_upload-c6f3a164-b5cb-43f5-af82-c556674568f4 0_1454860883223_upload-351808cf-868d-4076-80ce-2e4b05ec4898 Soldered a 3.3v LDO (662k) under the radio to have it powered with a rechargeable Lipo (4.1V max) battery. And added a voltage divider to measure the actual battery voltage.

    0_1454860058592_upload-a677913a-22a8-466d-920d-ae620591088b 0_1454860344864_upload-77335242-a0b4-4371-85f5-4d11731c0868
    With a SMD version of the radio. Needs some creative soldering...

    0_1454860702395_upload-e1af1f72-11c5-409d-9eca-762e3c657183 Compared to an other favourite ( @GertSanders )

    It would even be better if the smd radio could be soldered on the board. Kicad is giving me a headache so if anybody wants to volunteer with a panelized design.... (I will reward you with a free batch of 'dirty' boards, just drop me a pm)


  • Hardware Contributor

    AA batteries are 14mm in diameter. AAA batteries are 10mm in diameter.

    I have single AAA batteryholders which are 13mm wide at the base, and including a battery they are 13mm high at the highest point.

    LEGRAND sells 16x16mm cable ducts (http://www.ecataleg.be/fr/category/2751/16-x-16), which is what I plan to use, but the 15x15 ducts should work as well.


  • Hardware Contributor

    @m26872 I'm trying to make a full SMD board with the smd variant of the nrf24.

    So far, my first design is a 21mm square.

    I have been thinking about a long 13mm x 100mm variant. That would allow plenty of space, at least 1 AAA, but more importantly would allow panelisation when combining with a 13x100 board for two AAA battery holders.

    This would give 3 sensor nodes + 3 battery holder boards in one 100x100 panel, or 6 sensor boards if we use your technique of "ty-wrapping" batteries.



  • A couple of more questions. In one of the pictures at the top the electrulyte 4,.7 uf capacitator is placed closer to the atmel chip and the 0.1 uf (c5) is placed closest to the edge does it matter witch capacitator goes where?

    The 10k resistor should be 1/4 or 1/8 W according to the bom. I had some small 1/6 W 10k resistors can I use them? I also have some bigger blue 10k resistor that I do not know the W rating on.

    Where did you purchase the female pin-header that are used for the chips? I have some atmega chip-sockets that are quite narrow and it is hard to fit the components underneath. I also have some other female pin-headers but they are atleast twice as high than the ones in the pictures.


  • Mod

    @AWI said:

    panelized design

    If you're struggling with panelizing boards I can recommend the excellent gerber tools from Stijn Kuipers.

    It allows you to create designs like this (10x10cm, DirtyPCBs):

    0_1454871223582_20150501-111911.jpg

    Drop him a message and he'll send you a download link.


  • Hero Member

    @Yveaux Tnhx, but I guess I am not ready for the first step (creating/ adapting a board in Kicad) yet ....


  • Mod

    @AWI Sorry, can't help you with that. All Eagle here 😅


  • Hardware Contributor

    @Yveaux I tried to find an email address on the website, but apart from a LinkIn link I could not find anything. Also, in LinkedIn you need a paying version to be able to send InMail, and I do not have a paid account. Would you care to tell me how you were able to send Stijn a message ?


  • Hero Member

    @Cliff-Karlsson You can swap the capacitors and use all resistor dissipation values. The pin headers you can find here for example


  • Mod

    @GertSanders It's been a while, but my first contact was through his Twitter account. Try that first, otherwise ping me.


  • Hardware Contributor

    @Yveaux I do not have a twitter account, so no joy. And I feel stupid to say so, but how do you ping someone on this forum ?



  • @Yveaux i remember once that i read that dirtypcbs does not allow for different designs in their panelized boards. Am i correct ?


  • Mod

    @ahmedadelhosni apparently not 😊
    The board above was produced by ditypcb's. In fact they're one of the few (only?) cheap PCB manufacturers that allow panelization.



  • @Yveaux aha. I thought that this means multiple (same) design not different. Thanks 🙂


  • Hardware Contributor

    Updated first post with share stats and info.

    Feature requests and example links will come asap.



  • This post is deleted!


  • Just ordered my first set of boards; v2.0 in Red; can't wait to try these out!

    Thanks @m26872



  • Hi

    I've just ordered a set of the PCB boards and looking forward to putting these together mainly into reed switches and motion sensors

    I have scanned the whole thread and there doesn't seem to be a comprehensive list of exactly which components are required anywhere here, well not all in one place at least.

    Can I just confirm exactly what is required to build a senor node.

    1 x PDB board
    1 x ATMega328p 28pin PDIP
    1 x NRF24L01+ radio module
    1 x 4.7uF Decoupling-Capacitor for radio (I assume these are still required??)
    1 x right angle pin header for connecting to program and connect batteries
    1 x Length of cable ducting for housing
    2 x AA batteries
    Cables for connecting batteries
    Battery connector
    1 x senor of choice
    I notice there seem to be an assortment of capacitors/regulators in most of the photos on this thread, but no definitive list of which are needed. (I am very new to all this so please excuse my ignorance)

    Extras needed
    1 x FTDI USB to TTL Serial Adapter

    Have I missed anything of my list? Also I would be really grateful for links to some of the above components.

    Sorry these are very basic noob questions, but I feel it would really helpful for people such as myself to have everything clearly listed in one place, as the main mysensors build pages do. So people know exactly what is needed.


  • Hardware Contributor


  • Hardware Contributor

    A nice additions would be a place to solder a ATSHA204A on board like the Sensebender! I'll try to make the change in KiCad!



  • @Soloam
    and a flash module for OTA Sketch Uploads 🙂



  • Thanks @GertSanders for showing me the BOM I hadn't realised it was there, but do I need everything listed there to get it working properly?


  • Hardware Contributor

    @Matt-Pitts
    I'm assuming that if a designer goes through the trouble of listing items on a bom, they are needed.

    But you are right, that is not always the case. I'm not at my Mac (using a miniscreen now), so i can not multitask.



  • Hello,
    I have problems to upload the scatch to the bare Amtel. I use an USB-TTL FTL Adaper and connect, RX/TX and Reset Pin with 100n->DTR. But I got always errors on uploading.

    The bootloader I have successfull burned with an raspberry pi and gpio (http://www.lxccu.com/hb-raspberry-bootloader-update😞

    sudo bin/avrdude -Cbin/avrdude.conf -p m328p -P gpio -c gpio -U lfuse:w:0x62:m -U hfuse:w:0xde:m -U efuse:w:0x07:m -U lock:w:0x2F:m -e -Uflash:w:1443392692398-atmega328_1a.hex:i
    avrdude: safemode: Fuses OK

    How can I got it working?
    Thank you

    Thomas



  • Have you tried to upload a standard arduino bootloader?, are you using correct baud settings for uploading?



  • @bjacobse No, used the bootloader from here (http://forum.mysensors.org/uploads/files/1443392692398-atmega328_1a.hex). This is an bootloader for the internal clock.
    Baud settings to upload the sketch or the bootloader?


  • Hardware Contributor

    @Tom71 I think the question was if you have been successful with programming a standard bootloader to a standard Arduino board and then uploading and running a sketch?



  • @m26872 Sure, but not with an bootloader (optiboot with intenal clock) on an bare Atmega. Later I will try this: http://forum.mysensors.org/uploads/files/1454449901412-7.png
    I build some MySensors with an Arduino Micro, but not with only an Atmega.

    Update: I don't know what's different, but this works. Perhaps I forget to connect Reset from FDL -> Pin 1.
    Now I can upload simple sketches.



  • I have not had success to upload a sketch via FTDI on an Arduino ProMini using Optiboot. When I flash an ordinary bootloader (Taken from the Arduino IDE), I can easily upload a sketch via FTDI.
    so that's why I recommend to flash a standard bootloader and check if you then can upload a sketch afterwards.



  • @bjacobse Witch bootloader you have taken?



  • Hi I'm just about to start ording parts of the slim node. Looking through the thread I'm thinking based on my limited knowledge of arduino, I might be better off buying chips which already have a bootloader installed?

    Can people advise, how difficult is it to upload the boot loader? Thanks


  • Hardware Contributor



  • @Tom71
    well I have not yet started to use the Mysensor specific bootloader. When I use the optiboot, I upload sketch with my USBtiny (so no FTDI), and when I use FTDI for uploading sketch I used the "Arduino Pro or pro mini (3,3V, 8MHz) w/ATmega328"



  • @bjacobse I thought the USBtiny is only to upload the bootloader, not the mysensors software.
    I did two things:

    1. Burn the bootloader atmega328_1a.hex to an bare Atmega328p with an Arduino as ISP
    2. Upload an simple scetch to the Atmega with an RX/TX uploader (I used an USB to TTL with an FTDI and also an Ardunino Uno without the Atmega chip, like here http://forum.mysensors.org/uploads/files/1454449901412-7.png) Both are working.

    I'm still waiting for the PCB. After receiving I want to build the motion sensor.



  • @Tom71
    USBtiny is a programmer, and can both burn (upload) sketch + burn bootloader


  • Hardware Contributor

    Difference is that if you use a ISP programmer you will use the complete memory. You can use ISP to upload a bootloader which is required to burn a sketch with ftdi into remaining memory but its possible to use a ISP to flash a sketch without bootloader as well.



  • @Matt-Pitts
    Depending of your Arduino, the USBtiny is easy to use. Maybe your Aeduino have the pinheader so then only click the cable and burn bootloader. I use Arduino Pro Mini and have an adapter ZIF socket that fits my Arduino ProMini
    https://learn.adafruit.com/usbtinyisp



  • @bjacobse I'm out of fucus. What was the problem? Can you burn the bootloader+sketch with an USBtiny on an bare Atmgea328p? Connected on MISO/MOSI/SCK/RESET/VCC/GND?
    The Arduino Pro Mini is different from the Atmgea328p. On the arduino is an external clock.



  • @Tom71
    Can you burn the bootloader+sketch with an USBtiny on an bare Atmgea328p?
    I have no idea - I have never tried this.
    My originally point is that I have had similar problem to upload a sketch with a FTDI on an Arduino Pro Mini that have been flashed with Optiboot, and when flashed with a "normal" bootloader I could easily upload a sketch with FTDI. I mainly use Arduino Pro Mini 3,3V 8MHz...and that have the crystals etc in place



  • @bjacobse Which Optiboot loader did you exactly use? I can try it. I have an Arduino Pro Mini.



  • I have ordered these. Hopefully they can get here soon-ish. All my prototyping is done and the WAF is dropping steadily with all the wires and components lying around.

    One question on this - separating the individual boards from the panel: dremel tool with cuter blade fine? Or do I need to use some other method?


  • Hardware Contributor

    @wergeld I just make two small cuts from each side by a side cutter, then a gentle bend over some sharp edge like the table or a cutting board.



  • @m26872 Sounds good! Current status is "at board house." Getting twitchy waiting.



  • @wergeld

    Just got a notification from DirtyPCB's that mine shipped - placed the order 9 days ago so give it some time. When I ordered mine, they were just re-opening from being closed for a week; I think it was Chinese new year or something.



  • Hello, I ordered it too yesterday 🙂 Can't wait to step forward from my breadboards with a lot wires to PCB without wires 😄

    @m26872 Thanks for sharing it!



  • @drock1985 Right. I waited until a week after Chinese new year to order. Let the hangovers end and the trainstations empty . I am looking forward to finalizing my sensor network with cases as well. I have several old plastic/wood boxes lying around waiting for a less rats-nest setup.



  • now I finally set up my first sensor board, and, as expected, I don´t receive any data from it on my gateway :suspect:

    I uploaded the sketch following the instructions from here: https://www.arduino.cc/en/Tutorial/ArduinoToBreadboard using a 16MHz Crystal.

    The sketch should run, but it doesn´t. Any ideas how to troubleshoot now?

    edit: I opened the serial monitor after I uploaded the sketch using the mwthod mentioned above and I get the message "radio init fail".
    The same sketch works on my UNO and I have no radio problem.

    Do I have to upload the sketch without the 16MHz Crystal to get it work proper?


  • Hardware Contributor

    @siod

    • Since external crystal isn't this designs standard, I think you should describe your hardware a bit more.
    • Uno fuses and bootloader?
    • "radio init fail" means nRF wiring issue in 99% of all cases.


  • I just installed the NRF module at it´s desired place as well as the two capacitors and the resistors as described above. The crystal is only used for uploading the sketch to the Atmega328 chip, described here: https://www.arduino.cc/en/Tutorial/ArduinoToBreadboard
    alt text

    So a wiring issue should not be the problem. Also, the code should have been uploaded well, because when I put the chip back to the breadboard and fire up my Arduino I at least receive the "radio init fail" message.

    I just wonder if you guys upload your sketches the same way or if you use a different setup. I know there is a way to upload the sketch without the 16MHz crystal and I would like to know if this could be the problem.

    edit: I´ve re-read your first post and also this thread http://forum.mysensors.org/topic/3018/tutorial-how-to-burn-1mhz-8mhz-bootloader-using-arduino-ide-1-6-5-r5/2 ...

    Do I have to burn the bootloader using 1MHz or 8 MHz? I don´t get why this makes a difference, only that the batteries would drain faster the higher the MHz rate is.

    I already uploaded a bootloader on my chips with a 16MHz crystal. Could I just re-upload a new bottloader using 1 or 8 MHz and overwrite the 16MHz bootloader?


  • Hardware Contributor

    @siod The lowered MHz is not to drain battery slower. To save power we want to run wihtout buck- or boost (step-up or step-down) voltage regulators. When we do that, we need to ensure all circuit components work in whole battery voltage range. A good trade-off/design is then to make the Atmega work down to the same lower limit as the nRF24L01+, which is ~1.9V. Unfortunately the Atmega is unstable at high frequencies with low voltages. That why we need a low frequency. An external 4MHz should be low enough, but an easier, cheaper and usually good enough solution is to by the ATmega "fuse settings" activate an 8MHz internal crystal together with a "divide by 8" prescaler.
    To fascilitate the use of noob-friendly Arduino IDE and concept of loading sketches and debug through a serial interface, we need to have a "bootloader" on the Atmega. The procedure you're referring to is how you put this bootloader to the ATmega. I would strongly recommend a beginner to start with ready made Arduinos in projects before starting to play with blank/bare ATmegas.
    Whether you need the 16MHz crystal, 8MHz or none depends it's current fuse settings. Bootloader and fuse settings determine how you load, debug and run your sketch.
    I think the guides, project threads, links and references provided here in the forum should be enough when you've come to the point where you can make it all the way.



  • Did anybody tested this board with an ATSHA204A on A2? The ATSHA204A works with 2.0 to 5.5 V.



  • @Tom71
    I'm waiting on my PCBs/ATmegas but thats exactly something I'm wondering as well. I'm just trying to think of how the wires look in my head while waiting for everything to get delivered.



  • ok guys, I finally set up my first sensor and it´s communicating well. I´ve attached two reed switch which work fine, only my temp snesor DHT11 doesn´t work. Are there any known issues with this sensor?

    pls have a look at my setup and my code, thank you:

    // Simple binary switch example 
    // Connect button or door/window reed switch between 
    // digitial I/O pin 3 (BUTTON1_PIN below) and GND.
    
    #include <MySensor.h>
    #include <SPI.h>
    
    // Define Node ID
    #define MY_NODE_ID 1
    
    //Kontaktschalter
    #include <Bounce2.h>
    #define CHILD1_ID 1 // Kontaktschalter 1
    #define CHILD2_ID 2 // Kontaktschalter 1
    #define BUTTON1_PIN  5  // Kontaktschalter 1
    #define BUTTON2_PIN  6  // Kontaktschalter 2
    
    //Tempsensor
    #include <DHT.h>  
    #define CHILD_ID_HUM 3
    #define CHILD_ID_TEMP 4
    #define HUMIDITY_SENSOR_DIGITAL_PIN 4
    unsigned long SLEEP_TIME = 30000; // Sleep time between reads (in milliseconds)
    
    MySensor gw;
    
    //Kontaktschalter
    Bounce debouncer1 = Bounce(); 
    Bounce debouncer2 = Bounce(); 
    int oldValueReed1=-1;
    int oldValueReed2=-1;
    
    //tempsensor
    DHT dht;
    float lastTemp;
    float lastHum;
    boolean metric = true; 
    
    //Messages
    // Kontaktschalter
    MyMessage msgReed1(CHILD1_ID,V_TRIPPED); // Kontaktschalter 1
    MyMessage msgReed2(CHILD2_ID,V_TRIPPED); // Kontaktschalter 2
    
    //TempMessage
    MyMessage msgHum(CHILD_ID_HUM, V_HUM);
    MyMessage msgTemp(CHILD_ID_TEMP, V_TEMP);
    
    void setup()  
    {  
      gw.begin(NULL, MY_NODE_ID, true);
    
      //Tempsensor
      dht.setup(HUMIDITY_SENSOR_DIGITAL_PIN); 
    
    // Setup Kontaktschalter 1
      pinMode(BUTTON1_PIN,INPUT);
        // Activate internal pull-up
      digitalWrite(BUTTON1_PIN,HIGH);
    // Setup Kontaktschalter 2
      pinMode(BUTTON2_PIN,INPUT);
      // Activate internal pull-up
      digitalWrite(BUTTON2_PIN,HIGH);
      
      // After setting up the button, setup debouncer
      debouncer1.attach(BUTTON1_PIN);
      debouncer2.attach(BUTTON2_PIN);
      debouncer1.interval(5);
      debouncer2.interval(5);
      
      // Register binary input sensor to gw (they will be created as child devices)
      // You can use S_DOOR, S_MOTION or S_LIGHT here depending on your usage. 
      // If S_LIGHT is used, remember to update variable type you send in. See "msg" above.
      gw.present(CHILD1_ID, S_DOOR); 
      gw.present(CHILD2_ID, S_DOOR); 
      //Tempsensor
      gw.present(CHILD_ID_HUM, S_HUM);
      gw.present(CHILD_ID_TEMP, S_TEMP); 
      metric = gw.getConfig().isMetric;
    }
    
    
    //  Check if digital input has changed and send in new value
    void loop() 
    {
      //Kontakstschalter 1
      debouncer1.update();
      // Get the update value
      int valueReed1 = debouncer1.read();
     
      if (valueReed1 != oldValueReed1) {
         // Send in the new value
         gw.send(msgReed1.set(valueReed1==HIGH ? 1 : 0));
         Serial.println("Button 1 geschaltet");
         oldValueReed1 = valueReed1;
      }
      //Kontakstschalter 2
      debouncer2.update();
      // Get the update value
      int valueReed2 = debouncer2.read();
     
      if (valueReed2 != oldValueReed2) {
         // Send in the new value
         gw.send(msgReed2.set(valueReed2==HIGH ? 1 : 0));
         Serial.println("Button 2 geschaltet");
         oldValueReed2 = valueReed2;
      }
      
     //Tempsensor
    
     delay(dht.getMinimumSamplingPeriod());
    
      float temperature = dht.getTemperature();
      if (isnan(temperature)) {
          Serial.println("Failed reading temperature from DHT");
      } else if (temperature != lastTemp) {
        lastTemp = temperature;
        if (!metric) {
          temperature = dht.toFahrenheit(temperature);
        }
        gw.send(msgTemp.set(temperature, 1));
        Serial.print("T: ");
        Serial.println(temperature);
      }
      
      float humidity = dht.getHumidity();
      if (isnan(humidity)) {
          Serial.println("Failed reading humidity from DHT");
      } else if (humidity != lastHum) {
          lastHum = humidity;
          gw.send(msgHum.set(humidity, 1));
          Serial.print("H: ");
          Serial.println(humidity);
      }
    
      //gw.sleep(SLEEP_TIME); //sleep a bit 
    
    } 
    
    

    http://abload.de/image.php?img=20160306_11174141u66.jpg



  • @siod my understanding was that the voltage which is provided by the slim node wouldn't be suitable for the DHT11 and DHT22, as they require a minimum of 3.3v. There is some discussion here on the DHT22, which I understand has the same voltage requirements as the DHT11.


  • Hardware Contributor

    @siod I'm pretty sure DHT nor DS18B20s won't work at 1MHz.



  • Oh man, one problem solved, next just comes up...

    So what can I Do now? Just upload the 8MHz bootloader and just use 8MHz instead of 1MHz?

    edit: Ok, tested it, it works with the 8MHz Bootloader!

    please explain one more time if I could just use the 8MHz Bootloader, I still could not fully understand why I should use the 1 MHz Bootloader (maybe because of my bad english and also my lack of electronics knowledge). Thank you very much!!

    edit2: I measured 0,02 Ampere consumption, isn´t that too much?


  • Hardware Contributor

    @siod Either your Atmega328p or you DHT22 will work unstable as your battery drain and voltage drops. I haven't tested and don't remember the specs, but my guess is that DHT will stop working very soon with battery <3V.

    I suggest you choose this or this design.



  • OK thx for the hint, I guess I will just add a third AA battery, that should solve my problem...



  • @siod
    Attention this can damage your nrf24 Module.
    Greets Eddie



  • I really don't want to spam this thread...

    But from my arduino Uno the nrf24l01 module is also powered by 5V!?!

    Edit : ah ok, the arduino is going to regulate down to 3.3v... Then I cant use 3AAs 😞



  • @siod I was in much the same position as you, but the simple suggestion is to use the SI7021, as per this thread. Otherwise, the links in the other thread are for the 5v builds.



  • I wasn't aware that the nrf24l01 is so sensitive to voltage higher than 1.9v. I would like to have a sensor design to which I can add different sensors, just for the purpose I need it right now. So most sensors need 3.3v or 5v and I have to decide if I use 3v cells, which are more expensive or use step up / step down regulators which will drain my batteries. I just want to keep the flexibility to add any sort of sensor to my board... What would you suppose to do, also I think I am not the only one who faces those problems. Of course I am a beginner and still have a lot to learn but I also just want to finish this project as I am working on it for a very long time now...



  • when you are gonna to use some power up/down converter, them will need more power, so your battery will be faster empty.
    If you make your circuit so simple as possible, so you can reach the longest battery time.


  • Hardware Contributor

    @siod said:

    I wasn't aware that the nrf24l01 is so sensitive to voltage higher than 1.9v.

    Typo? I suppose you mean 3.3V.

    I would like to have a sensor design to which I can add different sensors...

    Please reply why you don't like those two designs I linked to in my last post above.


  • Hardware Contributor

    5V as a supply voltage had been the standard for many decades.

    As integrated circuits have become more compact and more efficient, 3.3V and 1.8V as supply voltages have become standards as well. 3.3V for most components, 1.8V is more recent and only used in some very highly integrated circuits.

    For sensornodes based on batteries, the 3.3V standard is very usefull and most sensors are available for this working voltage.

    If you really need 5V for a particular sensor, then think about AC or USB powered nodes. 5V sensors are a bad choice for battery based nodes. The 5V sensors are mostly old designs, and very inefficient when looking at them from a powerconsumption point of view.

    So you can want to combine 3.3V and 5V sensors, but our experience is NOT to combine and make a choice for low power (modern) 3.3V sensors when trying to build battery based sensor nodes.



  • OK guys, thanks for the explanation. In this case I need to buy new temp sensors...

    The 3.7v batteries are no option for me because they are too expensive in my eyes. I didn't want to buy new temp sensors as I already bought a couple of the DHT 11 sensors but it seems like there is no other chance now.

    I just think the next time I encounter problems is, when I try to setup a new sensor node with attached pir motion sensor... I will read the data sheet of it first and look out for power consumption 🙂



  • Is there any motion sensor that work on 3.3 V ? I tried powering the below one with 3.3 but it was acting crazy and keeps reporting motions.

    http://store.fut-electronics.com/products/pir-motion-sensor-module-adjustable-range

    It is written that V range is 3-5 but it worked well with 5v only.


  • Hardware Contributor

    @ahmedadelhosni Haven't you seen the motion example sensors in the first post of this thread?



  • @m26872 yeah I know you have a topic but actually was concerned with door and window sensors that time and forgot to check it again when I needed it 🙂



  • I can't program my slim node through ISP, is there a reason it isn't working.
    I use USBASP with jumper 3 connected.
    But it can't find the node.

    someone have a clue how to solve this.

    it doesn't recognise the avr.

    This is the error i get:
    avrdude: error: programm enable: target doesn't answer. 1
    avrdude: initialization failed, rc=-1
    Double check connections and try again, or use -F to override
    this check.

    avrdude done. Thank you.



  • When i use a ziff programming board, the avr is programmeble. so usbasp is working.



  • Finally got my v2 (red) boards in. Ended up with 30 of them. Will start wiring them up this week!



  • @arnoldg said:

    When i use a ziff programming board, the avr is programmeble. so usbasp is working.

    This is solved, with the use of the right boards.txt file i now can burn the bootloader from within arduino.



  • Below is my first sketch with this awsome 2aa battery powerd board.
    i didn't measure the current. but i tryed to be as efficient with the power as possible.

    my avr is running on 8Mhz, this is becaus the DTH22 doesn't run on 1Mhz.

    #include <SPI.h>
    #include <MySensor.h>  
    #include <DHT.h>  
    #include <Vcc.h>
    
    
    #define CHILD_ID_TEMP 1               // Child id for temperatur
    #define CHILD_ID_HUM 2                // Child id for humidity
    #define CHILD_ID_VOLT 3               // Child id for battery reading
    
    #define HUMIDITY_SENSOR_DIGITAL_PIN 3 // Where is my DHT22 data pin connected to
    
    int node_id=6;                        // What is my node id
    
    unsigned long SLEEP_TIME =30000UL;    // Sleep time between reads (in milliseconds)
    int sleepcycle=1;                     // Counter to count the amout of time not sending data
    int humoffset=2;                      // only data is send if humidity is changed for this amout
    int tempoffset=0.5;                   // only data is if temperature is changed for this amout 
    int gwsendtimout=20;                  // each 20*sleep_time (10 minutes) data will be send
    
    const float VccMin   = 1.5;           // Minimum expected Vcc level, in Volts.
    const float VccMax   = 3.0;           // Maximum expected Vcc level, in Volts.
    const float VccCorrection = 1.0/1.0;  // Measured Vcc by multimeter divided by reported Vcc
    
    Vcc vcc(VccCorrection);
    
    MySensor gw;
    DHT dht;
    //Store last values
    float lastTemp = 0 ;                  
    float lastHum = 0 ;
    float batteryV=0;
    int oldBatteryPcnt = 0;             
    
    boolean lastTripped = false ;
    boolean metric = true; 
    
    boolean gwsend = true;              // to determin if data has to be send
    
    MyMessage msgHum(CHILD_ID_HUM, V_HUM);
    MyMessage msgTemp(CHILD_ID_TEMP, V_TEMP);
    MyMessage msgVolt(CHILD_ID_VOLT, V_VOLTAGE);
    
    void setup()  
    { 
      gw.begin(NULL,node_id,false);
      dht.setup(HUMIDITY_SENSOR_DIGITAL_PIN); 
    
      // Send the Sketch Version Information to the Gateway
      gw.sendSketchInfo("Humidity", "1.1",true);
    
    
     
      // Register all sensors to gw (they will be created as child devices)
      gw.present(CHILD_ID_HUM, S_HUM,"Humidity douche");
      gw.present(CHILD_ID_TEMP, S_TEMP,"Temperatuur douche");
      gw.present(CHILD_ID_VOLT, S_MULTIMETER,"Battery voltage");
       
      metric = gw.getConfig().isMetric;
    }
    
    void loop()      
    
    {  
      // get the battery Voltage
       batteryV  = vcc.Read_Volts();
       int batteryPcnt = vcc.Read_Perc(VccMin, VccMax);
    
       if (oldBatteryPcnt != batteryPcnt) {
         // Power up radio after sleep
         gwsend=true;
         oldBatteryPcnt = batteryPcnt;
       }
        
      delay(dht.getMinimumSamplingPeriod());
    
      float temp1 = dht.getTemperature();
      float humidity = dht.getHumidity();
    
      if (isnan(temp1)) {
    //      Serial.println("Failed reading temperature from DHT");
      } else if ((temp1 <= lastTemp-tempoffset)||(temp1 >= lastTemp+tempoffset)) {
        lastTemp = temp1;
        if (!metric) {
          temp1 = dht.toFahrenheit(temp1);
        }
        gwsend=true;
      }
    
      if (isnan(humidity)) {
        //      Serial.println("Failed reading humidity from DHT");
      } else if ((humidity <= lastHum-humoffset)||(humidity >= lastHum+humoffset)) {
          lastHum = humidity;
          gwsend=true;
        }
    
      if (sleepcycle>gwsendtimout){
        gwsend=true;
       }
    
    if (gwsend){     
        gw.sendBatteryLevel(oldBatteryPcnt);
        gw.send(msgVolt.set(batteryV, 1));
        gw.send(msgTemp.set(lastTemp, 1));  
        gw.send(msgHum.set(lastHum, 1));
        gwsend=false;
        sleepcycle=1;
      }
      sleepcycle++;  
      gw.sleep(SLEEP_TIME);
    }
    


  • Finally had time to solder it. Not my best job, I admit. One of the caps I tried to mount was not flush enough so I had to clip it off. Hopefully not a critical component! I made the radio removable using some header strips. Now to figure out what temp sensor to use. I have currently used just a thermister. Can DHT22 work down at ~1.9V?

    Anyway this was fun - highly recommend a needle point solder tip!
    0_1460248776746_IMG_20160409_194629.jpg


  • Hero Member

    @wergeld congratulations 👍
    For the temp sensor I suggest a si7021 board. Almost the same price as as dht22 but more accurate, reliable and versatile. It uses the I2C bus (pin A4, A5)



  • @AWI said:

    @wergeld congratulations 👍
    For the temp sensor I suggest a si7021 board. Almost the same price as as dht22 but more accurate, reliable and versatile. It uses the I2C bus (pin A4, A5)

    @AWI I saw the si7021 on another forum. Ordered a couple of the low voltage ones as I want to make my nodes with as few components as possible. I could still use my thermistor while I wait. This is a fun build!


  • Hardware Contributor

    Hello, I made a small modification to this project, hope that is ok! Now I need some help validating it! I opened a new topic to avoid going side topic in this one:

    http://forum.mysensors.org/topic/3642/m26872-slim-node-mod

    Thank you all


  • Hardware Contributor

    @Soloam I'm happy that you've picked up the design. That's what this openhardware is all about. Also very good that you made a new topic! So, let's continue there. I'll follow.



  • I ordered a proto pack on 15th of April and received it on 30th of April. Pretty fast, I think. 🙂



  • Hm, I built some nodes and messured the current with a Fluke 179: 15mA even with a minimal sketch with sleeping enabled. AVRs are not from china, but the NRF24 are. So, is the radio the problem?

    Greetings



  • (i am using MySensors 2.0.0beta)


  • Hardware Contributor

    Could be radio, but who knows? What troubleshooting steps have you taken? Hw-, sw-variations etc. Please post your sketch. Perhaps are there any SlimNode users with working MyS 2.0.0 beta that can share some info.


  • Hardware Contributor

    @m26872
    I have had a bad radio which would not go to sleep and consumed around that amount all the time (also when I used SLEEP in the 2.0 library).

    Switching the radio to another one fixed it. All my radio's are from China, so they are normally OK. But you can get bad ones once in a while. Given the low cost I do not care and swap them when needed.



  • Ok, where to buy NRF24's which are genuine for sure and not too expensive in europe?


  • Hardware Contributor

    @rollercontainer
    No idea, I'm quite happy with the radio's from China (1 bad one on 25 pcs so far).



  • Thx, Gert. Are you using 1.5 or 2.0.0beta?


  • Hardware Contributor

    @rollercontainer
    I use the 2.0 beta



  • Bought another 2 radios from different dealers. The one with the blob on the die is going down to 2mA, but isnt working at all (node does not come up). The next one is working, but again 15mA. This is frustrating. Anyone here with a good source for radio modules?

    Even with a stripped down sketch without any sensors with only delay and sleep in the loop, the current stays the same.


  • Hardware Contributor

    @rollercontainer
    I get my radio's from an Aliexpress store called AAA+ (or something with a lot of A's in the name).



  • @26872, It's my first post here and I had to register so that I could give you my regards for your work and for sharing it with us! Just ordered a batch of your v2 boards.

    I have similar design sensors running on proto-pcbs, but your ready-made pcb makes everything much more convenient.

    Just had a question on stability of running regular Arduino 8mhz internal clock bootloader for prolonged time. Anyone tried this and had success running the 328 down to 2v (or so) @ 8mhz? If this is a doomed idea, I will have to attach the boost circuit to this design, but it would be nice to avoid all that parasite current consumption.


  • Hardware Contributor

    @Bobcat
    I have had an atmega328 run down to 1V6 at 8Mhz before failing completely, so working down to 2V should be OK. The nrf24 will likely stop around that point as well (lower limit is 1V9 for that chip).



  • @GertSanders
    Thank you for the reply! Was the atmega doing some clock critical tasks when it went below 2v? I am thinking to attach BME280 (Pressure/Temp/Hum) which also operates in the same voltage range, but not sure if the I2C will be working properly when atmega goes overclocked.


  • Hardware Contributor

    @Bobcat
    The nice thing about I2C is that the clock is generated by the atmega328 (the master), so even if this clock slows down due to low voltage (this happens a little when using the internal oscillator), the I2C devices on that bus just follow.
    We can also use SI7021 (temperature and humidity sensor) at these low voltages for the same reason.



  • Hello all

    I´m Henrik, first post here and sort of beginner at this ( use to do some embedded stuff some 15 years ago and picked it up again recently )

    I just did a shopping list for this project, Version 2.0 if I got it correct 😃
    here it is: http://my.aliexpress.com/wishlist/shared.htm?groupId=3106453469
    As an example it should be about 20 euros if you buy to be able to make 5 whole sets.

    I added 3 additional and optional things to the original BOM:
    battery holder + battery connector to make it easier to change them ( I think )
    straight pins

    I did this for people searching for the components needed that does not have any or very few before starting the project.

    Only thing extra needed I think would be some additional cable and a arduino UNO or some other way to program the single chips. But I assume you already have a UNO if you read this 🙂
    And a soldering iron and that stuff.

    (if even one person found this useful I guess it fulfilled its purpose)

    //Henrik



  • can someone tell me if I can find Version 2 on the new site: http://dangerousprototypes.com/store/pcbs
    ?

    I never ordered any pcb´s like this before so I don´t want to get it wrong =D.
    If the models are not there to choose from unlike the old website, what file do I need to upload to have them print the board?

    thanks for any help


  • Admin

    @badmannen

    @m26872 has prepared for ordering this board directly on openhardware.io. Easy and you give something back to him.



  • Received mine from DirtyPCBs - I just wanted to test the whole system. I guess my first question is: how do you guys break them apart? Since tthey come in 3-circuits-per-board with little holes.
    I don't want to ruin them! 🙂


Log in to reply
 

Suggested Topics

  • 8
  • 3
  • 2
  • 1
  • 7
  • 90

0
Online

11.4k
Users

11.1k
Topics

112.7k
Posts