Hot answers tagged

5

There is a basic error in your methodology which leads to incorrect conclusions. You cannot determine what is going on from just two data points. Instead you need far more. Here is a voltage sweep from 5V to 12V with a 0.05V resolution (overkill, but the default setting for the script I use) connected to a Mega: As you can see the current steadily climes ...


4

ATTINY's are designed to easily do this since they can wake from power down sleep mode by a pin change... Basically you want to... Connect a normally-open push button between an IO pin and ground. Enable the pull-up on the IO. Enable the pin change interrupt on the IO pin. Enable interrupts. Enter "power down" sleep mode. When the button is pushed, it ...


3

You are wasting a lot of power in your system. You need to be far more efficient when running off battery. Don't boost your battery voltage to 5V. Instead use a system that runs entirely at 3.3V. Never use a linear voltage regulator like the AMS1117 since it just wastes power as heat. Instead use a switching "buck" regulator. Turning off modules when not ...


3

The TIP120 is possibly the worst transistor you could choose for this job. It is a Darlington Pair transistor, and those have a (relatively) massive forward drop of between 2 and 4 volts. It works with the LED because an LED needs a tiny amount of current to operate compared to the motor and has a fixed forward voltage of its own. The motor doesn't, and is ...


3

So you want to use the 5V voltage regulator on the Arduino serve as the supply for your 5V components, and feed the 5V regulator from the 12V supply that powers your solenoid? The problem with that plan is heat. The voltage regulator on the Arduino is a poorly heat-sinked (heat-sunk?) "linear" regulator. A linear voltage regulator is basically a solid state ...


3

Look at the datasheet of the ATtiny45. In the section “Sleep Modes”, there is a table that lists the wake-up sources available for each sleep mode. For the mode “power-down”, INT0 is listed as a possible wake-up source, but there is a small footnote: For INT0, only level interrupt. This means that the CHANGE mode you are trying to use will not wake-up ...


3

This looks like something out of an Arduino n-part “sensor kit”. It’s hard to tell because the quality of the image is not very good. My guess is, this is an analog temperature sensor, like in this link, part number 18. You can also find an example sketch there.


3

As mentioned in the comments, you cannot power your robot from a 9V block battery. These are made for low power projects (like a smoke detector) and cannot provide enough current to drive even only the motors correctly. Using 2 of them does not really help much. You need to change to a different battery type. If you want to stay with alkalines, you could use ...


3

I think the answer to your question can best be summed up by one word: "Kinda". The best reasoning is the NodeMCU Lua documentation which states: Time keeping on the ESP8266 is technically quite challenging. Despite being named RTC, the RTC is not really a Real Time Clock in the normal sense of the word. While it does keep a counter ticking while ...


2

You set the variable data only in the setup function. You also do not print out data to Serial but the output of rtc.toString(buffer). If data is not updated in the loop method, the display constantly shows the time you initially set in the setup method.


2

Two of those 10mA come from the ATECC608 crypto chip which idles at 2mA. That leaves 8mA for you to track down. The WiFi-NINA module has multiple "sleep" modes that range from 30mA down to 4.5µA. Since you can't be in the 30mA "modem sleep" mode (it's too high for your measurements) I suspect it enables "light sleep" at 800µA. The switching regulator ...


2

Late to the convo but quick comment in case anyone else reads this thread still. Arduino uses a linear regulator on Vin. In that case the “extra” voltage gets wasted. You’d get a much more efficient battery use by using a buck or boost circuit to provide it the correct 5V on the 5V pin (or usb) rather than feeding a 2S LiPo into Vin. It would work both ways ...


2

If the sensor does provide two defined voltage levels, you do not need a pullup or pulldown resistor, but if it's only a switch: either (closed) connected to Vcc or GND, or (open) not connected, you need a pullup or pulldown resistor to get a defined voltage level in case there's "nothing else" (except the wire to the switch catching noise out of the air) ...


2

I realize that power is flowing the entire time the switch is open, which may (or may not) drain the battery. No, it doesn't. You get a small spike as the switch is opened or closed, as the gate capacitance is charged or discharged, but other than that there is negligible current draw by a pin, which remains static regardless of the direction of the biasing ...


2

The input current does not depend on the pin level. Have a look at this discussion from avrfreaks. The input impedance of a digital pin is extremely high. The leakage current of the Atmega328P (here as example chip) is mentioned to be 1uA for both pin states. So this current is both unavoidable and neglectable from a normal view. But the input impedance of ...


2

Your strip has 2 LEDs with different color temperature directly besides at the same spot for every element of the strip. So the adjusting of the overall color temperature is done by changing the relative brightness of both LEDs. If the LED with the warmer light is brighter, the overall color temperature will also be warmer. Common Anode means, that V+ is the ...


2

AFAIK, Arduinos are set up to use their operating voltage as the analogRead reference voltage by default. So, what I think is happening is that you are trying to measure the battery voltage with the battery itself as a reference voltage. This will, of course, always show "full scale". You could use a voltage divider to bring the measured battery voltage ...


2

3 different ways to power the Mega2560 besides connecting to a PC: 7.5V to 12V 'wallwart' supplying DC to the barrel jack. 5V wallwart connected to the USB port. 5V wallwart connected to the 5V/Gnd pins on the Power header.


2

Does the MB-102 can handle Arduino Uno, SIM900 and 3 other modules that requires 5v? You mean because the current requirements? The answer is yes and no. No, because the needed current must not flow through the Arduino. The SIM900 draws up to 2A, that current would fry the protection diode/voltage regulator on the Arduino (though you may get away with a bit ...


2

I've seen people saying something about putting the grounds of the board and the module together Yes, I believe this is what you need to do. Servo is connected by to pin 10, and the ground and power are both routed through the 5V power module which is attached to a 9V battery. From what I understand, you are wiring like this Servo 5V - 5V Power module ...


2

That is a perfectly legitimate use of the RESET pin. Holding the chip in reset perfectly valid. Everything in the chip will be stopped. Releasing it will start your sketch from the start again perfectly fine. The only negative point is that your switch will be pulling power through the reset pin's pullup resistor, so will waste a little power.


2

The only way to keep millis() running is sleep mode is to sleep in SLEEP_MODE_IDLE. Switching to Timer 2 would make no difference, as all timers but the watchdog are stopped in other sleep modes. The watchdog is horribly inaccurate, so you do not want to rely on it for any kind of timekeeping. I don't see much advantage to sleeping for 1 ms. Sleeping for ...


1

First I was unable to make the intterupt work for multiple pins, but finally here is a working code: #include <avr/interrupt.h> #include <avr/sleep.h> ISR(PCINT0_vect) { if (digitalRead(0) == LOW) # PB0 = pin 5 pressed => LED on digitalWrite(4, HIGH); else if (digitalRead(1) == LOW) # PB1 = pin 6 pressed => LED ...


1

standard current you can draw from a usb port is 500 mili ampere with 5 volt(you may get even more but it is not recommended) . so if you want to calculate sensors are very low current about 1~2 mA(but you must check out datasheet) turbidity for example draws 30 mA temperature ds1820 is 1 mA flow is up 2 mA the LEDs based on resistors series with them ...


1

Does this mean that even with the external power supply the Arduino will be connected to the UGND, and in effect the protective earth? Yes. Would it be ok to remove the jumper connection between UGND and GND? No. I don't know quite why they provided that jumper. I can see no scenario in the datasheet where it suggests the two can be separate. Or ...


1

Yes, the i/o can source 40mA @ 5v (or 3v3) per pin, but the limit is'nt 40mA from each pin simultainiously but the limit is the processors dissipation. Read the 328A data sheet carefully and the truth will become clear.


1

There is a maximum current you can use from the 5V pin(s), so it is good to split the current going into the Arduino. You can use a breakout board for a USB, connect the USB to the breakout board, connect it both to the Arduino, and in parallel to the sensors; meaning the current used for the sensors is not going through the Arduino. You might need 2 break ...


1

There is a chance that this arrangement could damage the servo and possibly the Arduino. The problem is that, depending on the internals of the servo, it could try and draw power for the servo through the data pin when the button is not pressed. This would both over-stress the internals of the servo and the internals of the Arduino's GPIO pin. What you ...


1

FYI, this issue was brought up nearly 3 years ago, with no response from the author: https://github.com/rocketscream/Low-Power/issues/36


1

Chances are the cheap Chinese clone board you have has an inferior 5V regulator with no thermal protection. These are notorious for breaking with a short circuit (over-current = over-temperature = meltdown). And when they break they "fail short", which means that they end up working like a simple piece of wire - the voltage you put in is the voltage you ...


Only top voted, non community-wiki answers of a minimum length are eligible