I am doing this project:

I have 4 inputs. These are push buttons, connected to a microcontroller.

Each time a push button is pressed, say for example pushbutton_1 is pressed, the press of a switch button should be recognised as a HIGH.

In its normal unpressed state it should be recognised as a LOW.

Then using serial communication i should transfer it to a computer.

Along with this, i need to implement a count for each button.

Each time a push button is pressed, the count that is assigned to that push button, should increment by 1.

The data arriving through serial communication should be transferred to an excel sheet/database.

The excel sheet/database should display a count for each pushbutton.

I have 4 important question areas:

  1. Which microcontroller should i use? (I have experience with arduino development platform)

  2. How do i implement the transfer of data from microcontroller to computer via serial communication?

  3. Afterwards, how do i transfer the arriving data to MS excel/database?

  4. How do i run implement the system in realtime?

Please suggest me the best possible way to implement this system.

  • \$\begingroup\$ You seem to be asking us to do your system design. That's not what SE is for. There are some more specific questions embedded in your text, but they are still of the 'do this for me' type. One question I can asnwer for you: it does not matter which microcontroller you choose. Arduino is fine, as is PIC, Cortex, MSP430, even 8051. \$\endgroup\$ Feb 15, 2015 at 9:40
  • \$\begingroup\$ @WoutervanOoijen No where have i asked to 'do this for me' I am only asking for ideas and methods. \$\endgroup\$
    – adrian
    Feb 15, 2015 at 9:45
  • \$\begingroup\$ The ideas and methods you ask for are so high-level and open-ended that you essentially ask for everything to be designed for you. \$\endgroup\$ Feb 15, 2015 at 11:01

1 Answer 1


What's "best" depends on the factors that are important to you. The simplest is probably to use the flow control lines on a serial port to read the pushbuttons. An example is shown here for a single input. This is likely the cheapest solution.

Next simple is probably the Arduino since you are already familiar with it. It is trivial to read a number of switch inputs with Arduino. Then you will implement a communications protocol to transfer the data. Possibly send a packet every time a switch changes state.

And then there are multiple off the shelf systems that can do what you want. For some definitions of "best" they would work.

The problem of saving data to Excel is probably easiest done if saved as a .csv file. IF it must be done in native Excel format, I think it can be done from a .NET program as long as Excel is installed on the target system since you will need to link to the Office assemblies.

Edited to add that I was a bit curious about what was available in .NET and I just discovered the OpenXML SDK that will let you create Microsoft Office files. May be worth looking at.

  • \$\begingroup\$ can i use plx-daq software with the first solution you have suggested ? That is use of the flow control lines on a serial port to read the pushbuttons. \$\endgroup\$
    – adrian
    Feb 16, 2015 at 2:30
  • \$\begingroup\$ I have no idea what that software is. Never heard of it. \$\endgroup\$
    – lyndon
    Feb 16, 2015 at 2:34
  • \$\begingroup\$ parallax.com/downloads/plx-daq \$\endgroup\$
    – adrian
    Feb 16, 2015 at 2:43
  • \$\begingroup\$ At first glance it doesn't look like it will do that. Perhaps talk to Parallax and ask them. \$\endgroup\$
    – lyndon
    Feb 16, 2015 at 17:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.