Connect with us

Pizero or arduino nano?

Discussion in 'Microcontrollers, Programming and IoT' started by Jeroen Humasol, Oct 10, 2016.

Scroll to continue with content
  1. Jeroen Humasol

    Jeroen Humasol

    Nov 8, 2015
    Hi everyone,

    I'm going to make a sensor that measures: Humidity, Temperature, solar irradiance and realtime wheight of some objects. I'm just wondering what microcontroller i would best use. I'm going to make a PCB and i'll put the microcontroller on it. I would love to use the Pizero because it's so powerfull and because it can use an sd card to store the data (less than one Mb).

    That is the biggest problem that i have with the arduino. It almost can't store data. On the other hand i fear that a pizero would use to much energy. Would it last a full day with a 2600mAh battery for a day? (It almost doesn't has to work, only when receiving data every 5min).

  2. Anon_LG


    Jun 24, 2014
    The arduino can store data, you just have to tell it to do so and squire the hardware.

    The Pi Zero draws 160ma according to the specs, I take this to mean maximum, but It may draw less depending on the usage and determining this would require experimentation. What is the voltage of your battery? It could be a single cell, in which case: 2600 mah * 1.2 Volts = 3.12 watt hours. (Then * by 80% for worst case buck converter efficiency = 2.496 watt hours) Or it could be a fully integrated 5 volt unit, 2600 * 5 volts = 13 watt hours. The Pi Zero when idle I will assume a draw of 45ma according to this guy, ~30ma can be reached when completely idle. So 45ma * 5V = 0.225 watts. 2.496 watt hours / 0.225 watts = 11.093 hours. 13 watt hours / 0.225 watts = 57.77 hours.

    More information needed. If you are using any lithium chemistry, please be careful. If it is unattended it would be best for an outside project, if inside use common sense.

    Once I have more information I can provide on arduino as well, and the data storage methods, but it is getting late now.
    Jeroen Humasol and (*steve*) like this.
  3. Jeroen Humasol

    Jeroen Humasol

    Nov 8, 2015
    Hi Lavaguava! Thanks for the reply. The battery that i'm using is a batterypack to charge a phone, so i guess it operates at 5V. Or 2600mAh*5V=13 watt hours. I'm really amased that the pizero only draws 45ma when idle, because i used a arduino mega 2560 almost the whole time idle on this battery an that lasted 55 hours. The pizero is a lot more powerfull so i assumed that it would consume more but it appears that was a wrong assumption :)

    I know that the arduino can store data in its EEPROM memory, but even for the Mega the memory capacity was too little for my application. (if i store it in the flash memory and the battery dies i lose everything).

    When i see your calculations i guess i'm going to go for the pizero, i just love the calculating power (even though i totally do not need it) of this little animal!

    PS: would it be hard to implement the pizero on a PCB? (i'll be using Altium)
    Anon_LG likes this.
  4. OBW0549


    Jul 5, 2016
    I don't know whether Adafruit ships to Belgium but if they do, this board might be an alternative worth considering. Small, lightweight, fairly powerful processor, and with a MicroSD socket built in. It can be programmed through the Arduino IDE, and can interface to a variety of sensors.
    Anon_LG likes this.
  5. Anon_LG


    Jun 24, 2014
    Ok, the battery looks like it would be suitable, at 13 watt hours, you can expect a little over two days then. Putting in the considerations of potential temperature swing, cell degradation and variable power draw depending on what the Pi is doing, I think you can safely get away with one day. It is a lot more powerful and will use more power accordingly, but when your actual workload does not include the normal things that the Pi zero can be stretched to, the power draw will be significantly lower.

    How much data are you planning to store? How much data do you collect each day? How often will the data change? What is the plan with the automation of this thing, including how the battery is charged and how often the data is collected and backed up?

    The eeprom may not be a good idea, you can only rewrite it about ~10,000 times on an steel and it becomes unreliable. Depending on the nature of your data collection and storage methods, this lifetime may be used rather quickly. On the other hand you can get an external flash chip or SD card which can be changed out at any time. Alternatively you could utilise cutting edge memory technology: Non-volatile, unlimited cycling, speed comparable to SRAM, I have wanted to use one of these instructions project since they became unavailable. They are a very good choice if you need to keep on changing data and may suffer a power out at any time. Now that I have a budget that allows, I will be trying MRAM myself.

    The Pi zero would be my choice as if you plan on furthering your project, it gives room for improvement and you can easily implement more complex code without worrying about filling up the flash.

    It would not be difficult to implement to PCB if you have a bit of practice, I have no experience with Altium, having only used EAGLE a few times. You could either remake the board yourself due to the open source nature, or you could simply purchase the premade board and have a 2*20 0.1 inch pitch block for connecting.

    Also take a look at @OBW0549 's suggestion, this does seem like a sensible choice. I would go with the Pi zero, but I do not really know the nature of your project.
  6. BobK


    Jan 5, 2010
    45mA is not a small standby current. Microcontrollers can use < 1uA in sleep mode and can run for years off a coin cell if they are sleeping nearly all the time.

    And they can communicate with SD cards.

    Anon_LG likes this.
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day