Choosing microchip for my simple project

imraneesa

Joined Dec 18, 2014
222
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

Joined Jan 15, 2015
4,508
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 222 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?

Joined Jan 15, 2015
4,508
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

Joined Jul 18, 2013
19,033
I would have thought a 555 would have performed that simple task?
Micro is a little over-kill!
Per post #2.
Max.

imraneesa

Joined Dec 18, 2014
222
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.

Joined Jan 15, 2015
4,508
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

imraneesa

Joined Dec 18, 2014
222
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

• 1.7 KB Views: 2
• 1.7 KB Views: 2
• 1.7 KB Views: 1

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

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

imraneesa

Joined Dec 18, 2014
222
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

• 20.7 KB Views: 2
• 20.7 KB Views: 2

Joined Jan 15, 2015
4,508
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

imraneesa

Joined Dec 18, 2014
222
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.

Joined Mar 10, 2018
3,577

coolyyz321

Joined Mar 17, 2017
56
If you do want another option for a microcontroller that can be programmed with the Arduino IDE, try out the Adafruit Trinket. This is the link to the part here. "https://www.adafruit.com/product/1501"

Joined Jan 15, 2015
4,508
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

• 1.6 KB Views: 2

-live wire-

Joined Dec 22, 2017
887
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-Development-Dual-Mode-Microcontroller-Integrated/dp/B0718T232Z/ref=sr_1_2_sspa?ie=UTF8&qid=1522968525&sr=8-2-spons&keywords=esp32&psc=1 https://www.amazon.com/Development-2-4GHz-Dual-Mode-Bluetooth-Antenna/dp/B079PSQZF9/ref=sr_1_1_sspa?ie=UTF8&qid=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 56 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
887
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.

Joined Jul 18, 2013
19,033
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.