We’ve all been there. You’re building up a microcontroller project and you wish that you could just add “one more feature” but you’re limited by the hardware. Time to start thinking. (Or, arguably, buy the next model up.)
[Sam Feller] found himself in this position, adding a knob to set the time and a button to arm the alarm for his Analog Voltmeter Clock, and he came up with a way to implement an on-off switch, and poll a button and a potentiometer with only two pins of a microcontroller.
The problem with potentiometers in low-power designs is that they’re always leaking power. That is, unless you switch them off when you’re not using them. So the ideal solution is to power the potentiometer from one GPIO pin on the microcontroller, and read its value with another. That’s two GPIO pins just for the potentiometer. But [Sam] needed to read input from a button too, and he was out of pins.
Not pressed: pot sees VCC and VCC/2
Pressed: pot sees VCC/2 and GND
His clever solution is to switch two resistors in or out of the circuit depending on the status of the pushbutton, so that the voltage range at the potentiometer is between either VCC and VCC/2 when the switch is pressed, or between VCC/2 and GND when the switch is not pressed.
If the ADC reads something higher than VCC/2, the microcontroller knows that the button is pressed, and vice-versa. The potentiometer’s setting determines exactly where the voltage lies within either range.
Done and done. If you find yourself in the similar situation of needing to read in values from a whole bunch of buttons instead of a potentiometer, then you can try using an R-2R DAC wired up to the pushbuttons and reading the (analog) value to figure out which buttons are pressed. (If you squint your eyes just right, this solution is the same as the R-2R DAC one with the potentiometer replacing all but the most-significant bit of the R-2R DAC.)
Another tool for the toolbox. Thanks [Sam].
It’s been a few weeks since the incident where Ahmed Mohamed, a student, had one of his inventions mistaken for a bomb by his school and the police, despite the device clearly being a clock. We asked for submissions of all of your clock builds to show our support for Ahmed, and the latest one is the tiniest yet but still has all of the features of a full-sized clock (none of which is explosions).
[Markus]’s tiny clock uses a PIC24 which is a small yet powerful chip. The timekeeping is done on an RTCC peripheral, and the clock’s seven segment displays are temporarily lit when the user presses a button. Since the LEDs aren’t on all the time, and the PIC only consumes a few microamps on standby, the clock can go for years on a single charge of the small lithium-ion battery in the back. There’s also a phototransistor which dims the display in the dark, and a white LED which could be used as a small flashlight in a pinch. If these features and the build technique look familiar it’s because of [Markus’] tiny MSP430 clock which he was showing around last year.
Both of his tiny clocks are quite impressive for their size, features, and power consumption. Some of the other clocks we’ve featured recently include robot clocks, clocks for social good, and clocks that are not just clocks (but still won’t explode). We’re suckers for a good clock project here, so keep sending them in!
Continue reading “Tiny PIC Clock is Not a Tiny Bomb”
How long can you keep an Arduino circuit running on three AA batteries? With careful design, [educ8s] built a temperature sensor that lasts well over a year on a single charge of three 2250 mAH rechargeable cells (or, at least, should last that long).
Like most long-life designs, this temperature sensor spends most of its time sleeping. The design uses a DS18B20 temperature sensor and a Nokia 5110 LCD display. It also uses a photoresistor to shut off the LCD display in the dark for further power savings.
During sleep, the device only draws 260 microamps with the display on and 70 microamps with the display off. Every two minutes, the processor wakes up and reads the temperature, drawing about 12 milliamps for a very short time.
Along with the code, [educ8s] has a spreadsheet that computes the battery life based on the different measured parameters and the battery vendor’s claimed self discharge rate.
Of course, with a bigger battery pack, you could get even more service from a charge. If you need a refresher on battery selection, we covered that not long ago. Or you can check out a ridiculously complete battery comparison site if you want to improve your battery selection.
Continue reading “It Keeps on Going and… Arduino Edition”
If you want to proclaim to the world that you’re a geek, one good way to go about it is to wear a wristwatch that displays the time in binary. [Jordan] designs embedded systems, and he figured that by building this watch he could not only build up his geek cred but also learn a thing or two about working with PIC microcontrollers for low power applications. It seems he was able to accomplish both of these goals.
The wristwatch runs off of a PIC18F24J11 microcontroller. This chip seemed ideal because it included a built in real-time clock and calendar source. It also included enough pins to drive the LEDs without the need of a shift register. The icing on the cake was a deep sleep mode that would decrease the overall power consumption.
The watch contains three sets of LEDs to display the information. Two green LEDs get toggled back and forth to indicate to the user whether the time or date is being displayed. When the time is being displayed, the green LED toggles on or off each second. The top row of red LEDs displays either the current hour or month. The bottom row of blue LEDs displays the minutes or the day of the month. The PCB silk screen has labels that help the user identify what each LED is for.
The unit is controlled via two push buttons. The three primary modes are time, date, and seconds. “Seconds” mode changes the bottom row of LEDs so they update to show how many seconds have passed in the current minute. [Jordan] went so far as to include a sort of animation in between modes. Whenever the mode is changed, the LED values shift in from the left. Small things like that really take this project a step further than most.
The board includes a header to make it easy to reprogram the PIC. [Jordan] seized an opportunity to make extra use out of this header. By placing the header at the top of the board, and an extra header at the bottom, he was able to use a ribbon cable as the watch band. The cable is not used in normal operation, but it adds that extra bit of geekiness to an already geeky project.
[Jordan] got such a big response from the Internet community about this project that he started selling them online. The only problem is he sold out immediately. Luckily for us, he released all of the source code and schematics on GitHub so we can make our own.
In the realm of low-powered desktop computers, there are some options such as the Raspberry Pi that usually come out on top. While they use only a few watts, these tend to be a little lackluster in the performance department and sometimes a full desktop computer is called for. [Emile] aka [Mux] is somewhat of an expert at pairing down the power requirements for desktop computers, and got his to run on just 10 watts. Not only that, but he installed the whole thing in a board and mounted it to his wall. (Google Translated from Dutch)
The computer itself is based on a MSI H81M-P33 motherboard and a Celeron G1820 dual-core processor with 8GB RAM. To keep the power requirements down even further, the motherboard was heavily modified. To power the stereo custom USB DAC, power amplifier board, and USB volume button boards were built and installed. The display is handled by an Optoma pico projector, and the 10-watt power requirement allows the computer to be passively cooled as well.
As impressive as the electronics are for this computer, the housing for it is equally so. Everything is mounted to the backside of an elegant piece of wood which has been purposefully carved out to hold each specific component. Custom speakers were carved as well, and the entire thing is mounted on the wall above the bed. The only electronics visible is the projector! It’s even more impressive than [Mux]’s first low-power computer.
Orientation trackers can be used for a ton of different applications: tracking mishandled packages, theft notification of valuables, and navigation are just a few examples! A recent blog post from Texas Instruments discusses how to build a low-cost and low-power orientation tracker with the MSP430.
Based on the MSP430 LaunchPad and CircuitCo’s Educational BoosterPack, the orientation tracker is very simple to put together. It can also be made wireless using any of the wireless BoosterPacks with a Fuel Tank BoosterPack, or by using the BLE Booster Pack with a built in Lithium Battery circuitry. TI provides all the necessary code and design files in their reference application for getting your orientation tracker up and running. Be sure to see the device in action after the break! This project not only involves building a low-power orientation tracker, but also showcases IQmathLib, a library of optimized fixed point math functions on the MSP430. One of the more challenging aspects of using small MCUs such as the MSP430 or Arduino is how inefficient built in math libraries are. Check out the IQmathLib, it greatly improves upon the built in math functions for the MSP430.
It would be interesting to see this project modified to be a DIY pedometer or be used on a self-balancing robot. It would also be interesting to see the IQmathLib ported to other micros, such as the Arduino. Take a look and see how you can use this reference design in your own projects!
Continue reading “Low-Power Orientation Tracker and an Optimized Math Library for the MSP430”
After being inspired by the Deciwatt Gravity light, [Steve Dufresne] decided he wanted to try making his own as a proof of concept.
The Gravity Light by Deciwatt is an innovative device designed for third world countries to help eliminate expensive lighting like kerosene lamps. It has a small weight on a pulley which can be lifted up in under 3 seconds. During its slow descent down the weight provides light for 25 minutes! It’s affordable, sustainable, and reliable. It’s also mechanically impressive, which is exactly why [Steve] decided to try making his own.
He’s using a single LED, a small DC motor, a few pieces of wood, an old bicycle wheel, some bicycle chain, and a few jugs of water. The water is connected to the chain which is looped over the smallest gear on the bike. The generator is then powered by a belt wrapping around the outside of the rim. This gives the motor enough speed to generate electricity for the LED. His current design only lasts for about 3 minutes, but he’s already working on the second iteration. Testing systems like this really give you an appreciation for the effort that must have gone into the real Gravity Light.
Stick around after the break to see it in action.
Continue reading “Homemade Gravity Light Doesn’t Last Long but Proves the Concept!”