Arduino365 part 3: Brown-out Detection

By:
Posted: 17th July 2019
Category: Arduino
Comments: 0

This is one of the things that will help keep your project(s) going. I find it very strange that when you receive the UNO by default it is set to trigger the brownout at 2.7 volts. According to the specs the processor is / should be running at 10 Mhz at that voltage which makes no sense to me as apparently it runs at 16Mhz out of the box (correct me if I am wrong). Quite confusing if you ask me. However the idea behind this (BOD) is that when the voltage drops under a specified threshold the code execution is being stopped (reset state) until the voltage recovers. I would strongly suggest to program the arduino to trigger the brown out detector at 4.3 volts. You can have a look at the official arduino spec sheet to see what I am talking about:
I have one uno running my 365 project (BOD fuse set to 4.3 volts). It had an issue where the web server stopped responding due to the failing power supply - it is up and running again (11 days so far and counting). I have another uno from the same manufacturer (Elegoo) and I have decided to configure it the same way so I can test how it actually behaves when voltage changes - especially the 4-7 range. I have also purchased an unbranded arduino uno clone with the intent to put it through its paces with default BOD settings. For the test I have attached a single relay that gives me a very basic visual and auditory feedback on what is happening when I mess around with the voltage. The sketch used is provided below (switches the relay on and off for 3 seconds every 3 seconds):

 #define CH1 3   // Digital Pin 3 on Arduino to CH1 on Relay Module

void setup(){
//Setup all the Arduino Pins
pinMode(CH1, OUTPUT);
//Turn OFF any power to the Relay channels
digitalWrite(CH1,HIGH);
pinMode(LED_BUILTIN, OUTPUT);
}

void loop(){

digitalWrite(LED_BUILTIN, LOW);
delay(500);

digitalWrite(CH1, LOW);
delay(3000);
digitalWrite(CH1, HIGH);
delay(3000);

digitalWrite(LED_BUILTIN, HIGH);
delay(500);
}

The unbranded uno goes first. What is interesting is that at 4.7-5.0v the entire setup appears to be working (the code is being executed). The arduino is blinking, the relay also seems to have its led on and off, but the coil is not being energized at all. This shows me that I would rather not have the code running at all in this case. I understand that here the relay only resets the arduino itself but imagine if this would be a sensor that would be feeding you with weird / odd data. Nobody deserves that! I would prefer to not receive data instead of receiving bad data. At around 5.2v and above the relay seems to be working fine. I managed to put my finding into a short video. Please excuse the quality - did not have my smartphone holder nor the usual lights...

Now the Elegoo.... At 4.7-6.1v the board does not execute any code... Which is great! This gives me a hope that at this voltage the board will just sit there and wait for a better day to do something (run the code you programmed onto it). It does start to operate when the voltage hits 6.2v. I am not really sure if this is a perfect scenario but it is better + it is the best you will get. Below a quick clip documenting this behaviour.

Hmmmm.... there is one more thing that bugs me. The relay that I am using here requires 5v to operate properly. When I feed the uno with 6.2v via the barrel jack does it actually get converted to 5v on the arduino power pin??? And after a quick check with the multimeter the short answer is no... However at 6.2v input I get around 4.35v on the 5v pin, at 6.5v I get 4.6v and at 7.0v I get 4.9v. Based on that the best bet would be to only allow your code to run at 7v at the barrel jack (however can't be done via BOD because 4.3v is the top setting you can set). It also seems that certain electronics have a tolerance and don't really require the voltage specified and can operate at slightly less ideal conditions (I could be wrong). So the best thing to do with your 24/7 project would be to connect it like I did to a step down converter and see if the attached stuff does work properly at the 6.2v at the input of the arduino. There is nothing you could do to fix the problem if it does not - maybe there is. That is something for another day to investigate. Hope this helps.

Hey, like this? Why not share it with a buddy?