Go Down

Topic: Active low trigger: How to generate pulse with Arduino? (Read 441 times) previous topic - next topic

amaruk

I working on project where I need to send a pulse to the active low trigger on a 555 timer using an Arduino. I have this pin connected via a 20K pull-up resistor to +5V. if I manually ground this pin for a split second everything works fine in timer part of my circuit. 

For the Arduino part I was thinking of using a digital pin, assign it as an output, and then set it to low with a digitalWrite() call for a short time and then set it back up to high using another digitalWrite() call. This works fine when I use the Arduino by itself.

The problem I have is when I connect this digital pin to the trigger pin in the timer circuit. For some reason the pulse does not go high (stays around 1V) and I don't understand why. Do I need to use another method? Add more/less pull-up/down resistors?

I should also add that my timer circuit is running all the time and I would like the Arduino to not trigger the timer during Arduino's power-on cycle but only when a certain condition is fulfilled in the Arduino code and then go low for the first time (trigger pulse). I can easily add capacitors to filter out spikes etc. I tried many things but so far no luck and I suspect I am missing something fundamental here.

Any help/hints are welcome!

Paul_KD7HB

Your questions suggest you are looking at some device you have constructed using some schematic drawing. We can't see either. IF you really want help, help us help you. Post a copy of the schematic for your NE555 circuit.

If the voltage is not high enough, doesn't that suggest the LOAD on that pin is too much? Try adding a transistor to handle the extra load. And that will invert your logic, also.

Paul

amaruk

Hi Paul,
I just figured out what was causing this. I had my 555 timer set up as a monostable timer the standard way which requires a active low pulse on the trigger pin. I then just found out you can set it up using a positive trigger too by using its reset pin. I modified my Arduino code to generate a positive pulse and now it seems to be working. So odd... If you hadn't  replied I would have removed this topic. But I'll let it stay up in case anyone is interested. I am more than happy to share the full schematic of my project. It is almost done now. Thanks again! 

larryd

Not your situation, just a point to remember, when using 'reset' you start from 0v and not 1/3rd Vcc.





No technical PMs.
If you are asked a question, please respond with an answer.
If you are asked for more information, please supply it.
If you need clarification, ask for help.

amaruk

Not your situation, just a point to remember, when using 'reset' you start from 0v and not 1/3rd Vcc.
Good point! While I got it all to work with the positive trigger version of my monostable timer, I ran into another issue. The resistor R2 in this schematic:  Timer example Causes my timer to draw an additional 2.5mA.... This is usually not a problem but for my project it is. When wired as a standard monostable timer I did not have this issue. Thus,  what I will try next is to wire the timer for the negative trigger again and then use a transistor to invert the logic as suggested here. Hopefully I can get it to work this way too.
For those interested, what I am trying to do here is to run my Uno based project on a set of AA batteries for 1-2 years (6 Enelopp AA in series). I am not there yet but I hope it will work out the way I want.

Paul__B

For those interested, what I am trying to do here is to run my UNO based project on a set of AA batteries for 1-2 years (6 Eneloop AA in series).
So you picked a completely inappropriate board?

And the wrong voltage (or is there something that requires 7.5 V?)

amaruk

I knew this was going to come up... I happen to have Uno's, Nano's and Mega's and not any pro Mini's. I also prefer to have a USB connector for my constant tweaking of the software. So for me the right board is an Uno and nothing else. I am not trying to make the best board possible. I am trying to make the best out what I have (Uno).

As for voltage, I have a voltage regulator that can deal with 5.6V as a minimum so I could get away with 5 AA and I might try that too. But since they are in series, there is no saving in power as the current will be the same so it really doesn't matter I think.




Southpark

I suspect I am missing something fundamental here.
Any help/hints are welcome!
This is just friendly help only. A circuit diagram can often help people assess the situation and sometimes help to quickly identify possible issues ----- by looking at an accurate and well-constructed circuit diagram.

It's just along the lines of 'a picture can be worth a billion words'. Athough, a combination of picture and words is nice.

MarkT

I working on project where I need to send a pulse to the active low trigger on a 555 timer using an Arduino. I have this pin connected via a 20K pull-up resistor to +5V. if I manually ground this pin for a split second everything works fine in timer part of my circuit.

For the Arduino part I was thinking of using a digital pin, assign it as an output, and then set it to low with a digitalWrite() call for a short time and then set it back up to high using another digitalWrite() call. This works fine when I use the Arduino by itself.
Show us the circuit please, words are a poor substitute... 

Perhaps you mean pin 2 on the 555, the trigger pin (its not a logic pin, so saying "active low"
is meaningless - it goes into a comparator, as does pin 6 the threshold input.  pin 2 voltage is
compared to Vcc/3 (one third the 555's supply voltage).
Quote
The problem I have is when I connect this digital pin to the trigger pin in the timer circuit. For some reason the pulse does not go high (stays around 1V) and I don't understand why. Do I need to use another method? Add more/less pull-up/down resistors?
Then something is burnt out.  Pin 2 is a high impedance input and shouldn't prevent the Arduino output
driving up to +5V or down to 0V.

Or there's something else in the circuit - but without a diagram we can't tell.
Quote
I should also add that my timer circuit is running all the time and I would like the Arduino to not trigger the timer during Arduino's power-on cycle but only when a certain condition is fulfilled in the Arduino code and then go low for the first time (trigger pulse). I can easily add capacitors to filter out spikes etc. I tried many things but so far no luck and I suspect I am missing something fundamental here.

Any help/hints are welcome!
If you connect the Arduino to pin 2, pin 2 will be pulled low whenever the Arduino is powered down.  CMOS
chips have protection diodes that clamp pins to within the supply range at all times.
[ I DO NOT respond to personal messages, I WILL delete them unread, use the forum please ]

amaruk

Show us the circuit please, words are a poor substitute...  

Perhaps you mean pin 2 on the 555, the trigger pin (its not a logic pin, so saying "active low"
is meaningless - it goes into a comparator, as does pin 6 the threshold input.  pin 2 voltage is
compared to Vcc/3 (one third the 555's supply voltage).
I think this was my issue. Spot ont! Thank you! 
I did what was suggested here, I added a MOSFET transistor stage to convert a positive pulse from my Arduino to a negative pulse for the 555 trigger. I realized that in my case I need to have use a positive pulse from the Arduino for it to work as we have these two basic states:
a) No power to the Arduino. The voltage on the digital pin is 0V (or un-defined).
b) Power to the Arduino with the Pin set to 5V (when I need to trigger my timer).


amaruk

For those of you following this thread, here is a complete schematic of my circuit. This circuit has an n-channel MOSFET that inverts the positive pulse from Arduino (pin 5 goes high when I want to trigger the timer). When power is first turned on the power to the Arduino is turned on. When Arduino sets pin 5 to high, the timer is triggered and the power is cut off to Arduino for a time set by the RC product in the timer.









amaruk

I should also add that in this configuration (with the negative triggered timer) the current draw on the battery during the sleep is only 120uA. Thus, if we power our project with 5 or 6 regular 2000 mAh AA-batteries (Eneloop) in series we might be able to run a project for up to 2 years (if we only turn on the Arduino for a short time with long sleeps in-between). :) Send me a PM if you want a complete bill-of-materials (the IC's used and the values of all components).

amaruk

For completeness, here is a picture of the system in action as captured with an oscilloscope.


The blue trace is the power (+5V) to the Arduino (triggers on positive slope) and the red trace is my data pin for a 433MHz transmitter. In this example the Arduino just powers up, configures the transmitter, and transmits a hard-coded message before sending the trigger signal to the timer. Note that the trigger signal is just set to high as that is all it takes to trigger the timer circuit. The power is then cut to the Arduino for a time set by the timer before power is turned back on by the timer. The cycle is then repeated.


I am using the RC-library for the 433MHz part and as you can see the message is repeated 10 times (this is the default mode when sending messages with this library). The interesting thing here is that it takes the Arduino about 1.5 seconds to boot before sending the message (0.5s/div). The message then takes about 250ms to send.


AJLElectronics

For those of you following this thread, here is a complete schematic of my circuit.
But where is the schematic? All you have posted is a pretty picture from Fritzing which is of no use to 95% of us!

raschemmel


Go Up