Is the arduino nano capable of



  • Hello all,

    Im currently going through my options for a project in which I want to use the following to create essentially a cost effective ecosystem controller.

    Digital pin use (12/12)
    -7 relays to control
    Light source
    Heater
    Water pump
    3x Solenoid valve
    PC fan
    -1 rgb led
    -nRF24L01+

    Analog pin use (3/8)
    -temperature sensor
    -humidity sensor
    -water level sensor

    A few questions.

    1. From my rough estimate of pinusage I seem to have enough just using the arduino nano which is what I want. I have plenty of analog pins left and im a bit confused as to why it says there are 14 digital pins but really only 12 when I count them, do TX and RX count as usable digital pins?

    2.While you normally see Arduino unos or megas being used for this sort of thing, im wondering if there is some sort of limitation im overlooking if I was to use an Arduino nano.

    1. If you can see some huge reason why the nano is underpowered to basically poll a few sensors and activate relays please point it out.

    Still in the early stages of planning but would appreciate any input from the battle hardened people here.


  • Admin

    @singhm29

    First off, you can use the analog pins as digital I/O as well (just not A6/A7, as they are input only, if they are available on the nano)

    you could use TX/RX as digital pins, but I think that MySensors are trying to initialise the serial port when calling the begin method.

    The nano is just a smaller "package" of an uno, so in theory it should have the same pins available.. (I've never owned an uno, so can't say if that's true)


  • Contest Winner

    the radio itself uses a bunch of IO. If you are using 8 relays, use a shift register and make it easy on yourself.

    here is an example of an irrigation controller using shift registers to control up to 16 relays.



  • @tbowmo
    Thats very interesting that the uno is essentially a larger version of the nano thanks for pointing that out.

    Why is it that A6/A7 are only allowed to be input only?

    @BulldogLowell
    I want to keep the additonal hardware to a minimum but thank you for pointing that out ive always wondered how to get more IO when your limited,

    Im also wondering if there are any special features I need to look for in my relay boards in order to control 12V DC solenoid valves, I know for motors and such you oftne need some kind of kickback protection. Do I need features such as optoisolation when using my 12V DC solenoid valves?


  • Admin

    @singhm29 said:

    @tbowmo
    Thats very interesting that the uno is essentially a larger version of the nano thanks for pointing that out.

    Why is it that A6/A7 are only allowed to be input only?

    It's the chip design, look in the data sheet for the atmega328p.

    I didn't check things when i made my first pcb and used a6 for a led, I used a couple of hours getting more and more frustrated because I couldn't get that darn led to blink 😉 until I read the data sheet... a6/a7 is add inputs only and not multi purpose i/o Pins.


  • Contest Winner

    @singhm29 said:

    Do I need features such as optoisolation when using my 12V DC solenoid valves?

    I think you should have them, for the very very low cost it adds. Most of the solenoid breakouts sold on eBay and whatnot have them integral to the board... so make sure that you look for that.



  • Yes that feature seems to be available without much extra cost your right.

    My next question would be can a nano handle an RTC DS1307 at the same time as an -nRF24L01+? or is there a limitation of some sorts in terms of them using similar communication resources from the nano?


  • Admin

    @singhm29

    ds1307 is an i2c bus device, while the nrf24 is a spi bus device. So they can be used at the same time (uses different pins on the arduino)

    if you go with ds1307, you could consider alternative temperature sensors, that also uses i2c bus (instead of analog inputs), and thus save on the pins used.

    if you are going to use relays, it shouldn't be necessary to add extra optocouplers to the circuitry, as they already are galvanic isolated..



  • @tbowmo
    The relays are 12VDC so the arduino can not be wired directly to the relay. the arduino should power a shift register, transistor, FET, or other semiconductor (and not pulling any more than 40mA.) and therefore indirectly controlling the 12v flow to the relay.

    I think it is wise to use optocouplers if you would want to protect the 5v circuitry against the 12v rail, but everyone should chose for themselves since the extra cost and hassle for optoisolators may not weigh up to the cost of the 5v circuit.
    all that happens when you accidentally apply 12v to your arduino is that it may smell a bit and it will never work again, witch is a quick fix with a new nano. Opto-isolation is more effective when working with 110 - 220v and when working in humid environments i.e. shower or bathroom.

    if you are going to be on the cheap side and use relays without a breakout board and/or set up your own relayboard then please pay attention to the flyback diode you should have across the coil of your relay. it prevents flyback voltage from building up and damaging your fet/transistor/shiftregister. ( even though it might not fail on the first time you try it without flyback, it will eventually and finding the problem is quite a pain)


  • Admin

    @diamantmatch

    It was just the optocoupler approach to control 12V dc from arduino that caught my attention. It's enough with a simple transistor driver to control it. And yes, always have a diode in reverse across the relay coil.

    If it's 12V relays, you probably already use the same 12V supply to power both relays, and the arduino (maybe with a voltage regulator for providing 5V to the arduino from the 12V rail), and then the optocoupler approach is defeated, as they have a common ground.


Log in to reply
 

Suggested Topics

  • 87
  • 8
  • 10
  • 5
  • 7
  • 2

0
Online

11.4k
Users

11.1k
Topics

112.7k
Posts