Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Should I use a micro-controller for this project?

Status
Not open for further replies.

thekyguy11

New Member
Hello.

My father and I are doing a project. We are building a vegetable oil setup to be used in his diesel truck. If you are unfamiliar with the idea, here is a link... https://www.greasecar.com/ . The basic idea is that there are two tanks on the truck. one for diesel, and one for veg oil. To run a diesel on straight veg oil, the engine must be warmed up and the oil must be above a certain temp. To keep the oil warm in winter, the veg oil tank on his truck will have coolant lines from the engine routed through a coil in or under the tank.

The reason I come to these boards is because I am trying to build an electronic device that will monitor and display the veg oil temp and level, automatically switch to the oil tank when temp has been reached, and act as a turbo timer when the vehicle is shut off. This way when my father shuts off the vehicle, the truck will actually remain idling for x amount of time and switch back to the diesel fuel to purge the fuel lines of any vegetable oil. After the time runs out, it will shut off. This prevents any oil from solidifying in the lines while the vehicle is off.

My knowledge of electronics is very basic, but I have taken an automotive electronics class at school. I have been experimenting with a 555 timer and I can get it to do almost everything I need, but not everything. I have another thread going of how I was going to do it... https://www.electro-tech-online.com/threads/555-timer-help.35460/

So, should I give up on making it work using the 555 timer etc, or should I use a micro controller? I don't know much about them, so I would definitely need to be pointed in the right direction. From what I understand i would need to select an appropriate chip, program it on the computer, burn it and solder away.

Now, from what I was reading, I would need a voltage divider to power the (2) 10-LED bars for the oil temp and level. Is this something a micro controller can also handle itself?

Also, I might add that I have done a lot of DIY tuning of Honda ECU's and I already have a Willem Burner that I use to burn 28 pin AT29256 chips. It looks like I could burn just about anything with this burner though.

I apologize for such a long post, but I felt all the information is necessary for someone to help out. To sum it up here is what I'm after.....

Should I use a micro controller to do all this? If so, which one, and where do I get information about it?

Thanks in advance to anyone who takes the time to read and reply.
 
Last edited:
Hi,
If there is no deadline for this own project, I would suggest you to learn up microcontroller. It can do almost everything but not everything :). This everything should be far more than the everything obtained from the 555.
You can go to https://www.microchip.com for searching the suitable PIC.
 
Hi.
I recommend the Atom interpreter chip. It is a PIC 16F876/-877 with a bootloader programmed into it. There is a dynamite *FREE!* BASIC to go with this. The chip itself is $20 for either version; modules and development boards are available for $150 on up. All this is available from www.basicmicro.com.

There are several outstanding features with this chip:
- The bootloader means you can program this using serial communications with a PC, so no device programmer is needed. If your project includes a serial port, you don't have to remove the chip to reprogram it; just do it there on your board.
- This PIC has 5 or 7 10-bit ADCs on it. You can run the output of all your temperature sensors to this after some minor signal conditioning.
- Besides the ADC pins, you have 16 I/O pins (more on the -877) to monitor signals (think switches, keypads) and turn items on and off (relays, solenoids, LEDs, etc.).
- The BASIC's instruction set includes PAUSE commands that allow you to create timeouts easily. The syntax is quite simple and there are no arcane rules of line termination or function setup as with C. A single line of code in the BASIC does what takes several lines of code in assembly or C, making it much quicker to learn and understand during later debug sessions.

Go to their downloads section and download the "10 projects" manual. It ends in construction of a remote control RF robot, but the earlier starter projects will largely show you how to do what you want. And download the BASIC manual and start reading it. It's all pretty straightforward.

I recommend you use the National Semi LM2940-5.0 5V regulator for the power supply regulator. This is designed to work in noisy automotive electrical sytems. And filter the living bejeezus out of your supply, as spikes will wreak havoc on your analog readings.

'Luck on your project!
kenjj
 
If BASIC is what you want you can learn using possibly the best BASIC compiler for PICs available. The free SE edition will let you write some very powerful programs but it's only for the modern 18F PICs.
A programmer with a 18F1320 tutor (everything you need to get started) is only $45US. It's called the Junebug, see the details on my site or read posts from the many forum member that use a Junebug.
The Junebug can program pretty near every Flash PIC out there that's 5V.
 
So does this mean I won't be able to use my Willem Burner if I wanted to?

Actually, I am liking the Junebug thing. Looks very simple and straight-forward. Not too pricey either. That's my favorite so far... and my search continues.
 
Last edited:
Sure if your Willem Burner supports the 18F then you can use Swordfish BASIC. You might already have all the hardware you need. (cept the 18F)
 
just went through the list of supported chips, and I didn't see an 18F, just a bunch of different 16F's. AH well...

Ok, so lets see if I understand this.

I buy and assemble the Junebug to "burn" the 18F1320, which is the microchip i would be using. I use the software from your site to write the program? Or that swordfish thing?

And the 18F1320 with appropriate components (including the National Semi LM2940-5.0 5V regulator for power supply, transistors, resistors, caps, etc) should be enough to handle which pump comes on, run the LED fuel temp and level gauges, and operate the relay that will keep the truck running after the key is switched off?
 
The Junebug consists of two seperate but connectable circuits. The programmer / debugger which is PICkit 2 compatible and the Tutor which has a few LEDs, switches, I/O and such.
You would use its 18F1320 for learning how to program PICs, you can use MPASM, C18, Swordfish BASIC or whatever other language that strikes your fancy.
The 18F1320 is a nice 18pin PIC, it's got A/D, EUSART, built in Osc and more than enough space to write a pump program.

PS you can download a free but limited to 40lines of code BASIC for some 16F PICs from MeLabs (PICBASIC Pro demo). Just make sure you choose a PIC that is supported by both your Willem & PICBASIC Pro demo. The 16F628A might be handy as it's got a pair of comparators, but if you need A/D a 16F877A or 16F88 both have em.
 
I'm going to think out loud for a second here... so the Junebug is for learning/experimenting/practice purposes only. I can use my willem to program, i just need to purchase a 16F877A or 16F88.

Now, say I get some code written that I like, would the code be interchangeable? I'm assuming the pin locations or input/outputs would have to be changed for the chip it's being used on?
 
The Junebug is a proper programmer / debugger just like the PICkit2.
Here it's connected to the Mongoose robot kit and works just like any other programmer.
**broken link removed**
 
Alright, well before I get ahead of myself any further, I'm going to just order up a Junebug kit and start messin with it.
 
Good thought and good layout. Very impressive. You probably also need some sensor knowledge and some field test.
 
Thanks! Sensors I can handle, I've been doing all kinds of automotive projects for years. I've been reading the manual for swordfish, and I just signed up for a programmable controllers class at Milwaukee Area Technical College, where I'm already attending for Automotive Technology. We'll see if this class will be at all related.
 
Offer to build this project kit for you

Hi,

I know this is an old link but.....
I read of your idea with much interest. I am a self taught PIC programmer with the facility to build pcbs.

If you like I can make this project for you complete with config menu for turbo timeout, oil temperatures etc.

pm me if you are interested.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top