Newbie starting his HA project



  • I hope it's OK to start a new thread here! I wanted to use it to document my first steps in building some of the mysensors.org hardware, customised to my specific needs.

    First, my initial objectives

    1. Build the ethernet/MQTT gateway, for which I'm awaiting a few parts
    2. Monitor the temperature in several rooms in the house, so that I can add some EQ3-MAX and the cube to control the thermostats
    3. Add some motion sensors to supplement what my house alarm does, by monitoring the house
    4. Get Owntracks working
    5. Get this all integrated with OpenHab running on a pi2
    6. Get a tablet wall mounted with the OpenHab GUI

    So far, what I've done

    1. Built a single Microbender sensor with the NRF2401 radio module
    2. Installed and configured OpenHab on the pi2, connecting to the default interface

    Next steps

    1. Build the ethernet/MQTT gateway once all the parts arrive
    2. Get the temp sensor working with it, including adjusting the temp and humidty to display "real" values
    3. Look to build the motion sensors, likely basing them on (http://forum.mysensors.org/topic/2715/slim-node-as-a-mini-2aa-battery-pir-motion-sensor)
    4. Buy the EQ-MAX stuff and configure OpenHab


  • And I have my first question! I wanted to see how to upload firmware/bootloader to the Microbender, but following this (http://www.mysensors.org/hardware/micro#wiring-things-up) I'm unsure what pins I need to connect.

    This picture (http://www.mysensors.org/hardware/micro_ftdi.png) shows the FTDI adapter, but it was provided without the pin connector, and I can't see from the picture exactly which pins I need to solder it to. Any guidance appreciated.


  • Mod

    The ftdi pins are listed on the image named "Available pins" on your first link.
    Connect Vcc to Vcc, GND to GND, RxD to TxD and TxD to RxD.



  • Thanks! Apologies, I don't think I was clear enough in my question, so I thought I'd make it easier and post some pictures. What I'm trying to make sure I get right is to solder the "pin thingie" onto the FTDI adapter correctly. It came like this:

    http://i.imgur.com/U9eo7Mc.jpg

    And my sensebender looks like this (hopefully I got that right).

    http://i.imgur.com/LJKzuaP.jpg

    What I understand I need to do is to solder the "pin thingie" onto the FTDI adapter and then connect this to the sensebender. So which pins on that do I need to solder to, the ones on the outer edge of the circuit board? Also, does it matter which way I solder i.e. which side the "pin thingie" is on the FTDI adapter?



  • OK! Update. All the bits and pieces arrived, so I've built the gateway (MQTT client, as I already had an Openhab Pi 2 running MQTT) - this appears to work fine, I can see it connects to the MQTT gateway via the serial monitor.

    So the next step is getting the SenseBender Micro (with soldered NRF2401 gateway) to connect to the gateway. I initially thought it would "just work" based on what I read, but I understand that this is with either the "standard" ethernet or wireless gateway, as these assign client ID's automatically. So I need to modify the sketch with a fixed client ID and upload it.

    Here's where I'm struggling - I bought an FTDI adaptor, which I thought was 5v and 3.3v, but from what I can see it's 5v. I understand that I therefore need to resolder a little resistor (or something) on the board, but this is so tiny it's beyond my current capability. What other options do I have for getting a new sketch onto the Sensebender?



  • @rsachoc said:

    Here's where I'm struggling - I bought an FTDI adaptor, which I thought was 5v and 3.3v, but from what I can see it's 5v.

    picture of the adaptor?
    some adapters have a jumper or solder bridge to switch between 5V and 3.3V



  • @HenryWhite definitely a solder bridge, see the picture above (http://i.imgur.com/U9eo7Mc.jpg
    ), that's why I'm not confident I will be able to sucessfully desolder and solder it.



  • @rsachoc Well, you could

    If you want to switch continously between 5v and 3.3v, you should consider buying another ftdi adapter with jumper pins (or try to solder 3 pinheaders to the three solder pads)



  • @HenryWhite thanks! I suspect since I've got nothing to lose the best option is to try and desolder/break the current bridge and try and resolder it. Let me have a go and see what happens.



  • OK so I managed to desolder the bridge and put a dab of solder between the other 2 pins, so I think I have a 3.3v FTDI adaptor. However, I was reading here and I think, because I have the NRF2401 connected to my sensebender, that I might have fried it? Thinking 5v would have broken it?

    Also, I'm still confused as to how I connect the FTDI adaptor to the sensebender. mfalkvidd mentioned that I need to go "Vcc to Vcc, GND to GND, RxD to TxD and TxD to RxD", howeverthe sensbender pins don't seem to line up this way?

    edit just to be clear, the sensebender goes GND GND VCC RXD TXD DTR while the FTDI goes GND DTR RXI TXO PWR CTS GND, so I'm confused how the pins line up, if that makes any sense?


  • Mod

    sensebender:
    GND
    GND
    VCC
    RXD
    TXD
    DTR

    FTDI:
    GND
    DTR
    RXI
    TXO
    PWR
    CTS
    GND

    Turn FTDI upside-down:
    GND
    CTS
    PWR
    TXO
    RXI
    DTR
    GND

    now line them up:

    sensebender. FTDI
    GND GND
    GND CTS
    VCC PWR
    RXD TXO
    TXD RXI
    DTR DTR



  • @rsachoc said:

    I think, because I have the NRF2401 connected to my sensebender, that I might have fried it? Thinking 5v would have broken it?

    Maybe! But maybe not. 😄 I'm using a FTDI adapter with jumper for my 3.3v/5v pro mini's, and sometimes I forgot to move the jumper to 3V when connecting my 3V pro mini's. Nevertheless, the nrf24l01 "survived" this stupidness every time.

    Also, I'm still confused as to how I connect the FTDI adaptor to the sensebender. mfalkvidd mentioned that I need to go "Vcc to Vcc, GND to GND, RxD to TxD and TxD to RxD", howeverthe sensbender pins don't seem to line up this way?

    edit just to be clear, the sensebender goes GND GND VCC RXD TXD DTR while the FTDI goes GND DTR RXI TXO PWR CTS GND, so I'm confused how the pins line up, if that makes any sense?

    here's how you connect the sensebender to your ftdi:

    --Your_FTDI:Sensebender--
    GND:GND
    CTS:GND
    PWR:VCC
    TXO:RXD
    RXI:TXD
    DTR:DTR



  • Thank you both, I'll get soldering tomorrow - couple more (extremely rookie) questions:

    1. Do I need to have the Sensebender connected to battery and the FTDI connected to USB at the time I'm uploading the sketch?
    2. When I upload the sketch, do I need to select Board: Sensebender Micro and Programmer: USBAsp?
    3. Do I need to "Upload" or "Upload via Programmer"?


  • @rsachoc OK answering my own question 🙂 after a bit of experimentation and research

    Do I need to have the Sensebender connected to battery and the FTDI connected to USB at the time I'm uploading the sketch? No
    When I upload the sketch, do I need to select Board: Sensebender Micro and Programmer: USBAsp? Yes
    Do I need to "Upload" or "Upload via Programmer"? Upload worked for me



  • An answer, but a new question:

    I have setup a MQTT gateway (with NRF2401, Arduno nano clone, W5100 ethernet) - using the W5100 MQTT client sketch (from here), changing the necessary. I can see that this successfully boots and connects to my MQTT server (on a Pi 2 with Openhab).

    0;255;3;0;9;Starting gateway (RNNGA-, 2.0.0-beta)
    0;255;3;0;9;Radio init successful.
    0;255;3;0;9;Init complete, id=0, parent=0, distance=0
    0;255;3;0;9;Attempting MQTT connection...
    0;255;3;0;9;MQTT connected
    

    I've also successfully flashed the Sensebender .ino (from here), only changing the "//#deine MY_NODE_ID 3" to uncomment (and also correcting the spelling error 🙂 )

    Interestingly (no idea why) before I had loaded the new sketch on the Sensebender, when powering it on via battery I got the LED coming on, now with the new sketch...nothing. I also can't see it connecting to the gateway (should I see something in the serial monitor on the gateway)?

    Or could I have a fried radio?


  • Hero Member

    @HenryWhite said:

    I forgot to move the jumper to 3V when connecting my 3V pro mini's

    I have found that I can program the 5V Pro Minis with the FTDI adapter set to 3.3V so I newer change this anymore, no risk of braking something that can not handle 5V.



  • OK, so I had some success with the Sensebender, it works sometimes and not other times. I've tried connected directly to the laptop (via the FTDI, no battery connected) and sometimes it works, other times it doesn't. Would this bad soldering?

    Also, what's the minimum requirements from a voltage perspective? I've got 2 eneloops which delivers around 2.73volts, whereas the laptop measures 3.3v (tested with a voltmeter tester).


  • Mod

    Below 2.8V won't work with the Atmega328 unless you reconfigure the fuses


Log in to reply
 

Suggested Topics

  • 8
  • 5
  • 1
  • 2
  • 7
  • 1

0
Online

11.4k
Users

11.1k
Topics

112.7k
Posts