Feed on
Posts
Comments

Category Archive for 'Projects'

The PCBs for the AT Mini Matrix Ctrl (new name for the AT Mini LED Matrix) have arrived!

IMG_2953

IMG_2952

After cutting up the PCB by hand, we are ready to build it. There’s a small mistake with middle PCB’s silkscreen being the wrong way round.

IMG_2958 IMG_2959

Soldered an ATmega168 with programming wires on the bottom, the 32KHz crystal, 1K SMD resistors and LED matrix on the top. There’s a small grap between the LED maxtrix and the PCB, thought it would fit right on but the 32KHz crystal must be a little too big.

(more…)

Read Full Post »

When you work in IT, you see all kinds of network cables, some are labelled, some aren’t, some places I can imagine have a mess of cables so I thought how could tracing a cable be easier? I know that cable tracers exist but you have to unplug the network cable in order to trace the cable, how about making an in-line network cable tracer that you can install once and leave it there?


(sneak peak of the outcome)

My first thought was to somehow fit LEDs to existing cables and have a button which would light up the cable but this means that all network cables would need to be replaced so this isn’t suitable. So it’s time to take a look at a network cable and what we can do with it.

eth-2

From Wikipedia, we can look at the wiring scheme where we have 2 pairs of cables used for transmitting and 2 pairs of cables for receiving.

(more…)

Read Full Post »

From Part 6.5, the PIR PCBs arrived and now I’ve got all the PIR sensors (except 1) on them. When I connected up these PCBs to the PIRs I found that randomly they would go off when the alarm server had them switch on. Eventually I found that the modification I made to the broken PIR had to be made to all PIRs.

What I’m looking to do now is to see which sensors are checking in with the server which will also serve as a way to check if the 3V battery for the PIR PCB has gone flat. When the PIRs/Siren are sending their random number to check in, the last byte is 0 or 1 to say if they are a PIR or Siren.

alarmp7-1

By modifying the higher bits of the last byte to say which device it is. For example, 00000101 would mean sensor 1 has checked in.

#define SENSOR_NO 1 // 1 to 6
// Set last data_out number to 0 to indicate to the server that we are a PIR
data_out[20] = (1<<(SENSOR_NO+1));

We define our sensor number which we need to change for each PIR/Siren and then shift 1 to the appropriate place.

data_in[20] = data_in[20] & 0x01;
if (data_in[20] == SIREN_REQUEST) {

For the server we just need to ignore any of the higher bits and check the last digit only (by using & 0x01) and now it all works together just fine.

(more…)

Read Full Post »

Following on from Part 1, we decided to use the ATmega48A instead of using an ATtiny with 2 shift registers and have an example animation working. In this part we’ll look at adding the 32.768KHz crystal, keeping track of the date/time and using PGM to store the LED animations.

atled-1

We plug in our 32.768KHz crystal to the XTAL/TOSC pins but before we start to use the crystal there is a start up sequence and other considerations which we need to follow that’s shown on the ATtiny48A datasheet.

// Enable the 32.768KHz crystal as a RTC
TIMSK2 = 0; // Disable the Timer/Counter2 interrupts by clearing OCIE2x and TOIE2
ASSR = (1<<AS2); // Select clock source by setting AS2 as appropriate
TCNT2 = 0;// Write new values to TCNT2, OCR2x, and TCCR2x
OCR2A = 0;
OCR2B = 0;
TCCR2A = 0;
TCCR2B = (1<<CS22) | (1<<CS21) | (1<<CS20); // 1024 prescaler for 8 seconds overflow on 32.768KHz crystal
//TCCR2B = (1<<CS22) | (1<<CS20); // 128 prescaler for 1 second overflow on 32.768KHz crystal
while ((ASSR & ((1<<TCN2UB) | (1<<OCR2AUB) | (1<<OCR2BUB) | (1<<TCR2AUB) | (1<<TCR2BUB))) != 0); // To switch to asynchronous operation: Wait for TCN2xUB, OCR2xUB, and TCR2xUB ASSR
TIFR2 = 0; // Clear the Timer/Counter2 Interrupt Flags
TIMSK2 |= (1<<TOIE2); // Enable overflow interrupt

// After a Power-up Reset or wake-up from Power-down or Standby mode, the user should be aware of the fact
// that this Oscillator might take as long as one second to stabilize
_delay_ms(1000);

sei(); // Turn on interrupts

We have our start up sequence above which I’ve made from the PDF. We select the clock source with by enabling AS2, reset all the registers and select our prescaler which I’ve chosen to give us the highest overflow of 8 seconds because exact timing isn’t that important to me and means power will be saved too – instead of waking up every second it just wakes up every 8 seconds.

(more…)

Read Full Post »

The ATtiny25 Tiny Temperature Logger v1.0 has now been released.

A25TTL_v1.0_Built A25TTL_Reader_v1.0_Built

I’ve only got enough stock for a couple A25TTL’s so if there is a lot of interest I’ll order some more parts.

IMG_2917

Although since I panelised the PCBs, I had to cut them myself which took much longer than I would have thought but I’ve got lots of PCBs in stock.

You can buy the ATtiny25 Tiny Temperature Logger here.

Read Full Post »

Gameboy Cart Shield released

It’s been nearly 2 years since I last worked on my Gameboy Cartridge Reader (GBCartRead) and I never released a PCB but it has been something I’ve been meaning to do for a while which I can now check off my list.

Gameboy_Cart_Shield_v1.0_Top_Built

I received the PCBs for the Gameboy Cart Shield a few days ago, soldered all the components and noticed that somewhere along the lines I didn’t connect up the VCCs together so I have a bodge wire on the bottom of the board. Something I should have done was make the silkscreen text much larger than what it current is.

Gameboy_Cart_Shield_v1.0_Bottom_Built

The Gameboy Cart Shield PCB is now available for sale.

Read Full Post »

The PIR PCBs have arrived to be used on my alarm system.

IMG_2673

It all fits in nicely, with the nRF24L01 on top of the ATtiny and the 3V battery holder on the bottom.

After testing 4 PIR boards at a time it seemed to work however after a few days of testing there seemed to be a board which would fail to connect. I connected up my logic analyser to a working PIR board and then to the one that wasn’t working after some time and below is the capture after it loads the random data to transmit.

Working PIR
p6.5-1

Not working PIR
p6.5-2

As you can see both request the status by sending 0x07 however the response is 0x2E vs 0x42 (Also notice how it sends us the reply on the same packet that we send the status request).

(more…)

Read Full Post »

IMG_2810

A while ago I picked up a small 20mm 8×8 LED matrix (LEDM88SMR) and have been thinking about making it battery powered to display some animations or text on specific dates such as on new years eve or on a birthday. I’m thinking of placing all the components on the underside of it so it will have more height but to not exceed the 20mmx20mm width/length.

IMG_2813

The first thing is to build the circuit up with the Arduino using 2x 74HC595s and since I’ve worked with LED Matrix’s before, I already have some code I can reuse. Now that it works, I thought I would start designing the PCB (a bit later on it will be re-designed). Download 8x8_LED_Animation for the Arduino.

atmlm-1

What I like to do first is lay out all the components and then draw in draft wires as place holders to make sure there won’t be any overlapping wires. I came up with 3 PCBs (left is bottom board, right is top board) which mount on each other using the Arduino style headers plus 1 more PCB for the battery. This design has an ATtiny25/45/85, 2 shift registers and 1.5K resistors.

(more…)

Read Full Post »

So the Standalone Temperature/Voltage Logger has worked out but I wanted to make a temperature logger more smaller and in doing so, switch back to the two board idea I originally used – one be the logger and the other be the reader.

It appears that most people who have bought the SATVL go with the 512Kbit EEPROM so we’ll provide that EEPROM as the only option and use 2 bytes per reading. In wanting to make everything smaller, it’s time for us to switch to SMD parts.

The most important part is which ATtiny MCU to go with. I was thinking of the ATtiny10, a very small chip but it only has an 8 bit ADC. The next MCU I thought of was the ATtiny13 but I found that the cost of it was more than an ATtiny25, so the ATtiny25 it is.

a25-5
(sneak peek of PCB)
.

Logger Schematic

a25-1

The logger board will be very simplistic, just a 10K thermistor, 10K resistor, 0.1uF capacitor, diode, battery and 4 pin header which breaks out VCC, GND, SDA and SCL. When we want to extract the data, we need to remove the battery and connect the 4 pin header to the reader which directly connects to the EEPROM. The reason the diode is there is so the ATtiny25 doesn’t power up and start re-logging.

(more…)

Read Full Post »

Building a Current Logger – Part 8

I’ve decided to come back to this project after learning how to use the ATtiny’s ADC in differential mode. With the ATtiny44A we can use a gain of 20x for the differential mode and if we used a 1 ohm resistor with a load of 100uA, it would give us reading of 2mV (0.1mV x 20) which means we could remove the op-amp from our circuit.

with-vreg

I also wanted to remove all the level shifters from the circuit and have it all powered by the USB instead of using a battery. There was an example of a V-USB circuit which used a 3.3V low voltage dropout regulator and I was able to get my hands on an LP2950.

saclp8-1

Since we will be running the ATtiny44A at 3.3V it can’t run at 16MHz but it can run at 12MHz and V-USB supports this too (if we didn’t get the ATtiny44 “A” version then 12MHz at 3.3V isn’t supported).

(more…)

Read Full Post »

« Newer Posts - Older Posts »