Oscillator Circuit not working

Has or can anyone try this circuit? Its not working for me. The LED doesnt light up when I plug the power in. I checked the LED and it works fine. I switched to other 2n2222 transistors and other 3906 and another electrolytic 22uF cap thinking I might have burnt out my original ones while testing but stil nothing.

I got it from here:https://www.dorkbotpdx.org/blog/paul/battery_pack_load

Im unsure about the connection of the cap and LED. Wondering if my leads are connected in the right order.

Looking at the circuit, It looks like the switch is used to set the cap and once power is applied you need to open it???. I am kind of guessing here. Also at the bottom of the post they state they needed to change the cap to a 47 uF.

Thanks. We'll I'm not using the switch. But I did try it with a 22uF and it didn't work at all which is surprising. I'll try the 47uF but as for the connections like the cap, I don't have a ceramic one, I have an electrolytic one of I'm putting the negative end of the cap towards the base of the pnp and the led I'm putting it's negative leg to GND.

47uF ceramic cap? I can barely find them online. All I find is either electrolytic or smd.

Could it be 47 nF?

it didn't work at all which is surprising

Not surprising at all. What worked for that author's battery pack may not work for any other.

If you have bothered to read the article carefully, the circuit was not even 100% reliable for the author's battery pack.

If you look at his breadboard he is using a electrolytic to test. This is what he said "I increased the capacitor to 47 uF and it ran for an hour. " if you are having problems finding 47uF use 2 22uF in parallel or use 2 100uF in series plus to plus.

Thanks 1Steve: I have a 22uF but its an electrolytic. From the picture I saw he is using a ceramic one, the orange-yellow round like caps.

jremington: I did see about the 47uF but since I dont have a 47uF, I began asking about the 47nF. Anyway, I do have 22uF and 47 uF and 100 uF but theyre all electrolytic (black cylinders) with a - terminal and a positive terminal. So in this case, which way should I connect the - terminal and which way the + terminal of the cap?

Ceramic, electrolytic, same difference for this circuit.

Wouldn't trust this circuit. Doubt that it will work, and charging a 47uF cap through the BE junction of a signal transistor can't be healthy for that 3906.

Why can't you let the Nano do this. Leo..

Wouldn't trust this circuit.

Agreed. Bad design all around.

Because I want the nano to go to sleep in order to save power. But I don't want the battery pack to shut down because it'll prevent my nano from waking up.

Wouldn't I need to have a separate tirgger? Otherwise the nano would have to stay on and use up power.

Don’t use that sort of battery pack.

Instead, study and benefit from Nick Gammon’s excellent tutorial on low power operation.

Have a look at this :

https://www.dummies.com/programming/electronics/components/electronics-components-oscillator-circuits/

Or use a 555

I have studied and used Nick's tutorials. But even if I do use all low power techniques, the battery pack will eventually run out of power and this battery pack is a solar recharging one with a built in solar panel which would give it total autonomy.

So - problem solved?

ps the circuit is lousy.

Allan

OK so you're all telling me the solution is to use a 555 timer chip?

If you HAVE to use a powerbank, then why not let the Nano keep the powerbank alive with a transistor/load. Wake the Nano just before the powerbank shuts off, activate the load for x milliseconds, sleep the Nano. Leo..

Leo

Well I'm not sure if I'm confused but in order to do that doesn't the nano have to be awake? Which means I have to wake it up every 10 seconds?

Well I mean I guess it's not that bad. Currently I use this code to put it to sleep and wake it up in order to run the motor:

#include <avr/wdt.h>            // library for default watchdog functions
#include <avr/interrupt.h>      // library for interrupts handling
#include <avr/sleep.h>          // library for sleep
#include <avr/power.h>          // library for power control

int nbr_remaining; 

#define led 13
#define motorPin 10

ISR(WDT_vect){
        // not hanging, just waiting
        // reset the watchdog
        wdt_reset();
}

void configure_wdt(void){
  cli();                           // disable interrupts for changing the registers
  MCUSR = 0;                       // reset status register flags
                                   // Put timer in interrupt-only mode:                                       
  WDTCSR |= 0b00011000;            // Set WDCE (5th from left) and WDE (4th from left) to enter config mode,
                                   // using bitwise OR assignment (leaves other bits unchanged).
  WDTCSR =  0b01000000 | 0b100001; // set WDIE: interrupt enabled
                                   // clr WDE: reset disabled
                                   // and set delay interval (right side of bar) to 8 seconds
  sei();                           // re-enable interrupts
 
}

void sleep(int ncycles){  
  nbr_remaining = ncycles; // defines how many cycles should sleep
  set_sleep_mode(SLEEP_MODE_PWR_DOWN);
  power_adc_disable();
  while (nbr_remaining > 0){ // while some cycles left, sleep!
  sleep_mode();

  // CPU is now asleep and program execution completely halts!
  // Once awake, execution will resume at this point if the
  // watchdog is configured for resume rather than restart
 
  // When awake, disable sleep mode
  sleep_disable();
  
  // we have slept one time more
  nbr_remaining = nbr_remaining - 1;
 
  }
 
  // put everything on again
  power_all_enable();
 
}

void setup(){
  
  // use led 13 and put it in low mode
  pinMode(led, OUTPUT);
  digitalWrite(led, LOW);
  
  delay(1000);
  
  // configure the watchdog
  configure_wdt();

  // blink twice to indicate motor will turn on
  digitalWrite(led, HIGH);   
  delay(500);               
  digitalWrite(led, LOW);   
  delay(500); 
  digitalWrite(led, HIGH);   
  delay(500);               
  digitalWrite(led, LOW);   
  delay(500); 

  digitalWrite(motorPin, HIGH);
  delay(20000);
}

void loop(){

  // sleep for a given number of cycles (here, 5 * 8 seconds) in lowest power mode
  sleep(100); //8sec x 5 cycles=40s....8sec x 1000 cycles=8000sec or 133 mins

  // blink three times to indicate mcu will sleep
  digitalWrite(led, HIGH);   
  delay(500);               
  digitalWrite(led, LOW);   
  delay(500); 
  digitalWrite(led, HIGH);   
  delay(500);               
  digitalWrite(led, LOW);   
  delay(500); 
  digitalWrite(led, HIGH);   
  delay(500);               
  digitalWrite(led, LOW);   
  delay(500); 

}

No experience in sleeping Arduinos, but waking every 10seconds shouldn't be a problem powerwise. The current needed to keep the powerbank awake will be higher than what the Nano uses. Leo..

you could use a Astable multivibrator or free-running squarewave generator.

http://www.nutsvolts.com/magazine/article/bipolar_transistor_cookbook_part_1

Look at figure 20

If you don't want to use the 555.

Marciokoko: OK so you're all telling me the solution is to use a 555 timer chip?

Why not? We still use wheels.