The combination of real smarts and utter stupidity as shown by many mainlanders continues to surprise me.
Smart enough to design a MCU from scratch, and produce it cheaper than the original.
Stupid enough to not be able to start your own brand - pin compatible, cheaper, just missing some lesser used functionality (like very low power in deep sleep).
I did lift only the VCC Pin on USB chip and left the ground connected, I did pinMode D0 & D1 as INPUT, and no change in current draw. (I also put a switch in for Vcc to see if turning it on and off makes any difference and it is extremely small difference like .01ma) I am not too concerned because I have given up on the clone chip , still waiting for my Spark Fun Pro Mini to arrive.
Thanks for sticking with me on this!
What would really be useful would be Nano and Pro Mini boards that come with everything but the processor. Then you could buy genuine processors from Digikey and solder them on. Having to remove fake chips first can complicate things, plus you shouldn't have to pay for the fake chips in the first place. But I've never seen such boards.
The schematic I have for the Pro Mini, which I believe is the Sparkfun design, shows a jumper (SJ1) described as the Power Isolation jumper. If you open that jumper, then the regulator and the power indicator LED are disconnected from everything downstream, and you would apply power at the VCC pin. So that means you don't actually have to remove the regulator or LED to disconnect them from the circuit, and if you ever wanted them back in the circuit, you could just put a solder blob on jumper.
It is possible to build this with no standby power other then the wire leakage and battery losses. That says no pull up or pull down resistors, semiconductors etc active during sleep mode. You can do this a contact closure, a MOSFET or Transistor and a few other parts. There are many circuits on line. The circuit was posted here a while back if my memory is correct.
Well it's amazing how well things work when you get genuine equipment!
ShermanP,
your low-power test circuit does indeed draw will 0.1ua.
And so does the circuit below and I have the switch on PD2 working as the wake up button then it goes back to sleep after lighting LED as well which is what I was after thanks so much!
#include <LowPower.h>
int but2;
void wakeUp()
{
// Just a handler for the pin interrupt.
}
void setup()
{
// Configure wake up pin as input.
// This will consumes few uA of current.
pinMode(2, INPUT_PULLUP);
pinMode(5, OUTPUT);
}
void loop(){
// Allow wake up pin to trigger interrupt on LOW.
attachInterrupt(0, wakeUp, LOW);
// Enter power down state with ADC and BOD module disabled.
// Wake up when wake up pin is HIGH.
LowPower.powerDown(SLEEP_FOREVER, ADC_OFF, BOD_OFF);
// Disable external pin interrupt on wake up pin.
detachInterrupt(0);
// Do something here
// Example: Read sensor, data logging, data transmission.
but2=digitalRead (2);
if (but2 == LOW)
{
digitalWrite(5,HIGH);
delay(500);
digitalWrite(5,LOW);
}
That's great. If only we could find clones that reliably used genuine chips. Actually, while the genuine Arduino Nano is pretty expensive, that Sparkfun Pro Mini isn't all that much more than a clone these days.
Unfortunately, Amazon is no longer a reliable source of clones. The fakes I've bought all came from there. I think it's the same at Banggood, which used to be very reliable and cheap. And of course AliExpress would be out of the question, although I guess you could get lucky.
I'd still like to find clone Nano and Pro Mini boards where the 328P is unpopulated. You can still get genuine chips from Digikey and Mouser.