Feed on

As part of the Mini Temp Logger design I need to look at a better way of keeping time other than using the watchdog timer as it’s fairly inaccurate. I stumbled across the Microchip MCP7940M Real-time clock controllable by I2C, you can set alarms, a clock output (likely what I might use for my project), ability to trim the oscillator in 1PPM increments (129PPM -/+ range), low power consumption at 1.2uA and the price was $1.

Choosing capacitors

This RTC recommends the use of 6-9 pF 32.768KHz crystals, the most common/cheap ones are 12.5pF and it still does work with them but it won’t be as accurate as the 6-9pF ones (and for me it sometimes stopped working), it took me a while to realise this as I was reading the preliminary datasheet for a while.


The first thing we need to do is calculate the capacitors we’ll require for our crystal, there is a standard formula which we follow for this, Cstray is usually between 2-5pF so lets assume ours will be half way at 3.5pF. I went with a low cost (at the time) EuroQuartz MH32768L crystal that has a CL of 6pF. The best match for our formula is 6pF for CX1 and CX2: (6 pF * 6 pF)/(6 pF + 6 pF) + 3.5 pF = 6.5pF which is close to our CL of 6 but you may have to vary the capacitors depending on your testing.


IMG_1255_1 rtc7

I built a simple PCB for the RTC (doesn’t look the best as I built it about 6 months ago when I didn’t use to sand the PCB) but there isn’t much to it. We just need a crystal with 2 caps, a cap for the chip and then just I2C resistor pull ups. Let’s interface with it, I’ll start off using the Arduino and we’ll move to an ATmega328 later on.


Read Full Post »

Today we’ll be taking a look at a Vyatta/linux based modern router, the Ubiquiti EdgeRouter Lite which is a WAN router with 3x 10/100/1000 configurable network ports and a console port. It has a webpage for management but most of the configuration happens using the console / SSH so not something that home users would use. This particular unit has a “squash fs” problem near the end of the boot (it still boots ok) and also when trying to save the configuration which isn’t the first time it’s happened with these older model EdgeRouters, the errors could be coming from the USB or flash memory.

IMG_4147 IMG_4148IMG_4149IMG_4150

A few screws later and we’re in and there were no tamper protection seals.

IMG_4151 IMG_4156

We’ve got a main processor, 4 Gigabits of RAM, 32Mbit of flash, a 4GB USB dongle (split into 142MB FAT / 1.63GB unknown partition, the rest free space) and separate PHYs/transformers for each network port, it must have been more cost efficient to have 3x PHYs that use a processor that had them all built in. The line up of capacitors near the center looks neat and there’s a 7×2 pin header near the bottom left unpopulated. There are 2x Alpha & Omega Z1212AI, 2x uP1713P and 1x EL-EK22 DC-DC converters. PCB date code is 4th week of 2013.


On the bottom side, they’ve left the copper exposed underneath the processor which joins up with the heatsink they have on the bottom and is screwed in place, that’s a nice solution.


Read Full Post »

I recently got into the quadcopter hobby and purchased a UDI U818A mini quadcopter from Ebay which is fun to fly and have been experimenting changing the battery packs and adding FPV. I’ve been thinking about going to a larger quadcopter but before I do, I’d like to plan around with making my own micro quadcopter and experimenting with the software.


After purchasing 4 micro motors (Hubsan X4 H107), a set of propellers to suit, a MPU6050 3 axis accelerometer and gyro, I was ready to start building.


The first part was to build a frame, using my CNC I built one from acrylic just big enough to fit all 4 motors with propellers without touching each other, a bit of blu-tac later and they are semi-secured in place, good enough for testing. One big downside is that acrylic is heavy compared to most other materials.

Testing the 4 motors all at once at different voltages gave me the following current draw results – 1.7v @ 780ma, 2.5v @ 1.2A, 3v @ 1.5A, 3.5v @ 1.9A, 4v @ 2.2A but I expect that it could be double or triple that due to the wires I was using so each one might draw 1-1.5 amps each.



Read Full Post »

Today we’ll be taking a quick look at the Solar Charge Controller CMTP02 which is rated for 10A and used to recharge your 12V or 24V battery and power your load; they say that your solar panels / batteries should be matched, this was given to me and I believe it’s damaged.

IMG_4102 IMG_4103

A few seconds later and we’re in.


We’ve got all analog components, a fuse and 3 transistors or mosfets with no part number labeling and the back plate acts as a heatsink for them. The first 2 are connected together and configured to recharge the battery and the last one is used to switch the load. This solar charger (might) use PWM to charge the battery which means the solar panels voltage would directly be applied to the battery for a certain amount of time, it would probably be more efficient than using a DC-DC or transistor to step it down but not the best if something does go wrong. PCB date code is July 2009 to March 2014.


There’s a Ti CD40106B Hex Schmitt Trigger which is likely being used as an oscillator for the PWM and Ti LM324 op-amp with lots of resistors around it which would be used to control the transistors/mosfets and LEDs. Apart from that there isn’t much else.

Read Full Post »

It’s been a few years since I’ve updated the hardware/software for Standalone Temperature/Voltage Logger but my recent Mini Temp Logger (MTL) project has made me think about improvements that I could also put back into the SATVL so there’s just a few quick things worth mentioning for the v1.3 update.


There has been a small hardware change, the 2 diodes have been removed which now allows for up to ~28V input voltage logging and the automatic voltage switcher has also been updated like I designed in the MTL, the PCB’s size was reduced slightly too. The reason for the 2 diodes was to protect against high input voltages because I believed that if we exceeded the 1.1V ADC reference voltage that the ATtiny would be damaged.


However after careful reading of the datasheet it turns out that all that would happen is it would read close to max value of 1023 so all is good.


Read Full Post »

A while ago I bought ten 8×8 LED matrix from Ebay for about $7 and was thinking what I could do with them. Initially I was going to hook them up in a 3×3 arrangement but thought I could a better use if I connected them all together in a row to display text and potentially I could make this all wireless. Also I could use this to display the time as 10 LED matrices are just enough to fit the time, e.g, 12:34:00PM.

I milled out a quick board to mount the LED matrix, 595 shift register, connected it to an ATtiny84 and got it to a working point. It wasn’t really worth my time to mill out 9 more so a few weeks later the PCBs arrive and I start putting everything together.


On the PCB there were some headers which would connect each matrix to each other but what I didn’t realise is that connecting the boards together was a very long process as I had to individually wire each header to each other, a few hours later and it’s done. If I were to re-do this project I would have laid out the PCBs better so they could just connect to each other without wires.


Read Full Post »

Today we’ll be taking a look at the Optus Huawei E960 3G Wireless Gateway (user guide) which is a 3G 802.11b/g hot spot with 4x 10/100 network ports, RJ45 port for connecting your phone and a USB port for power / ability to act as a modem on your PC.

IMG_4089 IMG_4090 IMG_4091

4 screws later and we’re in, the top just pops right off without any effort.

IMG_4092 IMG_4094
IMG_4095 IMG_4096

We’ve got a 2 board construction with a 16 pin interconnect and lots of shielding for each major component. There’s 3 antennas mounted on a plastic base which are screwed in place, I guess the reasoning could be that they are easily replaceable to suit the frequency band that’s needed. PCB date code is 36th week of 2007.


Read Full Post »

I’ve been looking to upgrade the way that I have been sending SMS’s which is through a Nokia phone using F-Bus and came across the SIM900A module. If you can spare the cash, I would recommend it over Nokia F-bus as it’s easier to use.

IMG_4081 IMG_4082

It’s a relatively cheap module for $20 on Ebay but you need to check that the SIM900A works in your country before buying it. By using AT commands, we can send and receive SMS quite easily and I was going to cover this but there are already tutorials around that cover it quite well.

So instead I’ll be explaining how we can use the SIM900A’s GPRS to fetch a file from a webpage and print it out so we can process the data. Potentially you could use this instead of waiting to receive an SMS, for greater data transfer rates vs price per SMS or better yet for control of a device such as a remote control car/quadcopter as long as you have mobile reception.

SIM900A Hardware

The one I bought is the “SIM900A Mini V3.0.2, 2014.10″ which comes with an external antenna. The PCB has a MAX232 on board if you wish to hook it up to your computer directly.


Read Full Post »

Today we’ll be taking a look at the D-Link Wireless N300 ADSL2+ Modem Router (DSL-2750B), an ADSL2+ wireless N router with 4x 10/100 network ports, a USB port for device/printer sharing and dual antennas.

IMG_4071 IMG_4073IMG_4072

4 screws later and we’re in.

IMG_4075 IMG_4077

We’ve got quite a few 25V 1000uF caps but they are CapXon branded ones and 2x Lelon 10V 470uF caps too. The antennas are soldered directly to the PCB and glued down, one of them has an RF choke and they’ve skipped the shielded can on the Wifi chip.


There is a header near an inductor which could be a serial header and instead of placing a thermal pad or paste on the main chip they’ve just placed glue and the heatsink on top, eh I guess they wanted to save cost.


Read Full Post »

I’ve been playing around with the idea of rebuilding the temperature loggers I’ve done in the past (SATVL / A25TTL); both have their advantages and disadvantages. I’m looking at going a little bit larger than the A25TTL so it would have a proper SMD battery holder, combine the logger and reader into one again like the SATVL and look at having an option to use the TMP102 temperature sensor (0.5C accuracy), upgrading the EEPROM to 1Mbit and possibly look into adding a RTC later on.

Recombining the logger and reader into one means the ATtiny13/25 that I’m using won’t do the job so an ATtiny44/84 or ATtiny841 should have enough pins however if we do go with the TMP102 its supply voltage is 1.4 to 3.6V which means we’ll need to use an 3.3V LDO or similar when connecting up to the USB. With 3.3V to the MCU we’re limited to a 12 MHz which is just enough to run V-USB.


I did a quick mock up of how the PCB could look like (29×15.5mm). To keep the PCB as small as possible, I’ll be using all SMD parts and going with a SOT23 LDO (Ritek RT9166) and a small 12MHz crystal (3.2 x 2.5mm). The MCU will still be using the watchdog timer (for the time being) when it’s doing the delay time so the accuracy is still going to be around 10% -/+. I’ll have the battery holder on the back like the SATVL does and the TMP102 (which is smaller than I expected) on the bottom right without the ground plane near it to reduce any effect it might have on the temperature reading.


Read Full Post »

Older Posts »