Electronics Forum

Electronics Circuits & Projects discussion forum. Get help with electronics.


Ignition-off Timer with ATmega

Discuss about electronic circuits here. Request help for circuits that you couldn't find anywhere else, how a circuit works etc. Discuss anything related to electronic circuits.

Moderator: pebe

Re: Ignition-off Timer with ATmega

Postby xenix » Mon Jun 22, 2015 12:28 am

pebe wrote:I note the data sheet specifies a tantalum (in preference to an aluminium electrolytic). I normally use the tantalum bead type because it’s compact.

I've read through the data sheet and other articles but the more I read, the more I seem to get that for my simple circuit there are limitless possibilities for cap selection. For example, for C3, a 100µF aluminum cap will suffice though a tantalum is preferred. However, if a tantalum is used, the value may be lowered to 47µF (even lower for other considerations). For C1 and C2, the consensus seems to be aluminum for cost considerations. Would there be any compelling reason to use ceramic for either C1 or C2?

pebe wrote:Switching off would then leave the field open-circuit and the energy left in it by its magnetic field would dissipate as an arc at the relay contacts and possibly destroy them. Adding a reverse biased diode across the contacts as a suppressor would prevent that.

Added, thanks.
relay.png
relay.png (14.3 KiB) Viewed 20473 times
xenix
 
Posts: 13
Joined: Sat Jun 13, 2015 6:14 pm

Re: Ignition-off Timer with ATmega

Postby pebe » Mon Jun 22, 2015 2:46 pm

The capacitors on any of these voltage regulators are there to stabilize the internal circuitry of the devices. To be effective they must present a low impedance to high frequencies. Every capacitor has an impedance that is made up of its reactance at any given frequency plus its ‘ESR’. This ‘Equivalent Series Resistance’ is made up off any inherent resistance in the cap. Google for ‘wiki capacitor esr’ and look under the ‘Capacitor section’. That will explain it better than I can and gives the ESR for various types.

The ideal capacitor to use is one with a low ESR, such as a ceramic or one of the various ‘poly’ types, but they can be bulky. So an electrolytic is often used but it has to have more capacity in order to keep the ESR low.

With an aluminium electrolytic, the ESR is often not known and will vary from one manufacturer to another. Additionally, with age the electrolyte will tend to dry up and that will increase the ESR. A solid tantalum bead capacitor is a much better choice because it has a much lower initial ESR and does not age, which is why I always use them for that application.

Most data sheets for the 78** or 78L** series of regulators suggest 330nF on the input and 100nF on the output. I always use a 10uF solid bead tantalum in both positions and I have never had any problems. I have never used an LM2931 but the data sheet suggests a 100uF tantalum - they don’t specify whether wet type of solid.
pebe
 
Posts: 1058
Joined: Tue Dec 09, 2003 11:12 pm
Location: Ellon, Scotland

Re: Ignition-off Timer with ATmega

Postby xenix » Fri Jun 26, 2015 3:13 pm

Thank you for your explanations.

Using a single comparator, I would only be able to trigger an event based on one pair of inputs, CIN+ and CIN-. If I wanted to trigger an event at one temp (e.g., 100ºC) and terminate that event with a different temp (e.g., 85ºC), I would need to approach it using an ADC pin or have two comparators available. Is that an accurate statement or am I missing something that will happen in the software?

I'm not sure of the utility of having two temps, but if I want to mimic the original functionality, would it be easier to use an ADC input?
xenix
 
Posts: 13
Joined: Sat Jun 13, 2015 6:14 pm

Re: Ignition-off Timer with ATmega

Postby pebe » Sat Jun 27, 2015 1:23 pm

You could use the comparator by using a pot to get one temperature level and switch an extra pot in series at the bottom end to raise the reference voltage for the other level, but it needs 3 ports.

So the ADC solution is the most elegant solution, using only a single input and comparing the two digitized voltages with two numbers held in the program, or in eeprom.
pebe
 
Posts: 1058
Joined: Tue Dec 09, 2003 11:12 pm
Location: Ellon, Scotland

Re: Ignition-off Timer with ATmega

Postby xenix » Sun Jun 28, 2015 6:56 pm

Thank you for your help and patience. After reading more about relays, I wondered if a RC "snubber" across the contacts would be as appropriate as a reverse-biased diode? I also added an LED to the relay output going to the fan. This allows a user to know that if he grounds the thermistor and the green LED is on, there is a fault in the fan wiring or the fan itself.
relay2.png
relay2.png (21.97 KiB) Viewed 20420 times
xenix
 
Posts: 13
Joined: Sat Jun 13, 2015 6:14 pm

Re: Ignition-off Timer with ATmega

Postby pebe » Tue Jun 30, 2015 11:05 am

I don't know whether an RC snubber would be OK, because I always use a diode across the inductive component. In your case that would be the fan - not the switch. Maybe some other member can give guidance.

BTW, you show a short across R7 and LED2.
pebe
 
Posts: 1058
Joined: Tue Dec 09, 2003 11:12 pm
Location: Ellon, Scotland

Re: Ignition-off Timer with ATmega

Postby xenix » Sat Jul 04, 2015 1:09 pm

Oops. Didn't notice the short. Thanks. I have the circuit prototyped on a breadboard but using a TI MSP430 that I have several of. I ordered a few PICs and ATtiny85 as well to experiment with. The code is simple but probably not very elegant. I used a while statement but want to incorporate an interrupt for the ignition status and a timer rather than my delay() in a loop.
xenix
 
Posts: 13
Joined: Sat Jun 13, 2015 6:14 pm

Re: Ignition-off Timer with ATmega

Postby xenix » Sat Sep 05, 2015 12:25 pm

I went with the ATtiny85 and designed/ordered a PCB. Have been using it for a few weeks now and it works great. Thanks for your help.
xenix
 
Posts: 13
Joined: Sat Jun 13, 2015 6:14 pm

Previous

Return to Electronic Circuits Help



Who is online

Users browsing this forum: No registered users and 10 guests



cron