Feed on
Posts
Comments

From our previous post, we made our remote control and looked at making some improvements however we ended up going back to how sensors communicated to the server before. This time we’re building our prototype PCBs and get to test them all out.


(sneak peak of our PCBs working together)
.

Server PCB

IMG_3447  IMG_3449

I wanted the server to have a battery backup along with a siren so I took a 15V power adapter and wanted to have some LEDs to display which sensors have checked in with some shift registers to make things easy and now we can have up to 16 sensors. There is also a green LED and red LED used for communication pass or fail, I should of put another LED to shown when the alarm is on. After about a minute or so, the sensor LEDs are reset.

I used the LM317 to reduce the voltage down to 13.5V which is the floating charge voltage for a 12V SLA, the 15V input barely cuts it for 13.5V and doesn’t provide too much current, about 50mA or so. In the end it does run a bit hot so I put in a metal piece on it I had lying around which works good enough. We’ve got a LDO to provide 3.3V to the ATmega328 and nRF24L01+ module, it too runs a bit hot, should have given it more copper. I ended up tearing the pads for the capacitor which is why it’s bodged in there like it is.

(more…)

Read Full Post »

Today we’ll be taking a quick look at the Netcomm NB6 Rev2 ADSL2+ Modem Router which has a date code of 2010/28th week. It’s an entry level modem/router which can also connect via USB which is how ADSL modems used to connect back in the day.

IMG_3431 IMG_3432

The usual 4 screws later and we’re in.

IMG_3435_1 IMG_3436

There are 4 additional screws holding the board down however they are positioned right on the outside of the board which could mean they didn’t have much space on the board. All electrolytic capacitors on board are branded Lelon.

(more…)

Read Full Post »

From our last part we looked at testing the idea with the EPM240 board, in this part we’ll switch over to the EPM3064 CPLD to move away from the development board.

IMG_3407

The Altera EPM3064ALC44-10N is a low cost 100MHz CPLD for $3 in a PLCC 44pin package with 64 LEs and 34 usable pins. The oscillator I’m using is 50MHz which I pulled from another board and all we need is to connect it to VCC, pull it’s enable pin high and that’s it. I was curious about how much current it consumed, it was about 13-15mA.

cpld2-2

We can connect our USB Blaster to our CPLD by connecting up the 4 wires, TCK to TCK, TDI to TDI, TDO to TDO and TMS to TMS; as you can see you don’t connect them together like you do for the MISO of one device the MOSI of the other.

(more…)

Read Full Post »

From our last post, we connected 4 hard drives with SATA to USB controllers to our Raspberry Pi with an LCD and were able to assemble our RAID5 array. Now we’ll be looking into putting it together into the Netgear ReadyNAS enclosure, powering on/off with a relay, temperature monitoring, backup/activity LEDs, and so on.


(sneak peak of the NAS4Pi built)

Relay for power switch, RPi power off and temperature monitoring of mosfets

rpi2-1

To be able to switch on and off the NAS4Pi, I’ve hooked up a relay which is using ATtiny25 that switches on the SMPS. The only issue is that we need to give the relay 5V at 80mA, so I’ve just put on a LM7805 with a heatsink to power the ATtiny and relay and it’s temperature hovers around 50C or so. One thing I didn’t notice with relays initially was that you should have a diode connected up to the coil because otherwise when you switch off the relay you’ll have some backEMF.

When we’d like to switch off the RPi, we shouldn’t just switch the power off at any time instead we’ll use a power off line which when it goes high will tell the RPi to shutdown and we will wait about half a minute for it to shutdown before switching the relay off.

(more…)

Read Full Post »

From our previous post, we took on the task to build our own alarm system and have the PIR, door sensor and some of the server code built. In this part we’ll add the remote and look at some attempted improvements.

https://www.youtube.com/watch?v=MYtkCsHhZ0Y
(sneak peak of remote, PIR,  siren and server all working together)

For the remote control, all that’s required is two buttons for alarm on and off plus an LED to show when the button is pressed.

// Increment our 256bit random number
...

// Generate the random block (160 bit) using SHA1 from our random number
sha1(data_out, random_number, 256);

// Set data_out to say we are a remote control
data_out[SENSOR_TYPE] = REMOTE_CONTROL;
data_out[REMOTE_REQUEST] = REMOTE_ROLLING_CODE;

// Check in the with server
if (check_in()) {
	...
	// On or off?
	data_out[SENSOR_TYPE] = REMOTE_CONTROL;
	data_out[REMOTE_REQUEST] = system_state;

	// Generate the new rc code to use and generate the SHA1 block (160 bit) from our rc code
	rc_code_init(rc_code_addition);
	sha1(data_out, rc_code, 128); // SHA1 of our rolling code

	// Transmit a few times to ensure the server gets it
	...
}

We can use the same PIR code to send a random SHA1 block, receive the rolling code addition which will be 32bit this time to cover switching the on/off alarm a lot of times and then we’ll quickly send the rolling code a few times.

(more…)

Read Full Post »

Today we’ll be taking a quick look at the Starnet 8 Port 10/100Mbps Ethernet Switch (SH-9008P) which has a date code of 2003/40th week.

IMG_3377 IMG_3379IMG_3380

4 screws later and we’re in.

IMG_3383 IMG_3382

Not a whole lot to see as we’d expect, there is a TD34063 which is a variant of the MC34063 SMPS. Other than that, we do have lots very noticeable of via stitching.

(more…)

Read Full Post »

After seeing a few solar garden lights as a quick project I decided to make my own version using the ATtiny13A so it can be low cost but have decent functionality. I didn’t an RGB LED so I went with red, green and yellow LEDs and in terms of the solar panel I have a 4V 50mA one.


(sneak peak of the end result)

My first initial thought was to use a Lipoly battery to power everything, use a diode with the solar panel to recharge the battery with an LDO to 3.7-3.9V if needed. My main concern is leaving the Lipoly outside and it heating up quite a lot so I’ve decided to go with AA batteries.

solarled1

After a few iterations of the design, I went with 3x AA batteries to be recharged and the charging will be switched on using a PNP transistor, I’m going for 1.4V per AA battery. Originally I wanted to go with a N or P mosfet however since the Vds would be less than 1V so it wouldn’t be able to switch on. One unintended feature of the PNP design in this case is that it’ll automatically charge up the 3x AA batteries if they are 0.6V lower than the solar panel.

(more…)

Read Full Post »

As part of my CPLD Logic Analyser project, I might want to easily adjust the clock and since the CPLD that I’m using doesn’t have a PLL module, we’ll have to buy our own clock generator.

clkgen1

The Cypress CY22150 chip allows you to generate a clock up to 200MHz from a 8-30 MHz crystal using I2C and has multiple outputs / clock dividers. For the price of $2.77 it’s not too bad and for me was actually cheaper than buying a 100MHz crystal from my supplier.

There are a few settings we need to configure – the crystal frequency, crystal capacitors, which outputs to enable and clock multipliers and dividers. This may seem a bit complex at first but Cypress have made a CyberClocks program that can assist us with these settings.

clkgen2

I have a 16MHz crystal, so we enter that on the top left. The VCO is given to us in another section of this program (Option > VCO Calculator) as shown below, I enter in the Reference as the crystal and desired clock as 133MHz.

(more…)

Read Full Post »

The ATtiny Programmer Adapter has now been updated to v1.4.

ATtiny_Programmer_Adapter_v1.4_Built

The main feature is that you can now add some male headers and convert it into an Arduino shield so you can program your ATtiny with your Arduino if you don’t have a dedicated programmer.

I’ve added another LED for the MISO so if this LED lights it means that your ATtiny is able to communicate with your programmer. Another small improvement was to move the 6 and 10 pin headers a bit more apart so that you can fit in IDC socket connectors.

Read Full Post »

It’s retro teardown time, today we’ll be taking a look at a game called Galaxian 2 made by Futuretronics which was build in 1981 so we’ve had this around for a long time. You can either play single player or with someone who controls the alien ships.

IMG_3348 IMG_3349

We used to have a joystick mounted for easier control on the single player controls. For anyone who owns one of these games you might notice a potentiometer near the second player’s controls, this was a modification that one of my relatives made to it to increase or decrease the game speed; and I always thought it that this game had that feature by default! It takes 4x C batteries, has a DC jack too and of course is missing it’s battery cover.

https://www.youtube.com/watch?v=qJyfhD36BIA

Here’s a video of me playing the game and listening to the game over music.

(more…)

Read Full Post »

« Newer Posts - Older Posts »