Posts

Showing posts with the label hacking

Add light sensor to Wise Clock 4

This is long overdue. As we know, the display brightness on Wise Clock 4 can be changed between 5 levels, by pressing the "Plus" button. To adjust the brightness automatically, based on the light conditions, we need to add a light-sensitive sensor of some sort, and the most common is the LDR (light-dependent resistor). Any of the countless articles and tutorials on Arduino + LDR will teach how to connect the LDR to an analog pin, using a voltage divider. For Wise Clock 4 , the LDR is connected between A0 (pin 40 of the processor) and ground, with a 10k resistor between A0 and Vcc, as shown below:   GND|----[ LDR ]---A0---[10k resistor]----+Vcc The automatic brightness adjustment is enabled in software with this macro (in file UserConf.h ): // use an LDR (connected to A0) to automatically adjust // (every 5 seconds) screen brightness to ambient light; #define AUTO_BRIGHTNESS and implemented in this new function: void WiseClock::checkBrightness() { #ifdef AUTO_BRIGHTNESS ...

Add a barometer sensor to Wise Clock 4

Image
While cleaning up my desk, I found a little I2C module that I completely forgot about. It is a breakout for BMP180 barometer sensor, which I probably bought on ebay for a couple of dollars (I just checked , it is still under $2). This tiny board can be added literally to any Arduino clock to display atmospheric pressure, with the help of  Adafruit_BMP085 library . Connecting the barometer to Wise Clock 4 is trivial: I soldered wires directly to processor pins (SDA, SCL, VCC and GND), as shown in the photo. There is plenty of clearance between the board and the display. In the software, as mentioned, I used the Adafruit BMP085 library, which also covers the compatible BMP180. There is no extra setting required from the user: the pressure is displayed together with the temperature, and enabled/disabled from the TEMP+/- menus. Also, there is no extra settings when compiling/building: if the BMP180 module is not installed, no pressure data will be displayed. Essentially, the new code...

WiFiChron fix and other WiFis

Image
The peculiar feature of the "May 2015" revision of WiFiChron board is that it was designed to use software serial to communicate with either the XBee or ESP module. The reason is related to debugging. I wanted to be able to send messages to the serial monitor while (software serially) communicating with the serial device. This solution works well for XBee ( GPSBee , BTBee ), but not for ESP8266, only because the software takes more than the available 2K of RAM in this case (WiFi + software serial). The immediate fix to use the ESP module is to connect its Rx/Tx lines to Rx/Tx of the processor. The existing connections can be left uncut, since they are not used in the sketch for ESP8266 . The wiring should be like in the photo below. The "permanent" fix would be re-designing the board to use ATmega1284 SMD (DIP-40 would not fit). Talking about 1284,  take a look at Farit's WiseClock4 mod. He used the WiseClock4 board, but completely re-wrote the software, in...

"Home-made", Wise Clock-based, Alpha Clock Five

Image
I saw Justin's recent post on Alpha Clock Five and I just couldn't resist not to try it myself too. Since I didn't have that clock, I thought of improvising one by making a 5-character display that would plug into my Wise Clock 4 board. The idea was easy, the implementation not so. After many hours of hand-wiring, this is how it looks like. The displays are 1" single digit alphanumeric  (common anode) from sparkfun, now retired. They came with non-functional dots, probably the reason they were less than $2 each. The spacing between the individual displays is forced by the protoboard. The 2 boards are connected through the pairs of 2x8 headers. All pins used by Alpha Clock 5 to drive the displays are wired to the unused header on the Wise Clock 4 board. Not to mention  that the software compilation and upload worked without any glitch (after downloading the very nice  DS1307RTC library ) The only regret is that this clock lacks seconds. One extra display would have a...

My experience with Axiris IV-3 shield for Arduino

Image
I recently bought on ebay the PCB for  this open source VFD shield , designed and made by Axiris, a company in Belgium. I was attracted by the solid documentation provided on their site, which includes the schematics (even Eagle files), assembly instructions, demo software, files for laser-cutting the enclosure. I should also mention the professional photos, rivaling those of the top sites (e.g. adafruit, sparkfun). Assembly went smoothly, as expected. I also expected it to work on the first try, like the other two VFD devices I built previously, the Ice Tube Clock and the akafugu VFD clock . I guess I ran out of luck :) But, as my kid would say, "losing is learning". This became an opportunity for me to actually go one step further than just soldering the components mindlessly (because the instructions are too easy :) This is how I learned what fascinating little devices VFDs are. They function similar to cathode ray tubes (CRT), used in the previous generation of TVs: ...

Experimenting with Numitron filament tubes

Image
A while ago I built a battery-powered single digit Numitron clock.  There was nothing challenging about it. Each segment of a Numitron takes less than 20mA, like a LED, and requires between 3.5V and 4.5V to light up. So the segments can be driven directly from the processor or other TTLs (shift registers etc). Since Numitrons behave so similar to (7-segments) LEDs, why not use one of my old LED matrix shields to multiplex 4 of them, I thought. And instead of the current limiting resistors, I would use Schottky diode s, to bring them even closer functionally to LEDs. I would even be able to use the same interrupt-based code for multiplexing. I started the practical experiment with just one Numitron. The 7 segments are driven by a 595 shift register and the common electrode gets grounded through a ULN2803 gate. The diodes insure the current flows in one direction only and they also guarantee a maximum voltage of 4.5V on each segment. In practice, multiplexing does not work...

Horizontal mod for the HDSP clock

Image
Making a proper enclosure for the HDSP clock is challenging, since it was designed specifically to stand on a phone charging dock. Inspired by DaveC's lay-flat version  (he didn't send photos of the inside though), I put some thinking into how to easily convert the "stand up", vertical clock, to an "encasable" horizontal one. The main requirement is to place the display perpendicular to the board. This could be done using a right-angle header of some sort, as shown in the photo below. With this easiest solution, as you see in the next photo, the board must be upside down for the display to show properly. With a bit of more work, basically re-wiring the connections to the display on the adapter PCB (that holds the display), the whole device looks more appropriate, as shown in the next photo. Which brings me to the subject of "display adapters". Although the HDSP clock was designed specifically for HDSP-2534 , it can be easily converted to use simi...

XBee-fy the ESP8266 WiFi module

Image
With the new ESP8266 module, adding WiFi to any Arduino project became a lot cheaper. This module has a serial interface; therefore it only requires connecting 4 pins: Tx, Rx, 3V3 and Ground, as shown in this image. A few peculiar facts about ESP8266: default serial baud rate is 57600; since this rate is too high for SoftwareSerial library, a hardware port should be used; requires 3V3 for power and level shifting for Rx signal (5V to 3V3); physical interface is a 2x4 pin male header; firmware can be upgraded to a version that allows 9600 baud rate; can be used either as client or server. The first two characteristics makes it a perfect candidate for a module with an XBee footprint, as is WiFly , for example. It took me about half an hour to do it, following these steps. cut a piece of 2-mm perfboard to the XBee dimensions; solder two 10-pin the 2-mm-spaced male headers on the sides; desolder (using wick) the 2x4 header; mechanically attach the header-less ESP8266 module to the XBee p...

M4 receiver backpack for reliable wireless remote control

Image
My investigation into the failure of the M4 receiver remote controlling my Wise Clock 4 concluded with the need to add a step-up converter. The Sure 1632 display makes the input voltage drop sometimes below the absolute minimum of 4.5V required for the M4 module to work properly. It's not the noise (spikes) in the 5V power, nor the interference on 315MHz. I designed a simple " M4 receiver backpack " that uses a DC-DC step-up converter to ensure a 5V power for the M4 receiver module. The board supports 2 different kinds of converters, one from ebay (red in the photo below), the other from tindie (made by BBtech, black in the photo). The backpack can be used, by default, without the step-up converter if the voltage is steady at around 5V. (A trace-jumper must be cut when a converter is added.) The wireless remote pair of 4-key fob transmitter and receiver module is sold by Adafruit or vendors on ebay. The assembled board wired to Wise Clock 4 is shown in the photos be...

bGeigie Nano PCB remixed

Image
As I pointed out in my review on Safecast bGeigie Nano kit, the size of the current software already reached the limit of processor's program memory of 30KB or so. From this point on, it is difficult (if not impossible) to add new code features, and that may require drastic code optimization or even disabling existing features. I thought that the easiest solution to keep this project up-to-date is by upgrading the processor, by entirely replacing the Fio board with an ATmega 644P plus a few extra components (e.g. LiPo charger). This makes the kit a bit more challenging to build, since it requires soldering SMD components, but could also save a few bucks. The device is still Arduino-compatible and programmable, like to Fio, using the FTDI breakout . Updated Jul 11, 2014 : As Rob suggested, I added the XBee module as well. New Eagle files are here . This is how the bGeigie Nano Plus PCB looks now. (I also added an option for the Fastrax UP501 module, a bit cheaper then the Ultim...

The simplest Arduino LCD Clock

Image
I wrote up this post in response to the many inquiries I get about Arduino school projects. Here I describe how to build the most basic (and probably the lowest cost as well) Arduino clock, using a real time clock (RTC) chip and a 1602 LCD display (2 lines of 16 characters). Unlike most of the LCD clocks out there (the only notable exception being Kevin Rye's LCD clock ), this one is also encased and ready to be used in real life. Actually, the build starts with the enclosure (the very affordable adafruit LCD stand ), which drives the requirements for the rest of the components. Note: This LCD clock does not have any buttons. The time and date are set with the serial monitor (or Hyperterminal or any other serial console), by sending specific commands. I was thinking of adding the Bluetooth module, but then the process would be the same (or maybe even more complex, if you consider the pairing step), and it would only replace the PC with an Android phone or tablet. Using serial moni...

Arduino-compatible VFD modular clock from Akafugu

Image
There aren't many VFD clock kits out there that are software-compatible with Arduino (and by that I mean the "Arduino sketch" being compilable in Arduino IDE and uploadable through USB-FTDI). Most of these kits come with the microcontroller pre-programmed, so they can be built quickly and easily, with minimal effort (totally understandable instant gratification; nobody wants to end up with an expensive dud). Upgrading the software usually requires familiarity with the microcontroller toolchain (compile-build-flash), plus an ISP programmer. (Note: The only processor I am familiar with is AVR/Atmega.) I was going to build myself an Arduino-based VFD clock , one that can take a sketch through the FTDI cable. Instead of starting from scratch (choosing a schematic, making the board etc), I decided to try one of the only 2 open-source VFD clock kits I found that are based on Atmega processor and : Adafruit's Ice Clock Akafugu VFD modular clock I settled for the VFD modula...

Play WAV files from SD card with Wise Clock 3/4 board

Image
The video below shows  another hack for Wise Clock 3/4 , playing a WAV file directly (not using extra hardware) from SD card, with the help of the  TMRpcm library . The TMRpcm software uses the standard SD library (coming with Arduino IDE 1.0 and later) to read WAV files from SD card. To output the audio while buffering the content of the SD file, TMRpcm uses ISR triggered by internal timer. The buzzer/speaker can be connected only to certain pins of the processor. For ATmega1284/ATmega644 (used in Wise Clock 3/4 ), these pins are D3, D4, D12, D13, D14 and D15, as shown in the definition below (from sanguino core file pins_arduino.c ). From the perspective of TMRpcm library, the buzzer in Wise Clock 4 is connected to the "wrong" pins, D22 and D23, which are not eligible for this trick. I chose to connect another speaker to pin D13, but that's already taken by the display (CS, pin 1). So I had to cut the trace from D13 to the display, and connect pin 1 of the display to ...

Hacking Wise Clock 3/4 - Graphical Audio Spectrum Analyzer

Image
For those who asked how to add hardware and software to their Wise Clock 3 or 4 , here is a step-by-step recipe, using the example of a digital vu-meter. The hardware itself is nothing new , based on the MSGEQ7 "graphic equalizer display filter" chip. The minor challenge is adding the multi-band vu-meter application to the existing Wise Clock 3/4 software. Step 1. First make sure that the new hardware works on its own. Connect it to an Arduino and test it with a sketch that performs the desired functionality. This sketch will be the base code for your new Wise Clock 4 "app". In my example, I assembled the circuit shown below, where the MSGEQ7 and the 3216 display are connected to an old seeeduino. The 3216 display is connected to the same digital pins used in Wise Clock 4 (D12, D13, D14, D15). The MSGEQ7 chip uses analog pin A2 and digital pins D2 and D3 (these will  need to be later adapted for  Wise Clock 4 ). The little green "appendix" connected t...