Jump to content
Sign in to follow this  
Master_Scythe

Help IC programming

Recommended Posts

So I have a lot of cool ideas. (no, honest! I do! shut up....) I just am yet to learn how to implement them.

 

Right now, I have reason to want an IC that will monitor volts.

When a voltage goes below a certain threshold (user adjustable), I'd like to trigger a relay.

 

Seems simple enough; and I bet it is. But where do I begin?

 

Arduino? PIC programmer? (and if so, what language\skills do i start learning?)

Most of my ideas for cool 'kits' are based around IF (scenario) THEN (action).

 

Where do I even start?

Share this post


Link to post
Share on other sites

Depends on the application, whether you want it dedicated or reusable among other things.

 

I've not gotten into it, it's one of those things that I'd like to get into but it'd just be put into the circular queue of stuff that gets periodic attention.

 

For one-use probably a PIC - but given you want to trigger a relay based on a threshold you could probably do it with old-fashioned analog electronics as they would have in the old days. Or maybe some almost as old 7400 and 4000 series logic ICs.

 

The likes of Arduino, Rasbery Pi, AVRs (to lesser extent) - more along the lines of multiple uses and experimentation. Of course you could implement a task by programming one of those then port it to a cheap PIC later on.

 

Jaycar have a few kits - worth a look at their website.

Share this post


Link to post
Share on other sites

Sound like you may need a Voltage monitoring circuit with a Filtering circuit included. Which may be very simple to do if you understand electronics ,which sadly i gave up when PC Computers hit the scene.

 

For IC programming you need a EEPROM programmer they used too attach to a port in your computer and you burn a program into the CHip.

 

You may need to provide more details on this actually required for? Is it going to put in a PC or Work Station or part of Network monitoring setup.

 

Without the measurements from all the associated circuits it would be hard to even know where to start. Is something you are using overheating or continually blowing up.

Edited by codecreeper

Share this post


Link to post
Share on other sites

There's various methods of programming ICs - in some cases can be done via Eprom programmer, some use JTAG, some use a simple serial or parallel interface.

Share this post


Link to post
Share on other sites

So I have a lot of cool ideas. (no, honest! I do! shut up....) I just am yet to learn how to implement them.

 

Right now, I have reason to want an IC that will monitor volts.

When a voltage goes below a certain threshold (user adjustable), I'd like to trigger a relay.

 

Seems simple enough; and I bet it is. But where do I begin?

 

Arduino? PIC programmer? (and if so, what language\skills do i start learning?)

Most of my ideas for cool 'kits' are based around IF (scenario) THEN (action).

 

Where do I even start?

The simplest design would be a voltage reference, an opamp, a MOSFET, a power diode, and a handful of resistors.

 

If you want to get in to programming Microcontrollers, Arduino is a good place to start, shitloads of help for beginners. As you get better, your skills are somewhat transferrable, since the Arduino IDE's programming language is a subset of C++. Once you're comfortable with that, you can ditch the Arduino software, write pure C, compile it with avr-gcc and program the chip with avrdude. All without changing hardware.

 

Jaycar has a good Arduino compatible kit (cat no XC4262) that I've recommended to a heap of people. Don't let "Arduino compatible" throw you off, the Arduino boards and software are all open source, and the microcontroller (ATMega328P) is an off-the-shelf part.

Edited by SquallStrife

Share this post


Link to post
Share on other sites

You want an Arduino. You can uhm-and-uh about it all you want, but the bottom line is that they are aimed at begginers have the biggest internet support community that there is.

 

The programming language that they use is also dead easy.

 

But hey, pick something else if you want. The TI MSP430 Launchpad is dirt cheap, and I'm sure there are plenty of PICKit compatible PIC boards out there. STM put out some reasonably price ARM boards too, but thats far too complex for what you want.

 

If you're using an EEPROM programmer or JTAG then you are going about it the wrong way. You are not in the 90s, and you aren't anything to warrant JTAG.

 

The question now is simply how to measure the voltage. If it's simply between 0v and 5v, then you can just feed it directly into an Arduino pin. If not, you're going to have to give more info.

 

Squallstrife sounds to be on the money.

 

So is the person that said that you could achieve the same results with normal discrete digital electronics - but if you want to learn micros then there's no reason not to use one.

 

Rob.

Edited by robzy

Share this post


Link to post
Share on other sites

Actually implementing it? bubcus.

 

Looking into what can do it?

Well I confirmed arduino can and looked at some of the code. It looks very fun to program, but would make the cost of each device a little high....

There was quite a few IC's which can handle a 5v trigger, but I got obsessed learning about them all, and then got distracted by mosfet amplifier chips.....

 

What I couldnt research properly was how to do it 'analogue' like was suggested, I dont know enough electrical theory to design something like that, and starting from the bottom is a big deal.

Share this post


Link to post
Share on other sites

I imagine something like this:

 

Posted Image

 

R1 and R2 form a potential divider, setting the "threshold" voltage.

 

R3 is a pullup, since comparators usually sink current rather than drive an output.

 

C1 is a decoupling cap for the comparator.

 

U1 is ideally a comparator, like LM139 or similar. (In a pinch, a regular opamp can be used, like the LM741. In the case of using an opamp, R3 may need to be a pulldown, or omitted completely, consult the datasheet. Also, an opamp will have no hysteresis, so when the measured voltage is very close to the threshold, the output will "flicker". One could work around this with an RC timer or even a monostable 555 timer, but if you're going to do that, just use a comparator in the first place.)

 

Q1 is an n-channel MOSFET that serves as the switch in the circuit. When the gate is biased up, current can flow from the source to the drain.

 

D1 is a power diode, 1N4001 or similar. When power is removed from a relay, the magnetic field collapses and creates current across the coil contacts, which may be high enough to damage components. D1 provides a low-resistance path for this current, protecting the rest of the circuit.

 

 

This is about the extent of my analogue knowledge, by the way... :-S

Share this post


Link to post
Share on other sites

I have some research to do, I understand about 45-60% of that.

Right now I'm actively studying beginner python; but dont think this help is unappreciated. It will be used and I'm incredibly grateful.

 

I'll be looking at some data sheets tonight to 'fill in the blanks' in my own mind. Exciting!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×