Building an LCD alarm clock & DS1307 RTC accuracy

I’ve been working on a new Arduino project; the ultimate alarm clock which shows the time and date on a 16×2 LCD module and features multiple alarms with repeat / auto arm and radio function. I used a Tiny DS1307 RTC and EEPROM module which is a breadboard / veroboard compatible PCB containing a DS1307 RTC chip and a 24C32 i2C EEPROM. There is also a place for a DS18B20 thermal sensor but mine did not have this installed.

The clock functions great but I have found that the RTC module gains time about 6 seconds a day. This is due to a number of issues; the quality of the crystal used, the position of it on the PCB, the value of the load capacitors and it’s questionable if the DS1307 is a genuine Maxim chip or not. The module came from Banggood (China) at a cost of only a few pence of the chip itself (in bulk) so who knows.

The DS1307 is not known for it’s accuracy though; the DS3231 is a better choice if you need accuracy as it works with the basic functions of the DS1307 libraries. It just lacks some features such as onboard NVRAM. As I needed to use this NVRAM to store alarm settings etc I had to go with the DS1307 and write some code to halt the Arduino for 6 seconds then write the time back to the DS1307 minus 6 seconds. This should work in theory bringing the accuracy in line with the DS3231 and DS3232 RTC chips.

I have been testing it for a few days and I can now post the rest of the project details.

Continue reading →

Atari Portfolio retro computers

Around 12 years ago I had four Atari Portfolio palmtop computers complete with boxes, manuals and a ton of memory cards plus many accessories. For some really stupid reason I decided that they were a pieces of crap and chucked them (I faintly remember trying to sell them on ebay without success) but not before smashing them up for fun.

Well I came across that website I made all those years ago and thought I’d check what they are worth now. Well two sold for over £300 so I really should have kept them as I could have made about a grand out of them. I’ve been clearing out a lot of ‘junk’ recently and it makes me wonder if I should keep it. Who knows what it will be worth in 10 years time?

That’s probably why people hoard things. But I really should not have destroyed those Atari Portfolios…. Here’s some before and after pictures which were taken on a equally 12 year old crappy digital camera.

Continue reading →

NIMH battery tester – firmware version 2. Now with improved voltage reading accuracy.

In my last post I built a multiple AA battery tester but it used the 5V as a voltage reference which wasn’t ideal and was giving readings that were good but could be better. I modified the code to use the 1.1V internal reference of the Mega328 MCU to calculate the actual 5V supply voltage and this has proved to be much better. Voltages measured by the Arduino are now within 10mV when compared with a calibrated DVM.

As far as the battery tester goes this will produce a more accurate mAh rating and a couple of tests show that battery capacity is now within 100mAh instead of the 250mAh as it was before. These measurements were taken at the load resistors as the battery holders and wiring produced a voltage drop between 30 and 110mV which at 550mA load current is fairly acceptable. If you wish to build this project please refer to my previous post as all the build details are in there. I will also put the latest firmware download on the project post as well.

Issues to resolve – spurious voltages displayed when no battery present. Does not affect operation but will look into resolving this.

Arduino NIMH battery tester update

Back in October I posted about a basic NIMH battery tester based on an Arduino nano I made some time back which was a successful project and works quite well however it could only test one battery at a time and didn’t apply a constant current load. It was good but not very accurate and I really wanted the ability to test more than one battery at once.

So looking around for inspiration I saw this Rechargeable battery tester on instructables by Brian Hobbs which can test three batteries at once and displays the test progress and results on a Nokia 5110 type LCD. However the code has some small drawbacks such as using the 5V supply as the reference voltage which isn’t the most accurate as the ‘5V’ supply varies depending on the PSU used and / or the voltage regulator.

Arduino based AA NIMH battery tester

As for other things it does not apply a constant current load either but it does measure the voltage drop across the load & calculates load current from that so it’s much more accurate than my previous project. So far the project has been built hardware wise and is running the original source code with some slight changes to provide indication of test status on a series of LED’s as well as the LCD so test status can be seen from a glance.

Continue reading →

Arduino scrolling clock and custom message on 5×7 matrix


I’ve been playing around with a red 5×7 dot matrix LED display module which I have had in my spares box for a while. I thought about making some sort of scrolling message display as an Arduino project but could not find any more of these modules online as I’d need at least another seven. However I did have an Arduino Nano, a small case with a scratched lid and a piece of veroboard that just happened to fit the box exactly.

I needed to practice my programming skills and after a few attempts of trying to get the display connections right I was able to make some characters appear on the display. It wasn’t anything useful so following a few examples on the internet I ended up with a scrolling message that was hard coded into the program.

Arduino based scrolling message display
Completed messaging display in ABS case

For this to be of any use I needed to be able to upload messages to it so I wrote some code to store the incoming serial data into a buffer then into an array to be displayed. However I couldn’t get it working right; it took ages to transfer the message and every time you wanted to change the message you had to power it off and on again.

It turned out I’d got some of the curly braces in the wrong positions in one of the ‘for’ loops which was causing the delays. I stuffed it into the case (the scratch was on the part which would be cut out for the display window) and then thought, that’s nice and put it in the cupboard and forgot about it.

Continue reading →

Fake DS18B20 sensors from China sold on Ebay / Amazon?

A while ago I read an article on fake electronic components that are flooding the market with high end audio and hobbyist parts being the biggest targets of the fakers. The article in particular spoke about high end transistors used in power amplifiers blowing or producing nowhere near the gain and / or frequency response expected.

It turned out to be cheap transistors packaged and stamped with a high end part number; sure it worked as a transistor but you wouldn’t want to use it in any equipment as it would likely fail. The popular 2N3055 transistor was also a common transistor made by the fakers which turned out to be a small signal transistor die placed in a TO-3 package. It didn’t say where these were purchased from but clearly they had entered the supply chain from the far east.

Do any search on google for fake ICs and transistors on ebay and you will see what I mean. Even microcontrollers have been faked. Yes there are even fabrication plants that copy genuine parts and mass produce them. These chips often will work OK but do have some problems or do not perform as expected.

Continue reading →

Is it even worth repairing consumer goods nowadays?

30 years ago… Yes. Now not so much. Take for example a repair of a Panasonic DMR-BWT720 blu-ray recorder which I was handed for free as it had failed and had been replaced with a newer model. The fault – freezes / runs slow and fails to record sometimes. If it does record the image breaks up. Simple – it’s just bad reception right? No.

To cut a long story short I noticed a lot of noise coming from the HDD mainly repeated ticking sounds. Now with me being an IT professional I knew this sounded like a failing HDD and I know what a knackered HDD sounds like. I whipped the top cover off and removed the HDD and ran some read only tests on it. The drive failed with ‘too many bad sectors encountered’ error as suspected.

Continue reading →

Sanyo 1970’s LED clock / radio resurrection (well sort of)

In the quest to make something useful out of a load of old junk I’ve found in my cupboards I came across my old clock radio I’ve had since 1978 a while back and decided to do something with it rather than throw it out. It actually worked but it had an ‘accident’ with the floor a few years ago which had broken the casing and cracked the main PCB.

1970’s clock in new casing with Arduino based temperature display on 7 segment LED’s

I have no idea why I just didn’t throw it out then but I had replaced it with a cheapo clock off ebay which projected the time onto the ceiling with some superbright LED’s and mini LCD’s. Quite innovative but that piece of crap lasted a few months before breaking prompting me to replace it yet again. Well the second replacement failed by randomly corrupting the display and resetting itself. Not ideal if you want to set up an alarm that can reliably wake you up. Acctim? Craptim more like.

On one of my earlier posts I made an alarm clock using an 8051 microcontroller but the alarm was unsatisfactory so in order to avoid more cheap Chinese electronics that doesn’t work I decided to make something out of what remained of the 1970’s alarm clock. The clock PCB was functional as was the LED display but it was very dim and had small segments. It also drew a lot of current (nearly 600mA) and the clock IC, TMS1944AN2L got very hot. I had a Fairchild Semiconductor FCS8000 LED module which is also 1970’s vintage salvaged from another clock but I had a datasheet for this which showed that it is a low current, high brightness module. It draws much less current (and has a bigger display) than the old LED display.

Continue reading →

Ebay transistor tester testing

I bought myself one of those cheap transistor testers off ebay based on the Ardutester at which basically is an Arduino project that someone made which the Chinese commercialized and ripped off. It’s actually a great bit of kit but it’s clearly based on an Arduino project that was never intended to be a commercial product.

The Ebay ‘transistor tester’ which does a whole lot more than just test transistors

With the Arduino and good programming and electronics knowledge you can make an end product that rivals a commercial product. Take for example the Ardutester; an open source project that tests electronic components and displays the results on a character LCD. It’s a fantastic project and the designer made all the source code and hardware schematics available for others to make. Seemingly someone in China saw this as a potential to make money, took the source code and improved it then sold it as a commercial product. I’d imagine the creator of the original product would be pissed but I guess there’s nothing you can do about it.

Continue reading →

Playing with an 8051 microcontroller

I’ve been using the Arduino for a while now and made a few projects but at work we use the 8051 as the primary micro for our in house equipment. Yeah it’s outdated but Silicon Labs have taken the original 8051 design and vastly improved it with clock speeds of 100Mhz. It can easily outperform an Arduino and technically is a more capable processor.

However support is limited and its for professional programmers only whereas the Arduino is more for hobbyists. Knowledge of the CPU and in depth knowledge of C is required to get anywhere with this. I decided to buy an Atmel version which is more or less based on the original Intel design but it does run at 24Mhz. It also comes in a DIP package too so is ideal for breadboard and veroboard projects.

I found that development kit and software was expensive unless you used the outdated SDCC compiler or BASCOM. Support was lacking and I struggled to make anything useful with it. Compared to the Arduino with it’s libraries etc you don’t need to know how the AVR chip works and there’s loads of help out there.

Continue reading →

A WIFI spectrum analyzer and Talk-Talk routers suck A$$

A close relative of mine has been having lots of wifi connection issues over the last few months but just on a couple of devices. A scan of the wifi neighborhood showed only a couple of signals from adjacent houses which were too weak to cause a problem.

I tried changing the channels, 150 or 300 bandwidth modes and even tried dropping to 54G compatibility. The problem would be fixed but return a few days later. I tried disabling the wifi adaptor in one of the affected laptops and used a USB adaptor instead. I couldn’t swap the router as this was needed for IPTV (talk talk) and my replacement didn’t support it. Same problem with different adaptors. What was going on? Mobile phones and tablets were fine; just the two Windows 7 / 10 devices refused to work. I needed to scan for interference and here’s where the Arduino came in.

Continue reading →

First useful Arduino project – NIMH battery tester

***Updated*** now version 5 which has a vastly improved display layout and better voltage reading accuracy. Download can be found towards the bottom of this page.

During my clearout of old junk I came across an LCD display fitted into a small plastic case with a PC parallel cable attached which was originally used for a PC status display using LCD smartie. This was used on my old, old, PC (Pentium 4) to display system status messages and music track info from winamp.

As my new PC lacked a parallel port (yeah I could have added one but no PCI slots, just PCI-E) this was relegated to the junk cupboard. So what shall I do with this display and case?

Arduino based NIMH battery tester (image)
Arduino based NIMH battery tester

Well I have a pile of rechargeable AA batteries of various ages and I came across this Arduino based battery tester which looked ideal to test said batteries. Now it just needed a few simple modifications; I added an LED that flashes to get attention when the test is complete and changed some of the screen messages. Simple stuff. After all I was just starting out with the Arduino and I felt this was a great starter project.

Continue reading →