Using switches on microcontrollers – obvious, but…

Switches and buttons are common way of user interaction to embedded system. Normally we are used to connect pull-up (or pull-down) resistor for a switch and then check for its value. There is nothing wrong with such circuit, but speaking of power efficiency, this design can cause some problems. Since resistor is constantly connected to VCC while switch is closed, it constantly draws significant current. What if there are tens of switches – circuit starts drawing lots of current. For battery circuits this is in-acceptable. One simple way would be to select higher pull-up resistor values. In many cases it might work well, but there is always a limit how much you can rise its value. First of all microcontroller input have its threshold current to work reliably. But most… Continue reading

Single I/O pin – double function

There are many situations when you simply run out of I/O pins on microcontroller. For new project you can always select different microcontroller with more pins or ad I/O expander. If you have project running on Raspberry Pi and almost all your pins are busy, then you should try to go smart way. Emilio faced this problem when he needed to add LED indicator and button to his existing project, but there were only single free pin available. So he thought that functionality could be achieved with single pin quite easy. He attached LED to power supply via current limiting resistor. Then using same pin he added push button to ground through another resistor. The rest depends on how program controls that pin. In this case Python script simply runs… Continue reading

Measure Your Blood Pressure is as easy as ABC!

We’re living in the 21st century, where everything is moving in very fast pace. Hence, most of the people in nowadays are being threatened with lifestyle diseases, such as depression, obesity, diabetes, high blood pressure and so on… Talking about the high blood pressure, one out of three Americans is having the risk of getting high blood pressure, due to the imbalanced diet (High sodium, low potassium diet). Honestly, those people who got the high blood pressure didn’t seem to realize about it, until they’re getting stroke and paralyzed all the sudden! Hence, for checking whether you’re free from high blood pressure or not, you can simply do it by creating an automatic blood pressure meter! This automatic blood pressure meter is specially-designed, which is used for measuring the systolic… Continue reading