Choosing microchip for my simple project

Thread Starter

imraneesa

Joined Dec 18, 2014
227
Dear all,

I want to choose a simple microchip to program using arduino.
All I want to do is when it detect power on it should on the relay for say 15 seconds and should go off. I have pic12f683 with me. but it is very hard to program it with arduino. Please give me your suggestions.

thank you,
Yours sincerely,
Imran
 

Reloadron

Joined Jan 15, 2015
7,501
The Arduino Uno for example uses uses an ATmega 328P micro-controller. You can buy the chip pre programmed with the boot loader already on it for about $6.00 USD or less. Place the chip on your Arduino board, program it, and move to the socket or project of your choice.

Since you aren't asking much all you really need is a simple PICAXE 08M2 little 8 pin chip. A basic programming configuration is easy to cobble together and the PICAXE software is a free download. Very easy if you have an RS 232 port available or a USB to RS 232 adapter.

Your 12f683 is the same chip used for the PICAXE 08M but the 08M includes a boot loader.

You can also just use a discreet programmable one shot timer off the shelf.

Ron
 
Last edited:

Thread Starter

imraneesa

Joined Dec 18, 2014
227
The Arduino Uno for example uses uses an ATmega 328P micro-controller. You can buy the chip pre programmed with the boot loader already on it for about $6.00 USD or less. Place the chip on your Arduino board, program it, and move to the socket or project of your choice.

Since you aren't asking much all you really need is a simple PICAXE 08M2 little 8 pin chip. A basic programming configuration is easy to cobble together and the PICAXE software is a free download. Very easy if you have an RS 232 port available or a USB to RS 232 adapter.

Your 12f683 is the same chip used for the PICAXE 08M but the 08M includes a boot loader.

You can also just use a discreet programmable one shot timer off the shelf.

Ron
Dear Sir,
I liked the idea of PICAXE 08M. i will go with it. but can you please tell me why 12f683 dont have bootloader? and how do i know if there is bootloader in the chip? and what should i buy to program 08M? and can i put bootloader into 12f683?
 

Reloadron

Joined Jan 15, 2015
7,501
Arduino and PICAXE as well as other companies buy the micro-processors and then load a boot loader on them, this allows the end user to easily program the chips in their products. A boot-loader is simply a small program which runs before all else when the chip is powered up allowing any software you write to run. Can you write a boot loader routine? Sure if you have the programming skills and ability. I don't so I just buy a chip with a boot loader already loaded on the chip.

All you are looking for is a delay:
All I want to do is when it detect power on it should on the relay for say 15 seconds and should go off.
So you want to use a digital in and when it sees a logic high a digital out will go logic high for about 15 seconds. I see an Arduino as overkill. I see a PICAXE 08M as a simple solution. The PICAXE software for writing programs can be found here. There is also
Official Software for use with PICAXE projects with more free software. You can build or buy a small programming board as they are very simple, not much to them, as I mentioned, A basic PICAXE-08 PROTO BOARD KIT is not at all expensive.

Ron
 

Thread Starter

imraneesa

Joined Dec 18, 2014
227
I would have thought a 555 would have performed that simple task?
Micro is a little over-kill!
Per post #2.
Max.
I had a idea of using 555 but how can i use it as power on to trigger. i have to use some kind of switch to trigger that. here what i want is when the car switch is turned on it should on the relay for 10 to 15 seconds and after it should do nothing.
 

Reloadron

Joined Jan 15, 2015
7,501
All you need to do is configure a 555 as a non-retriggerable "one shot". When pin 2 the trigger pin goes low the output pin 3 will go high for a time period determined by a capacitor and resistor RC network. Since the 555 trigger is a negative going pulse you can use a transistor on the trigger input to invert the logic high to a logic low. When the ignition is turned on you get a logic high which remains high for the duration the ignition is high. You power the actual 555 using always on 12 volts. A google of "555 one shot non retriggerable" should get you plenty of basic circuits. A Google of " one shot relay timers" should bring up some off the shelf solutions.

Ron
 

Thread Starter

imraneesa

Joined Dec 18, 2014
227
All you need to do is configure a 555 as a non-retriggerable "one shot". When pin 2 the trigger pin goes low the output pin 3 will go high for a time period determined by a capacitor and resistor RC network. Since the 555 trigger is a negative going pulse you can use a transistor on the trigger input to invert the logic high to a logic low. When the ignition is turned on you get a logic high which remains high for the duration the ignition is high. You power the actual 555 using always on 12 volts. A google of "555 one shot non retriggerable" should get you plenty of basic circuits. A Google of " one shot relay timers" should bring up some off the shelf solutions.

Ron
All the examples i am seeing are some how using push button. that will just triggers the 555. but what i want is when we turn the car key the voltage is always there so it is not stopping the output after the set delay time.
 

Attachments

Reloadron

Joined Jan 15, 2015
7,501
Give this a read and note at the bottom where they mention differentiating a trigger. Here is another example:

555 Trig Differentiator Ckt.png

Replace SW1 using a 2N3904, 2N2222 or any similar switching transistor. The diode can be any diode for example 1N4002 or similar.

Also when posting a circuit it is best to use a simple .png or .jpg image format. The .asc is fine as long as someone has LtSpice to open the file but not everyone does. :)

Ron
 

Thread Starter

imraneesa

Joined Dec 18, 2014
227
Give this a read and note at the bottom where they mention differentiating a trigger. Here is another example:

View attachment 149716

Replace SW1 using a 2N3904, 2N2222 or any similar switching transistor. The diode can be any diode for example 1N4002 or similar.

Also when posting a circuit it is best to use a simple .png or .jpg image format. The .asc is fine as long as someone has LtSpice to open the file but not everyone does. :)

Ron
HI,
I tried doing that and it is not working. i changed resistor values and capacitor values but no change in output.
 

Attachments

Reloadron

Joined Jan 15, 2015
7,501
Drop the resistor on RST and just tie RST to VCC. Let me play around with this as the way I suggested doing the differentiator won't work. When the transistor turns on it will just hold the trigger pin low. My bad on that. I'll get back to this.

Ron
 

Thread Starter

imraneesa

Joined Dec 18, 2014
227
Drop the resistor on RST and just tie RST to VCC. Let me play around with this as the way I suggested doing the differentiator won't work. When the transistor turns on it will just hold the trigger pin low. My bad on that. I'll get back to this.

Ron
Ok sir. I tried without resistor also. I just saw some circuits using a resistor so I just tried. I will wait on your reply. Thank you.
 

Reloadron

Joined Jan 15, 2015
7,501
If you want to go with the 555 here is a one shot that will give about a 10 second pulse on power up. This would be placed on the automotive 12 V accessory line. I attached it as an .asc file as I know you have LtSpice.

Ron
 

Attachments

-live wire-

Joined Dec 22, 2017
959
For complex projects try an esp32. 240MHz clock, wifi control, and can be programed with the arduino ide. Tons of sensors, 34 i/os, and it's only $10! Highly recommended.

https://www.amazon.com/ESP-WROOM-32...=1522968525&sr=8-2-spons&keywords=esp32&psc=1
https://www.amazon.com/Development-...=1522968525&sr=8-1-spons&keywords=esp32&psc=1

For what you want to do, make an analog r/c circuit, unless you want to add more i/os. For simple stuff that needs a small microcontroller chip, I reccomend an ATtiny.
 

coolyyz321

Joined Mar 17, 2017
58
For complex projects try an esp32. 240MHz clock, wifi control, and can be programed with the arduino ide. Tons of sensors, 34 i/os, and it's only $10! Highly recommended
I have that development board and is pretty awesome, I love that thing, cool thing is you can use Micro python, Lua, and Arduino IDE.
 

-live wire-

Joined Dec 22, 2017
959
How might you make an HTML website (with a passcode) and then have different buttons, etc. that send variables to the microcontroller through wifi? I will be getting one shortly for a project and it would be useful info.
 

MaxHeadRoom

Joined Jul 18, 2013
28,617
I have pic12f683 with me.
If wanting to use a micro, there are such as the 12f1822 etc, that will run the internal Fosc at 32Khz, so every timer can be ran with 1sec time out.
This means you just run a timer as many times as you need in seconds to time out for the output.
Would be a trivial program.
Max.
 
Top