Arduino Forum

Using Arduino => General Electronics => Topic started by: jarus on Mar 18, 2018, 11:13 pm

Title: Tilt Switch and 555 Timer Astable Circuit for LED
Post by: jarus on Mar 18, 2018, 11:13 pm
I need to blink an LED (2.1V @350mA) @4Hz for ~30 seconds when an acceleration force is .5 g-force (+/- .1g) along one axis. The input (acceleration force) will last for 1-2 seconds. I have prototyped on an Arduino UNO and ADXL335 but now I am looking for a more cost effective solution.

I am thinking about using a tilt switch and 555 timer. I spec'd the tilt switch by converting g-force to degrees relative to the orientation of gravity (.5g = 30 degrees) . But I need help designing the 555 timer circuit.

I understand the basics of the 555 but things I am having trouble understanding are:

I am an ME so I'd appreciate any ideas, thoughts, or direction you can provide in order to achieve the most cost effective solution. Thanks!
Title: Re: Tilt Switch and 555 Timer Astable Circuit for LED
Post by: ted on Mar 19, 2018, 01:55 am
Instead 555 use this

https://fr.aliexpress.com/item/100pcs-Round-Transparent-LED-5mm-RGB-2-pin-Flash-Automatically-Fast-flashing-led-Diode-Light/32278374273.html (https://fr.aliexpress.com/item/100pcs-Round-Transparent-LED-5mm-RGB-2-pin-Flash-Automatically-Fast-flashing-led-Diode-Light/32278374273.html)
Title: Re: Tilt Switch and 555 Timer Astable Circuit for LED
Post by: avr_fred on Mar 19, 2018, 02:39 am
Lots of red flags here...

350ma to blink an led? That's some serious light. Please explain further.
Powered by a capacitor? No, you'll need a battery.
Still using the ADXL335? You don't mention it.

Can you post a schematic and code of what you've done so far? That will provide detail for many things not explained in your post.
Title: Re: Tilt Switch and 555 Timer Astable Circuit for LED
Post by: jarus on Mar 19, 2018, 03:55 pm
Instead 555 use this

https://fr.aliexpress.com/item/100pcs-Round-Transparent-LED-5mm-RGB-2-pin-Flash-Automatically-Fast-flashing-led-Diode-Light/32278374273.html (https://fr.aliexpress.com/item/100pcs-Round-Transparent-LED-5mm-RGB-2-pin-Flash-Automatically-Fast-flashing-led-Diode-Light/32278374273.html)
Interesting! Can I control the frequency of blinking? Also can I limit the blinking only to the red color?


350ma to blink an led? That's some serious light. Please explain further.

The LED I have chosen is a Philips Lumiled LXM2-PH01-0070. The application is as an emergency stop light on race motorcycles. So I chose a bright LED - perhaps there might be a better tail light LED for this application?
 
Here is the spec sheet:
https://www.lumileds.com/uploads/265/DS68-pdf (https://www.lumileds.com/uploads/265/DS68-pdf)

Powered by a capacitor? No, you'll need a battery.
Still using the ADXL335? You don't mention it.
It is powered through AA batteries but my understanding of the 555 timer and caps was wrong. I thought the external battery charged the caps and the caps powered the LEDs and 555. Now I realize that the caps just regulate the 555, and do not power the LEDs...is that correct?

I am trying to replace the ADXL335 with a tilt switch (https://www.digikey.com/product-detail/en/c-k/RB-220-07A-R/CKN10398-ND/2747176). I arrived to this idea after learning about the mechanism (https://youtu.be/mWSlwhYyOhI?t=37s) that car airbag sensors use. On an inclination plane, the force of gravity is =1g*sin(theta). So if I want the switch to activate at a threshold acceleration value of .5g then a tilt switch which activates (closed circuit) at 30 degrees would work. I think it should work since I need to blink an LED at a threshold acceleration value - the actual acceleration value does not matter - if it exceeds the threshold, then I want to blink an LED.

Can you post a schematic and code of what you've done so far? That will provide detail for many things not explained in your post.
I have attached my code for my initial prototype. Basically the program self calibrates to zero the sensors and turns on the LED (pin 9) during that process. Then it blinks another LED (pin 13) if the acceleration in xyz axis is greater than .5g. I'd like to accomplish and replicate the same action/circuit with passive components. Sorry I don't have an actual schematic.

Title: Re: Tilt Switch and 555 Timer Astable Circuit for LED
Post by: ted on Mar 19, 2018, 04:29 pm
It is hard to see your code,copy it from arduino and paste using this </>
Flashing LED frequency is 1Hz, cannot change, if you ok with 1 Hz look at the linkIt is hard to see your code,copy it from arduino and paste using this </>
Flashing LED frequency is 1Hz, cannot change, if you ok with 1 Hz look at the linkhttp://www.rysium.com/projects/187-luxeon-led-strobe (http://www.rysium.com/projects/187-luxeon-led-strobe)
Title: Re: Tilt Switch and 555 Timer Astable Circuit for LED
Post by: avr_fred on Mar 19, 2018, 06:17 pm
Correct, the capacitor along with the resistor(s) in series with it, only provides the pulse timing of the NE555. I would not abandon a micro-controller based solution, you'll find trying to do this with a bipolar timer circuit designed in the earlier seventies has some rather distinct disadvantages.

The fact that you need to monitor three analog values for a threshold is enough justification to use a small micro in today's world. One of the AtTiny series units will lower the device cost and size if that is a critical factor.
Title: Re: Tilt Switch and 555 Timer Astable Circuit for LED
Post by: jarus on Mar 19, 2018, 06:29 pm
It is hard to see your code,copy it from arduino and paste using this </>
Sorry about that.

Code: [Select]
float Xread;
float Xrest;
const int Xpin = A0;

float Yread;
float Yrest;
const int Ypin = A1;

float Zread;
float Zrest;
const int Zpin = A2;

const int analogtoG = ((.330*1023)/3.3);
float threshold = .4; //threshold measured in g force
int ledOnTime=125; //led on time
int ledOffTime=125; //led off time
int numRedBlink=10; //number of times to blink

//Reading the ADXL335 datasheet we see that on 3.3V power, we should expect an axis to read 1.65V when it has zero acceleration, and the voltage should
//typically change by 330 mV per G of acceleration.  The signal from our analog to digital converter gives us a number from 0 to 1023.   I'll call these "ADC units". 
//0V maps to 0 ADC units, 3.3V maps to 1023 ADC units and I assume it is linear in between.

//This means that zero acceleration on an axis should give us a reading of 512 ADC units on the pin for that axis.  Also, a change of 1 ADC unit in
//our signal corresponds to a voltage difference of 3.3V/1023 ADC units = 3.226 mV/ADC unit.  Since the datasheet says 1G typically corresponds to
//330 mV voltage difference, we expect that

//330 mV/G = 330 mV/G × (1023 ADC units) / 3.3 V = 102.3 (ADC units)/G



void setup() {
  Serial.begin(9600);      // sets the serial port to 9600 baud
  analogReference(EXTERNAL);

  pinMode(Xpin, INPUT);
 
  pinMode(9, OUTPUT); // digitalWrite (9, HIGH); //turn on LED at pin 9 on for 1 second
  digitalWrite (9, HIGH);
  delay(1000);
 
  Xrest = analogRead(Xpin);       
  Yrest = analogRead(Ypin);       
  Zrest = analogRead(Zpin);       
 
  delay(10);
  digitalWrite (9, LOW);

  pinMode(13, OUTPUT); //setup output leds




}

void loop() {
  delay(1);
  Xread = (analogRead(Xpin) - Xrest)/analogtoG;
  Yread = (analogRead(Ypin) - Yrest)/analogtoG;
  Zread = (analogRead(Zpin) - Zrest)/analogtoG;

for (int j=1; j<=numRedBlink; j=j+1){

   if ( abs(Xread)+ abs(Yread) +abs(Zread) > threshold){
    digitalWrite(13, HIGH);
    delay (ledOnTime);
 }
   digitalWrite(13, LOW);
   delay (ledOffTime);
 }

 
 Serial.print("g force ");
 Serial.print(abs(Xread) + abs(Yread) + abs(Zread), DEC); 
 Serial.println();


  delay(1);

}


The fact that you need to monitor three analog values for a threshold is enough justification to use a small micro in today's world. One of the AtTiny series units will lower the device cost and size if that is a critical factor.
Well really I just need to monitor the acceleration value along one axis - the axis that the motorcycle is moving on. What are some of the disadvantages and why do you think a tilt switch would not work for this use case? Just wondering..
Title: Re: Tilt Switch and 555 Timer Astable Circuit for LED
Post by: ted on Mar 19, 2018, 07:21 pm
This is your sensor, just play with diameter of the copper ring to match your acceleration, use traditional blinking diode program, start blinking when input pin is LOW, drive the led by MOSFET as on my previous link.

http://www.instructables.com/id/How-to-make-simple-%22motion%22-sensors/ (http://www.instructables.com/id/How-to-make-simple-%22motion%22-sensors/)
Title: Re: Tilt Switch and 555 Timer Astable Circuit for LED
Post by: ted on Mar 19, 2018, 07:31 pm
No arduino option, you can adjust the frequency as you need, the ring sensor as a switch for power supply for 555http://rookieelectronics.com/555-timer-projects-flashing-led/ (http://rookieelectronics.com/555-timer-projects-flashing-led/)
Title: Re: Tilt Switch and 555 Timer Astable Circuit for LED
Post by: jarus on Mar 19, 2018, 08:44 pm
This is your sensor, just play with diameter of the copper ring to match your acceleration, use traditional blinking diode program, start blinking when input pin is LOW, drive the led by MOSFET as on my previous link.

http://www.instructables.com/id/How-to-make-simple-%22motion%22-sensors/ (http://www.instructables.com/id/How-to-make-simple-%22motion%22-sensors/)
Thanks for the DIY ideas. I think the tilt switches I was looking into either used a rolling ball or photo-interrupter. A very similar idea to detect acceleration along one axis is to have a spring with a welded contact similar to the spring/ball in your link. The spring would need a thru rod to limit the movement. There would be a gap between the ball and another contact and when the spring expands, the circuit is closed.

The contact duration would be really short though. Does this cause any issues? I'm guessing it can be solved with some capacitance?


No arduino option, you can adjust the frequency as you need, the ring sensor as a switch for power supply for 555http://rookieelectronics.com/555-timer-projects-flashing-led/ (http://rookieelectronics.com/555-timer-projects-flashing-led/)
How can I minimize idle power consumption (ideally to zero)? Also I'm guessing I'd need two 555's one for blinking and the other one setup as a one-shot? Or a 556?
Title: Re: Tilt Switch and 555 Timer Astable Circuit for LED
Post by: ted on Mar 19, 2018, 09:10 pm
For one direction - don't use full circle use 1/10 of it will be ok;
for minimum power...... use MOSFET as power supply switch, connect sensor to gate, also to gate connect 1uF capacitor and 1 meg resistor,  another terminals RC to ground, Change R to get 30 sec.
Title: Re: Tilt Switch and 555 Timer Astable Circuit for LED
Post by: jarus on Mar 20, 2018, 01:15 am
For one direction - don't use full circle use 1/10 of it will be ok;
for minimum power...... use MOSFET as power supply switch, connect sensor to gate, also to gate connect 1uF capacitor and 1 meg resistor,  another terminals RC to ground, Change R to get 30 sec.
The sensor (tilt switch) and RC circuit are in series and connected to the gate? Correct?

Using this RC calculator  (http://mustcalculate.com/electronics/capacitorchargeanddischarge.php?vfrom=4.5&vto=3&vs=0&c=100u&r=750k) I found I can use a 100uF cap and 750kOhm resistor assuming I use 3 AA batteries with Vcc=4.5V and a 2n7000 that has a threshold voltage of 3V to time the discharge to 30s to open the gate. Sound right?

What do you mean by "another terminals RC to ground"? I'm guessing you mean the mosfet source goes to battery ground?



Title: Re: Tilt Switch and 555 Timer Astable Circuit for LED
Post by: ted on Mar 20, 2018, 01:44 am
Battery Positive terminal - Drain + one of the sensor wire.
Source to your toy.
Gate - second sensor wire + R ( end A ) + C (end A)
The ends B to ground.
R has two ends A and B, the same C.
Use values from calculation if you dont have 30 sec., change them.
Title: Re: Tilt Switch and 555 Timer Astable Circuit for LED
Post by: ted on Mar 20, 2018, 01:49 am
In this arrangement 30sec start from last acceleration - it is ok ?
Title: Re: Tilt Switch and 555 Timer Astable Circuit for LED
Post by: jarus on Mar 20, 2018, 02:03 am
Battery Positive terminal - Drain + one of the sensor wire.
Source to your toy.
Gate - second sensor wire + R ( end A ) + C (end A)
The ends B to ground.
R has two ends A and B, the same C.
Use values from calculation if you dont have 30 sec., change them.
Can you do me a HUGE favor and draw this out? I am having a hard time following and rather than explaining with words a picture would work much better.
Title: Re: Tilt Switch and 555 Timer Astable Circuit for LED
Post by: ted on Mar 20, 2018, 02:06 am
I can do that later - 1.5 hour
Title: Re: Tilt Switch and 555 Timer Astable Circuit for LED
Post by: jarus on Mar 20, 2018, 02:14 am
In this arrangement 30sec start from last acceleration - it is ok ?
Yes, that's fine.
I can do that later - 1.5 hour
Thanks, I appreciate it. 555 is attached to Source? I can wait for the drawing.
Title: Re: Tilt Switch and 555 Timer Astable Circuit for LED
Post by: ted on Mar 20, 2018, 02:22 am
I am back, drawing is coming soon
Title: Re: Tilt Switch and 555 Timer Astable Circuit for LED
Post by: ted on Mar 20, 2018, 02:41 am
a
Title: Re: Tilt Switch and 555 Timer Astable Circuit for LED
Post by: jarus on Mar 20, 2018, 02:54 am
Thanks! I will build this and test it.
Title: Re: Tilt Switch and 555 Timer Astable Circuit for LED
Post by: jarus on Mar 22, 2018, 11:15 pm
I am back, drawing is coming soon
Thanks for the drawing! I built the circuit after figuring out what components to use. I have attached a circuit diagram of what I have built.

The LED is not bright. I attached an ammeter from the LED to ground terminal and it was only drawing 20mA and 1.7V accross the LED with the 4.7 Ohm, 1W resistor. So I removed the resistor and measured the current from the 555's output pin 3 to ground and it was around 200mA (as the spec sheet states) and 2.9V. So then I connected the LED to pin 3 and ground with no resistor but it was still only drawing 20mA. I'm confused...
Title: Re: Tilt Switch and 555 Timer Astable Circuit for LED
Post by: ted on Mar 22, 2018, 11:31 pm
Not like that.
You need another MOSFET for LED, Drain of second MOSFET connect to source of the first one, source to LED, gate to R2, make R2 bigger 1- 10k.
Your LED is 2.1V so add one more in series with it.
Title: Re: Tilt Switch and 555 Timer Astable Circuit for LED
Post by: jarus on Mar 23, 2018, 03:57 am
Not like that.
You need another MOSFET for LED, Drain of second MOSFET connect to source of the first one, source to LED, gate to R2, make R2 bigger 1- 10k.
Your LED is 2.1V so add one more in series with it.
Okay how's this? Also can you explain why another MOSFET is needed? Is it bc it is faster at switching?

And I'm assuming you recommended 2 LEDs bc the supply voltage is 4.5V?

Thanks!
Title: Re: Tilt Switch and 555 Timer Astable Circuit for LED
Post by: Wawa on Mar 23, 2018, 04:34 am
Sorry, but I think ted needs to learn more about mosfets before posting diagrams like this.

The circuit posted uses an N-channel mosfet (2N7000, BUK9520) as source follower.
It means that source is always Vg(th) lower than the gate.
I doubt that an NE555 (4.5volt minimum), and two LEDs in series, will run correctly on a ~2.5-3volt supply.

If you want to power the NE555 high-side through a mosfet switch, you must use a p-channel fet (source to battery/VCC),
with the switch and RC circuit swapped (switch between gate and ground, and RC between VCC and gate).

The NE555 also needs some decoupling on it's supply pin.
Leo..
Title: Re: Tilt Switch and 555 Timer Astable Circuit for LED
Post by: ted on Mar 23, 2018, 10:16 am
The LED is not bright. I attached an ammeter from the LED to ground terminal and it was only drawing 20mA

= first MOSFET is working, and he is learning.
Title: Re: Tilt Switch and 555 Timer Astable Circuit for LED
Post by: ted on Mar 23, 2018, 10:25 am
https://www.google.ca/search?q=mosfet+as+a+switch&rlz=1C1AFAB_enCA475&source=lnms&tbm=isch&sa=X&ved=0ahUKEwiyn_T_joLaAhVs5oMKHecHA3AQ_AUICigB&biw=1440&bih=787#imgrc=5x3ODGIqmbXTjM: (https://www.google.ca/search?q=mosfet+as+a+switch&rlz=1C1AFAB_enCA475&source=lnms&tbm=isch&sa=X&ved=0ahUKEwiyn_T_joLaAhVs5oMKHecHA3AQ_AUICigB&biw=1440&bih=787#imgrc=5x3ODGIqmbXTjM:)
Title: Re: Tilt Switch and 555 Timer Astable Circuit for LED
Post by: ted on Mar 23, 2018, 10:38 am
The circuit is ok, AA battery will not last long, duracell battery are the strongest one, consider 18650 3.7 Volt Lithium Ion Battery, you need to check that, will this circuit work at lower voltage in practice, regardless what data sheet is telling.
Do you have 30 sec ?
Title: Re: Tilt Switch and 555 Timer Astable Circuit for LED
Post by: jarus on Mar 23, 2018, 05:07 pm
Sorry, but I think ted needs to learn more about mosfets before posting diagrams like this.

The circuit posted uses an N-channel mosfet (2N7000, BUK9520) as source follower.
It means that source is always Vg(th) lower than the gate.
I doubt that an NE555 (4.5volt minimum), and two LEDs in series, will run correctly on a ~2.5-3volt supply.

If you want to power the NE555 high-side through a mosfet switch, you must use a p-channel fet (source to battery/VCC),
with the switch and RC circuit swapped (switch between gate and ground, and RC between VCC and gate).

The NE555 also needs some decoupling on it's supply pin.
Leo..
Hi Leo,

What I am learning is to use N-Channel if between load and ground and P-Channel if between positive and load. So the N-channel could have worked if drain was connected to ground? Correct?

For decoupling of the 555, does that mean a capacitor between drain and ground? It's C3 in the diagram but I don't know to calculate it's capacitance.

How do you recommend switching/powering the LED? Do I still need a MOFSET as Ted recommended? And I am guessing it should be a P-channel if so?

Think I should look into MOSFETS with a lower Vg(th) (currently 2V) and a 555 IC with lower operating voltage (maybe LCM555 or TLC555)? I'd like to power this thing with the minimum number of AA batteries. Right now I will need 2V (Vgth) + 4.5V (555)
Title: Re: Tilt Switch and 555 Timer Astable Circuit for LED
Post by: jarus on Mar 23, 2018, 05:15 pm
The circuit is ok, AA battery will not last long, duracell battery are the strongest one, consider 18650 3.7 Volt Lithium Ion Battery, you need to check that, will this circuit work at lower voltage in practice, regardless what data sheet is telling.
Do you have 30 sec ?
Thanks I will look into that battery. The circuit will be activated around 10x per month with the LED flashing at 4hz for 30 seconds @350mA.

I am afraid of using another MOFSET due to the drop of voltage...Then I will need a higher voltage battery pack Vss.

I had calculated the RC circuit to be timed to 30 seconds - but this did not work in practice. It was much shorter. So I will have to adjust the R as you mentioned until I get the desired timing.
Title: Re: Tilt Switch and 555 Timer Astable Circuit for LED
Post by: ted on Mar 23, 2018, 06:56 pm
If it is 10x a month you don't need to change batteries.
Calculation can be ok but components not, capacitors not always have the value as is it say on it, increase R1.
Leave  MOSFET as is, just connect everything and observe what is happends.
When you make a drawing dont use description  - Pin1, just 1, thats what is in practice, ehen you describe something in text, use Pin1
Title: Re: Tilt Switch and 555 Timer Astable Circuit for LED
Post by: jarus on Mar 23, 2018, 08:22 pm
If it is 10x a month you don't need to change batteries.
Calculation can be ok but components not, capacitors not always have the value as is it say on it, increase R1.
Leave  MOSFET as is, just connect everything and observe what is happends.
When you make a drawing dont use description  - Pin1, just 1, thats what is in practice, ehen you describe something in text, use Pin1
Thanks for explaining the convention on schematics - I fixed the labels and also added a ground to pin 1 since I forgot to do that in my last schematic.

I built the circuit using 1 LED and here's what I observed when I used the second MOFSET:
-Without the MOFSET, the LED blink frequency would increase with time
-With the MOFSET, the blink frequency appeared to stay constant
-The brightness of the LED decreased with time for both cases
-There overall brightness of the LED was less when using the second MOFSET compared to not using it   

So what I have learned is that there is a voltage drop across a MOSFET and that drop is equal to Vg(th).

I am going to look for lower Vg(th) MOSFETs and lower voltage 555s.
Title: Re: Tilt Switch and 555 Timer Astable Circuit for LED
Post by: Wawa on Mar 23, 2018, 08:46 pm
What I am learning is to use N-Channel if between load and ground and P-Channel if between positive and load. So the N-channel could have worked if drain was connected to ground? Correct?

For decoupling of the 555, does that mean a capacitor between drain and ground? It's C3 in the diagram but I don't know to calculate it's capacitance.

How do you recommend switching/powering the LED? Do I still need a MOFSET as Ted recommended? And I am guessing it should be a P-channel if so?

Think I should look into MOSFETS with a lower Vg(th) (currently 2V) and a 555 IC with lower operating voltage (maybe LCM555 or TLC555)? I'd like to power this thing with the minimum number of AA batteries. Right now I will need 2V (Vgth) + 4.5V (555)
Correct.

A capacitor across the supply of the 555 (pin8 and pin1).
100uF with at least a rating of max battery voltage will do.

The LED can be switched with an n-channel mosfet, regardless how you're switching the power to the 555.
But all the diagrams seem to be wrong there as well.
Source to NE555 ground, gate to NE555 output (with or without 1k resistor),
and LED (with suitable current limiting resistor) between NE555 supply(+) and drain.

Battery voltage needed depends mostly on Vf of the LED(s).
White power LEDs have a Vf of ~3.3volt, red ~2.4volt.
Add at least a volt for the LED CL resistor and mosfet(s) losses.
A Cmos 555 (ICM7555 etc.) works reliably from 2volt, a common NE555/LM555 needs at least 4.5volt.
A mosfet with a Vgs(th) of 2volt needs at least ~3.3volt.
Up to you do do the rest of the maths.
Leo..
Title: Re: Tilt Switch and 555 Timer Astable Circuit for LED
Post by: ted on Mar 23, 2018, 08:55 pm
Check this
This MOSFET can handle 400mA

http://brunningsoftware.co.uk/FET.htm (http://brunningsoftware.co.uk/FET.htm)

Title: Re: Tilt Switch and 555 Timer Astable Circuit for LED
Post by: Wawa on Mar 23, 2018, 09:13 pm
Now compare that one to the more common 2N7000.
Not much difference aye.

Note that both have a fairly high Rds(on) of 1.8ohm typical at 4.5volt/75mA.
That might be a problem with low voltage/high current applications.
Leo..
Title: Re: Tilt Switch and 555 Timer Astable Circuit for LED
Post by: ted on Mar 23, 2018, 09:14 pm
:
-Without the MOFSET, the LED blink frequency would increase with time = overloaded 555, frequency is changing because LED resistance  is decreasing

-With the MOFSET, the blink frequency appeared to stay constant = MOSFET is controlled by voltage , does not take a current from 555


-The brightness of the LED decreased with time for both cases = look at the link, you need low voltage  MOSFET


-There overall brightness of the LED was less when using the second MOFSET compared to not using it =
LED is taking power (current) from 555 not directly from battery.  

So what I have learned is that there is a voltage drop across a MOSFET and that drop is equal to Vg(th) = MOSFET is not completely open, low voltage MOSFET is need..

I am going to look for lower Vg(th) MOSFETs and lower voltage 555s. = first yes, second no
Title: Re: Tilt Switch and 555 Timer Astable Circuit for LED
Post by: ted on Mar 23, 2018, 10:17 pm
Watch the video, this guy achieved what you need @ 12v =increase your voltage or look for  another MOSFET

https://www.elcircuit.com/2017/07/mosfet-timer-circuit-simple-and-easy-to.html (https://www.elcircuit.com/2017/07/mosfet-timer-circuit-simple-and-easy-to.html)

the problem is in  first MOSFET, short   D and  S of  it,  and make working LED.
Title: Re: Tilt Switch and 555 Timer Astable Circuit for LED
Post by: jarus on Mar 23, 2018, 11:24 pm
Correct.

A capacitor across the supply of the 555 (pin8 and pin1).
100uF with at least a rating of max battery voltage will do.

The LED can be switched with an n-channel mosfet, regardless how you're switching the power to the 555.
But all the diagrams seem to be wrong there as well.
Source to NE555 ground, gate to NE555 output (with or without 1k resistor),
and LED (with suitable current limiting resistor) between NE555 supply(+) and drain.

Battery voltage needed depends mostly on Vf of the LED(s).
White power LEDs have a Vf of ~3.3volt, red ~2.4volt.
Add at least a volt for the LED CL resistor and mosfet(s) losses.
A Cmos 555 (ICM7555 etc.) works reliably from 2volt, a common NE555/LM555 needs at least 4.5volt.
A mosfet with a Vgs(th) of 2volt needs at least ~3.3volt.
Up to you do do the rest of the maths.
Leo..
The polarity of the N-channel and P-channel MOSFETs do not make sense to me. Put simply, I am confused by the diode symbol arrows and following current flow. I tried to follow your instructions, can you please point out my error? Sorry I am a beginner and have been Googling.  Thanks
Title: Re: Tilt Switch and 555 Timer Astable Circuit for LED
Post by: jarus on Mar 23, 2018, 11:43 pm
Watch the video, this guy achieved what you need @ 12v =increase your voltage or look for  another MOSFET

https://www.elcircuit.com/2017/07/mosfet-timer-circuit-simple-and-easy-to.html (https://www.elcircuit.com/2017/07/mosfet-timer-circuit-simple-and-easy-to.html)

the problem is in  first MOSFET, short   D and  S of  it,  and make working LED.
I found this video really hard to follow, but thanks for all the other great resources! I think I am finally beginning to grasp this stuff! 
Title: Re: Tilt Switch and 555 Timer Astable Circuit for LED
Post by: Wawa on Mar 24, 2018, 01:02 am
Just Google "fet symbols" (images) to confuse you more. There are many.
Just go by Source/Drain/Gate.

The diagram in post#36 seems correct (assuming you have the timing of the 555 right), but I think it's better to move the LED supply (R5) from the 555 supply to the battery.
Then you have more LED power (LED current through one fet only), and you can use a smaller p-channel fet between battery and 555.
Leo..
Title: Re: Tilt Switch and 555 Timer Astable Circuit for LED
Post by: ted on Mar 24, 2018, 01:16 am
TLE7272-2

Here is your solution - voltage regulator with EN pin, attach to it R1C1 and you done.

https://www.google.ca/search?q=TLE7272-2&rlz=1C1AFAB_enCA475&source=lnms&tbm=isch&sa=X&ved=0ahUKEwif7uSu1IPaAhUG6YMKHTsNAVQQ_AUIDCgD&biw=1440&bih=787#imgrc=Vp2FaHNMYtjDYM: (https://www.google.ca/search?q=TLE7272-2&rlz=1C1AFAB_enCA475&source=lnms&tbm=isch&sa=X&ved=0ahUKEwif7uSu1IPaAhUG6YMKHTsNAVQQ_AUIDCgD&biw=1440&bih=787#imgrc=Vp2FaHNMYtjDYM:)

Watch video again min; 8:00 to 9:07. One min. timer with 3 sec dimming effect.
Title: Re: Tilt Switch and 555 Timer Astable Circuit for LED
Post by: JohnRob on Mar 24, 2018, 02:19 am
Hi,

I just saw this thread and have not followed it from the beginning.   However a note if you are still planning on using the 555 timer.  Look for a 555C which is a CMOS version of the 555 timer and much more battery friendly.

Title: Re: Tilt Switch and 555 Timer Astable Circuit for LED
Post by: Wawa on Mar 24, 2018, 02:49 am
Already mentioned a Cmos 555 in post#31.
Current draw of the 555 is irrelevant here, since the 555 is switched off with a mosfet most of the time.
Leo..
Title: Re: Tilt Switch and 555 Timer Astable Circuit for LED
Post by: ted on Mar 24, 2018, 03:09 am
Why guys you think that problem can be in NE555 ?
Title: Re: Tilt Switch and 555 Timer Astable Circuit for LED
Post by: jarus on Mar 24, 2018, 03:10 am
Just Google "fet symbols" (images) to confuse you more. There are many.
Just go by Source/Drain/Gate.

The diagram in post#36 seems correct (assuming you have the timing of the 555 right), but I think it's better to move the LED supply (R5) from the 555 supply to the battery.
Then you have more LED power (LED current through one fet only), and you can use a smaller p-channel fet between battery and 555.
Leo..
Haha yeah the transistor symbols are confusing!

I agree with the idea of moving the LED power supply to the battery. I am hoping to find a better MOFSET with a lower Vg(th) bc these things are eating up my supply voltage and I don't want too many batteries.

Why did you recommend a P-channel MOSFET to power the 555 rather than a N-channel MOSFET placed between ground and the load? I'm just curious if there was a practical difference. I'd like to build this with cheap and readily available parts.

Thanks for your help!

 
TLE7272-2

Here is your solution - voltage regulator with EN pin, attach to it R1C1 and you done.

https://www.google.ca/search?q=TLE7272-2&rlz=1C1AFAB_enCA475&source=lnms&tbm=isch&sa=X&ved=0ahUKEwif7uSu1IPaAhUG6YMKHTsNAVQQ_AUIDCgD&biw=1440&bih=787#imgrc=Vp2FaHNMYtjDYM: (https://www.google.ca/search?q=TLE7272-2&rlz=1C1AFAB_enCA475&source=lnms&tbm=isch&sa=X&ved=0ahUKEwif7uSu1IPaAhUG6YMKHTsNAVQQ_AUIDCgD&biw=1440&bih=787#imgrc=Vp2FaHNMYtjDYM:)

Watch video again min; 8:00 to 9:07. One min. timer with 3 sec dimming effect.
What problem does this voltage regulator solve?

Hi,

I just saw this thread and have not followed it from the beginning.   However a note if you are still planning on using the 555 timer.  Look for a 555C which is a CMOS version of the 555 timer and much more battery friendly.


Already mentioned a Cmos 555 in post#31.
Current draw of the 555 is irrelevant here, since the 555 is switched off with a mosfet most of the time.
Leo..
Thanks, yes I looked these up. From a current standpoint, yes it's irrelevant. but since it's battery powered I am looking for a 555 with a lower operating voltage since these MOFSETs are chewing up some voltage and I am trying to keep this as small and compact as possible.
Title: Re: Tilt Switch and 555 Timer Astable Circuit for LED
Post by: ted on Mar 24, 2018, 03:18 am
Voltage regulator pin Enable is equal gate of the MOSFET and is working at low voltage.
Using P channel MOSFET it is the same as N channel, just different connection. Look at post # 32, it is using popular  BS270
Title: Re: Tilt Switch and 555 Timer Astable Circuit for LED
Post by: Wawa on Mar 24, 2018, 03:21 am
Why did you recommend a P-channel MOSFET to power the 555 rather than a N-channel MOSFET placed between ground and the load? I'm just curious if there was a practical difference. I'd like to build this with cheap and readily available parts.
No difference in using a p-channel fet high-side or an n-channel fet low side.
Assuming this circuit is stand-alone (not connected ot anything else).
Leo..
Title: Re: Tilt Switch and 555 Timer Astable Circuit for LED
Post by: jarus on Mar 24, 2018, 03:26 am
Voltage regulator pin Enabled is equal gate of the MOSFET and is working at low voltage.
Sounds interesting but I don't understand how it works. So this regulator can act like a switch?

Using P channel MOSFET it is the same as N channel, just different connection.
Thanks that's what I was thinking! The circuit we originally talked about with the N-Channel to power the 555 worked but I set it up wrong. Drain should not have been attached to Vss+

No difference in using a p-channel fet high-side or an n-channel fet low side.
Assuming this circuit is stand-alone (not connected ot anything else).
Leo..
Ah okay that makes sense. Thanks!

I'm also wondering what's the use case for a MOSFET vs NPN transistor for switching power. Does one work better for this case?
Title: Re: Tilt Switch and 555 Timer Astable Circuit for LED
Post by: ted on Mar 24, 2018, 03:32 am
NPN is using current, MOSFET voltage to operate, it has very high resistance.
Enable pin it put regulator in sleep mode when current consumption is very low, 1-5 uA
Title: Re: Tilt Switch and 555 Timer Astable Circuit for LED
Post by: jarus on Mar 24, 2018, 03:38 am
NPN is using current, MOSFET voltage to operate, it has very high resistance.
Enable pin it put regulator in sleep mode when current consumption is very low, 1-5 uA
Ah I see, thanks.

So how does the TLE7272-2 work?
Title: Re: Tilt Switch and 555 Timer Astable Circuit for LED
Post by: ted on Mar 24, 2018, 03:45 am
When pin EN is connected to 0V regulator is off = sleep, when is 5V regultor is on
Title: Re: Tilt Switch and 555 Timer Astable Circuit for LED
Post by: ted on Mar 24, 2018, 03:53 am
I think for beginner is too much info in short time, take your time read again the answers my and other guys,and you will have a perfect toy.
Title: Re: Tilt Switch and 555 Timer Astable Circuit for LED
Post by: Wawa on Mar 24, 2018, 03:55 am
I'm also wondering what's the use case for a MOSFET vs NPN transistor for switching power. Does one work better for this case?
The mosfet that switches the LED uses no gate current from the 555.
An NPN transistor there would need ~30mA base current from the 555 for the ~300mA LED current it has to switch.
The mosfet power switch draws no gate current from the RC time circuit, so that capacitor can be small.
A normal transistor would influence that RC circuit too much.


If you decide to use a Cmos 555, then you can try the RC circuit on the reset pin to enable/disable the 555.
You would then only need a mosfet for the LED (if you can live with the ~60uA idle draw of the 555).
Leo..
Title: Re: Tilt Switch and 555 Timer Astable Circuit for LED
Post by: jarus on Mar 24, 2018, 04:06 am
When pin EN is connected to 0V regulator is off = sleep, when is 5V regultor is on
Brilliant! I'd have to play with it to see how it works. Looks like only 4 pins, Input, Reset, Enable, and Output, and ground.

Looks like the current consumption is ~20uA....not bad.

The mosfet that switches the LED uses no gate current from the 555.
An NPN transistor there would need ~30mA base current from the 555 for the ~300mA LED current it has to switch.
The mosfet power switch draws no gate current from the RC time circuit, so that capacitor can be small.
A normal transistor would influence that RC circuit too much.


If you decide to use a Cmos 555, then you can try the RC circuit on the reset pin to enable/disable the 555.
You would then only need a mosfet for the LED (if you can live with the ~60uA idle draw of the 555).
Leo..
Ah I see, thanks. MOSFETS are a beautiful invention.

I'll check with my power consumption calculations to see how the 60uA draw would effect the battery life.
Title: Re: Tilt Switch and 555 Timer Astable Circuit for LED
Post by: ted on Mar 24, 2018, 09:51 am
Average battery = 1000mAh
Title: Re: Tilt Switch and 555 Timer Astable Circuit for LED
Post by: jarus on Mar 24, 2018, 03:20 pm
Average battery = 1000mAh
Assume 350mA current Consumption During LED flashing

4hz for 30 seconds means on time is 15 Seconds

Current Consumption during 15 Seconds is  350/60/60*15 = 1.45mAH

Assuming the LED turns on 10 times a month this works out to 14.5 maH per month

Over 5 Years this would be 870maH - battery leakage can be negated due to claimed shelf life.

Battery is rated for operating temps -40F to 140F so it is suitable for outdoor use.

Energizer L91 fits this requirement (Capacity 3500mah). It also meets max discharge requirements >350mA.

I  would need 3 in series to meet voltage requirements - 4.5V (depends if I use MOFSET, 555, CMOS 555, or gated voltage regulator.

Over 5 years the CMOS 555 would consume ~2.5mAh and the TLE7272-2 would consume ~.9maH. So either one could be a potential solution.  =)
Title: Re: Tilt Switch and 555 Timer Astable Circuit for LED
Post by: Wawa on Mar 24, 2018, 09:43 pm
Correction to post#45.
If you use an n-channel fet power switch low-side, then you can't power the LED/mosfet straight from the battery, as you could do with a p-channel fet that only powers the 555.
Leo..
Title: Re: Tilt Switch and 555 Timer Astable Circuit for LED
Post by: jarus on Mar 25, 2018, 10:04 pm
Correction to post#45.
If you use an n-channel fet power switch low-side, then you can't power the LED/mosfet straight from the battery, as you could do with a p-channel fet that only powers the 555.
Leo..
I'm curious why this would not work? What's wrong in the diagram I drew?
Title: Re: Tilt Switch and 555 Timer Astable Circuit for LED
Post by: ted on Mar 25, 2018, 11:10 pm
the led is all the time on ?
Title: Re: Tilt Switch and 555 Timer Astable Circuit for LED
Post by: Wawa on Mar 25, 2018, 11:35 pm
the led is all the time on ?
Correct.
All the pins of the 555 are "high" (connected to batt+) when the battery switch is off.
So also a "high" on the gate of the LED fet.
Leo..
Title: Re: Tilt Switch and 555 Timer Astable Circuit for LED
Post by: jarus on Mar 26, 2018, 12:23 am
Correct.
All the pins of the 555 are "high" (connected to batt+) when the battery switch is off.
So also a "high" on the gate of the LED fet.
Leo..
Oh I see, I thought the 555 only had a 'high' output when it was powered on (connected to V+ and ground). Now I realize Trigger would always be active if the MOSFET was not on the high side, causing output to be high.

Thanks for clearing that up for me
Title: Re: Tilt Switch and 555 Timer Astable Circuit for LED
Post by: Wawa on Mar 26, 2018, 12:54 am
Just use a p-channel mosfet for the power switch.
It can be very small, because it only powers the 555.
Leo..
Title: Re: Tilt Switch and 555 Timer Astable Circuit for LED
Post by: jarus on Mar 26, 2018, 03:31 pm
Just use a p-channel mosfet for the power switch.
It can be very small, because it only powers the 555.
Leo..
Will do! The questions were just to improve my understanding, I never doubted that you were correct. =)

What's your opinion on the step-up voltage regulator with 'Enable' feature that Ted posted. Seems like it solves the problem of needing too many AA batteries to meet voltage requirements (of 2 MOFESTTs, 555, and LED) and it can function as a switch. I can live with the low power draw. The only drawback I can see is they are pricey ~$1.
Title: Re: Tilt Switch and 555 Timer Astable Circuit for LED
Post by: Wawa on Mar 26, 2018, 10:03 pm
What's your opinion on the step-up voltage regulator with 'Enable' feature that Ted posted. Seems like it solves the problem of needing too many AA batteries to meet voltage requirements...
I only saw a TLE7272-2 voltage regulator with a minimum input voltage of 5.5volt (post#39).
Linear regulators don't step up.
Leo..