MOV AX, BLOG

Electronics, Photography, Gadgets

Tag: science project

First Project Using The PICAXE-08 Proto Board Kit

After building the first prototype of our timer device and then making preparations to use the PICAXE 08M and save space by using a single NPN transistor as a NOT gate, we have finally completed our project using the PICAXE-08 Proto Board Kit. As usual, I purchased the Proto Board and PICAXE chips from those reliable folks at techsupplies in the U.K. For around 5 Euros, the  PICAXE-08 Proto Board Kit with a PICAXE-08M microcontroller is a real bargain. It has almost everything you need to get going – the only extras you will require are a USB cable for programming the PICAXE and a battery box for holding 3 AA batteries to supply the circuit with 4.5v. I found the size of the prototyping area on the board to be ample for simple projects. Please note that the kit comes in component form, shown in the picture below, and has to be assembled using a soldering iron and a little bit of time – it is not complicated.

PICAXE-08 Proto Board kit

Moving the timer to the PICAXE-08M from the PICAXE-20M prototype was relatively straight forward. The new circuit uses pins 0, 1 and 2 to power the “minute/seconds LEDs” while pin 3, which is an input pin only, is used to select the device’s function (eggs or teeth) and pin 4 is used to power the piezo buzzer. On the prototyping area I placed the resistors to drive the LEDs and a voltage regulator to power the circuit from a 9v battery. In our circuit pin 3 is also pulled down to 0v using a 10k resistor. Below is the code for the device.

symbol counter = b0
symbol teeth = b1
symbol eggs = b2
symbol loopCounter = b3
init:
pause 200
loopCounter = 0
if pin3 = 1 then
teeth = 1
eggs = 0
else
eggs = 1
teeth = 0
endif
start:
for counter = 1 to 60
low 0
pause 500
high 0
pause 500
next
for counter = 1 to 60
low 1
pause 500
high 1
pause 500
next
for counter = 1 to 60
low 2
pause 500
high 2
if counter > 55 and teeth = 1 then
high 4
elseif counter > 55 and eggs = 1 and loopCounter = 1 then
high 4
endif
pause 500
low 4
next
if eggs = 1 and loopCounter = 0 then
loopCounter = 1
goto start
endif
end:
high 4
pause 1000
low 4

Luckily, as mentioned previously, we had prepared to save space in the enclosure – which is good because the space available turned out to be even smaller than I thought. The wiring to the LEDs and switches added quite a bit of bulk and as a result the whole circuit plus battery only just squeezes in. The image below helps to illustrate just how much bulk the wiring added to the internals of the device.

Unexpected Added Bulk Through Wiring

After many hours of work, the device is now completed and we used it tonight to time the brushing of our teeth. Tomorrow morning, we’ll use it for the first time to time our soft boiled eggs ;-).

The Completed Eggs-Teeth Timer

Alarm Project 2.0 Beta

Our second version of the alarm project is now in beta! All we have to do now is update our design in circuit simulator, do a tiny bit of debugging and move it all over to perforated board. Over the next few weeks, there will be a series of posts describing how each module of the alarm circuit works. This design consists of 5 J-K Flip-Flops, 8 AND gates, 2 OR gates, 4 NOT gates, 1 NPN transistor, 3 555 timers, a darlington driver, a 5v relay, a 5v voltage regulator, 12 diodes, 7 LEDs, a magnet switch, a speaker, a piezo buzzer, a numeric keypad, various resistors and capacitors and lots of single core wire and time.

Alarm 2.0 Beta

Ohm’s Law

This video from Make Magazine is a great introduction to ohm’s law and a good way of bringing some of the science behind electrical circuits to kids and adults alike.

[youtube=http://www.youtube.com/watch?v=-mHLvtGjum4]

Our First Alarm Project

The project my son decided we should work on is an alarm system for his room. The first alarm we built is based on the lessons that we learnt using the conrad starter kit. It is based on the same components – a 9v battery, resistors, LEDs and an NPN transistor. The circuit can be seen in the image below.

Simple Alarm Circuit

The only components I added are a piezo buzzer, marked as buzzer in the circuit diagram, which you can buy for about 1 euro at most electronics retailers, and two switches marked as on/off and door in the diagram. For the on/off switch we used a lock switch which mean that the alarm can only be turned on or off with a key. For the door switch we used two power strips with multi.core wire stuck to them and then covered in aluminum foil – when the door opens, the contact is broken and the alarm is activated. The description for the circuit is below – give it a try! Please note that in the diagram I used an LED symbol as Circuit Simulator doesn’t have a buzzer component. The code for the circuit is listed below. Just copy and import the code into the free Java Circuit Simulator to get a feeling for the circuit.

$ 1 5.0E-6 10.20027730826997 50 5.0 50
v 368 368 368 272 0 0 40.0 9.0 0.0 0.0 0.5
r 368 272 368 208 0 330.0
162 512 208 512 288 1 2.1024259 0.0 1.0 0.0
s 368 208 512 208 0 0 false
w 512 208 608 208 0
162 608 288 608 368 1 2.1024259 1.0 0.0 0.0
w 608 448 512 448 0
w 512 448 368 448 0
w 368 448 368 368 0
s 512 288 512 448 0 1 false
w 608 208 688 208 0
w 688 208 768 208 0
t 688 288 768 288 0 1 -1.0853467247068087 0.6355071463035651 100.0
w 768 208 768 272 0
162 768 304 768 368 1 2.1024259 1.0 0.0 0.0
w 768 368 768 448 0
w 768 448 608 448 0
w 608 288 608 208 0
162 608 368 608 448 1 2.1024259 1.0 0.0 0.0
r 608 288 688 288 0 10000.0
x 413 237 469 241 0 18 on/off
x 788 347 847 351 0 18 buzzer
x 452 378 492 382 0 18 door

Electronics For Beginners

A new hobby that my son and I have taken up is Electronics. Not only is the topic interesting, but it is also educational for kids. The place that we started was with this starter kit from Conrad in Germany, but most electronics retailers such as Maplin Electronics in the U.K. and Maker Shed in the U.S. will have similar kits. The kit consists of assorted resistors, a 45uF capacitor, two NPN transistors and, fourLEDs, a small Bread Board, a length of single core wire and a battery connector. You’ll be amazed how much you can learn from a kit like this! In the picture below, you can see one of the circuits that we built using our first little kit – two NPN transistors connected to a 45uF capacitor and a few resistors that makes an LED flash on and off!

Blinking LED

© 2017 MOV AX, BLOG

Theme by Anders NorenUp ↑