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.

Simple Add/Subtract Circuit

Status
Not open for further replies.

insttechbazza

New Member
I'm after a simple analogue add/subtract circuit that will, after a '+' button is pressed add the numbers 1-7 (buttons 1-7), in any order. It is also to subtract the same numbers after a '-' button is pressed.

I'm thinking along the lines of 7 parallel, different value resisitors connected to the relevant buttons. To subract, the resultant will pass through an inverting op-amp. I'm not overly concerned with a display as the final output will go through an A to D convertor, and into a PC.
 
insttechbazza said:
I'm after a simple analogue add/subtract circuit that will, after a '+' button is pressed add the numbers 1-7 (buttons 1-7), in any order. It is also to subtract the same numbers after a '-' button is pressed.

I'm thinking along the lines of 7 parallel, different value resisitors connected to the relevant buttons. To subract, the resultant will pass through an inverting op-amp. I'm not overly concerned with a display as the final output will go through an A to D convertor, and into a PC.
This sounds like you are thinking that subtraction is the inversion of addition.
 
if the idea is to use analog, why not use two?
bring both to PC and do the processing/calculation in the PC...
 
Thanks but...

... the circuit is part of a larger project. This part of the project is required to be analogue, and is to fit inside a simple switch/button box. It is to provide an override for an automatic scoring system. The system will automatically score a game of pool/snooker, but this box is to allow foul shot/points to be added/subtracted by the player pressing an 'add button' then the 'number (score)' to be added, (or subtracted).

As this is part of my final project we have to use every part of the taught syllabus, and this is our analogue part.
 
Make a simple resistor chain like in the diargam below, then use a ADC to convert this anolouge voltage into a binary output, this output can then be recognised and delt with acordingly in the main scoring section of the circuit. prob using a pic.
 

Attachments

  • resistor_chain.jpg
    resistor_chain.jpg
    9.8 KB · Views: 702
I would suggest you try googling for 'analogue computers', this is where opamps originally came from! - the circuit you require is called an adder - basically an opamp virtual earth mixer. For positive values you input positive voltages, for negative values you input negative voltages. As a single opamp adder inverts, you also need another one after it to correct the polarity - assuming that's required?.
 
Hmmm, I would think that the scoring system needs to be able to respond to an unspecified, and quite possible large, number of operations/inputs. The output of an analogue adder/subtracter will quite likely reach its min or max with only a few button presses so I think it, or indeed any analogue solution, will be unsatisfactory.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top