All posts by John

About John

John Swift

lightning detector

Lightning Detector for Arduino

Lightning Detector for Arduino

Hardware required

Arduino
Breadboard
Jumper Wires

Components

2 – 10k Ohms Resistor
1 – 3.3M Ohms Resistor

Price of components = 20npr

lightning detector
lightning detector

Arduino code

#define FASTADC 1

#define FASTADC 1

// defines for setting and clearing register bits
#ifndef cbi
#define cbi(sfr, bit) (_SFR_BYTE(sfr) &= ~_BV(bit))
#endif
#ifndef sbi
#define sbi(sfr, bit) (_SFR_BYTE(sfr) |= _BV(bit))
#endif

int data = 512;
int storage[512];

long batchStarted;
long batchEnded;
int reading;
int count;
int maximum;
int minimum;
bool toSend;

void setup() {
#if FASTADC
// set prescale to 16
sbi(ADCSRA,ADPS2) ;
cbi(ADCSRA,ADPS1) ;
cbi(ADCSRA,ADPS0) ;
#endif
// put your setup code here, to run once:
Serial.begin(115200);
pinMode(A4,INPUT);
Serial.println(micros());

batchStarted=0;
batchEnded=0;
reading=0;
count=0;
maximum=0;
minimum=1023;
toSend=false;
}

void loop() {
// put your main code here, to run repeatedly:
reading = (analogRead(A4));
storage[count]=reading;
if ((!toSend)&&(count!=0)&&((reading>storage[count-1]+10)||(reading>>”);
Serial.println(batchStarted);

for (int i=0;i

Night Lamp

Smart Night Lamp

Smart Night Lamp

Hardware

Arduino
Jumper wires
Breadboard

Components
1 – Bright RGB Cathode LED
1 – Photo Resistor
2 – 220 Ohm Resistors
1 – 330 Ohm Resistor
1 – 10K Ohm Resistor

Price of components is 100npr

Circuit diagram

Night Lamp
Night Lamp

Arduino Code

int photoSensorPin = A0;
int redLedPin = 3;
int greenLedPin = 5;
int blueLedPin = 6;
int redLedVal = 0;
int greenLedVal = 0;
int blueLedVal = 0;
boolean isLedOn = false;

int brightness = 1023;
int darkThreshold = 50;
int changeColorTime = 900000;

long lastUpdate=0;

void setup()
{
randomSeed(analogRead(1));
}

void loop()
{
getBrightness();
if (brightnesslastUpdate+changeColorTime)
{
LedOn();
isLedOn = true;
lastUpdate = millis();
}
}
else {
LedOff();
isLedOn = false;
}

delay(1000);
}

int getBrightness()
{
brightness = analogRead(photoSensorPin);
return brightness;
}

void LedOn()
{
redLedVal = random(1,128);
greenLedVal = random(1,128);
blueLedVal = random(1,128);

analogWrite(redLedPin,redLedVal);
analogWrite(greenLedPin,greenLedVal);
analogWrite(blueLedPin,blueLedVal);
}

void LedOff(){

analogWrite(redLedPin,0);
analogWrite(greenLedPin,0);
analogWrite(blueLedPin,0);
}

Arduino-L.E.D-Police-Lights-circuit

Simple Arduino L.E.D Police Lights

Simple Arduino L.E.D Police Lights

Arduino (or suitable clone)
Breadboard

Components
2x 330ohm resistors
1x Clear Red l.e.d
1x Clear Blue l.e.d

Price of components in Nepal = 24npr

Some Jumper Cables

Code to be uploaded on to the Arduino

// Project 1 – Police Lights by Dave1324

int ledDelay = 50; // delay by 50ms
int redPin = 9;
int bluePin = 11;

void setup() {
pinMode(redPin, OUTPUT);
pinMode(bluePin, OUTPUT);

}

Arduino L.E.D Police Lights circuit
void loop() {

digitalWrite(redPin, HIGH); // turn the red light on
delay(ledDelay); // wait 50 ms

digitalWrite(redPin, LOW); // turn the red light off
delay(ledDelay); // wait 50 ms

digitalWrite(redPin, HIGH); // turn the red light on
delay(ledDelay); // wait 50 ms

digitalWrite(redPin, LOW); // turn the red light off
delay(ledDelay); // wait 50 ms

digitalWrite(redPin, HIGH); // turn the red light on
delay(ledDelay); // wait 50 ms

digitalWrite(redPin, :LOW); // turn the red light off
delay(ledDelay); // wait 50 ms

delay(100); // delay midpoint by 100ms

digitalWrite(bluePin, HIGH); // turn the blue light on
delay(ledDelay); // wait 50 ms

digitalWrite(bluePin, LOW); // turn the blue light off
delay(ledDelay); // wait 50 ms

}

 

Arduino-L.E.D-Police-Lights-circuit
Arduino-L.E.D-Police-Lights-circuit
Arduino-Based-Shadow-Alarm-Schematic

Arduino-Based Shadow Alarm

Arduino-Based Shadow Alarm

Arduino-Based-Shadow-Alarm-Schematic
Arduino-Based-Shadow-Alarm-Schematic

Shadow alarms are usually used for protection against theft. A shadow alarm is a device that sounds an alarm when a shadow falls on it.Described here is a simple circuit of an arduino based shadow alarm.This compact shadow alarm unit is capable of sensing a moving shadow in a restricted area, and can be easily installed on wall, window or door to protect your valuables from theft.Constant lighting is required in the confined area to detect the moving shadow.

Components

T1, T2 – BC547
D1,D2 – 1N4007
LED – 5mm light emitting diode
R1,R4 – 1k resistor
R2,R3 – 470 ohm resistor
VR1 – 4.7k preset
LDR – Light dependent resistor
C1 – 470uf, 25v electrolytic capacitor
C2 – 100uf, 16v electrolytic capacitor
CON1 – 7 pin male header
CON2 – 1 pin male header

Price from us for above = 150npr

Batt.1 – 9v battery
Arduino Uno
Wires

Programming

1) Connect arduino to your PC

2) Input this source code:

//shadow alarm by Jovian D’souza
int sensPin = 2; // Sensor Input Pin
int ledPin = 8; // Reminder LED Output Pin
int pzSpeaker = 10; // Piezo-speaker Output Pin
int val =0; // variable for reading the Input Pin status

void setup() {
pinMode(sensPin, INPUT); // set shadow sensor as input
pinMode(ledPin, OUTPUT); // set LED as Output
pinMode(pzSpeaker, OUTPUT); // Set Piezo-speaker as Output
}
void loop() {
val = digitalRead(sensPin); // read input value
if (val == HIGH) { // check if the input is HIGH
digitalWrite(ledPin, HIGH); // Turn LED ON
playTone(500, 600);
delay(100);
playTone(500, 800);
delay(100);
}
else {
playTone(0, 0);
delay(300);
}
}
// duration in milli seconds , frequency in hertz
void playTone (long duration, int freq) {
duration *= 1000;
int period = (1.0 / freq) * 1000000;
long elapsed_time = 0;
while (elapsed_time < duration) {
digitalWrite(pzSpeaker, HIGH);
delayMicroseconds(period / 2);
digitalWrite(pzSpeaker, LOW);
delayMicroseconds(period / 2);
elapsed_time += (period);
}
}

 

3) Click on upload

Step 5: Connections to and from Arduino and board

1) Connect the 1st pin of the shadow alarm circuit to Vin of the arduino.
2) Connect the 2nd pin of the shadow alarm circuit to pin 10 of the arduino.
3) Connect the 3rd pin of the shadow alarm circuit to the LDR and other pin of LDR to Gnd.
4) Connect the 4th pin of the shadow alarm circuit to 5v of the arduino.
5) Connect the 5th pin of the shadow alarm circuit to pin 8 of the arduino.
6) Connect the 6th pin of the shadow alarm circuit to pin 2 of the arduino.
7) Connect the 7th pin of the shadow alarm circuit to Gnd of the arduino.

Nigels Computer Repairs

Nigels Computer Repairs, Scarborough
Nigels Computer Repairs, Scarborough

Nigel’s Computer Repairs in Dean Road in Scarborough is built on 20 years experience, covering computers, laptops and electronics to ensure a quality service all the time.

All laptop and PC desktop repairs are carried out on-site and are never sent away.

Laptops have all sorts of problems occurring and reoccurring, with some easy fixes and some that are not, and the more complex of main-board faults, taking the Southbridge Chip-sets and video faults for example. Infra-red methods are used for possible repair, as mentioned in more detail on the XBOX and PS3 repair heading, under the home page section. The thing with laptops as they are small, compared to there predecessors the tower, they have to dissipate heat more efficiently with not a lot of breathing space. using these on your lap or on top of a bed is not a good idea, if used this way 24/7. as fans underneath wont work correctly.

For longevity always use on a flat surface and avoid the above, which most of us won’t. So if you are experiencing lockups (hanging) etc, maybe it needs servicing. So when is a laptop running to hot?, generally what would be experienced is erratic behaviour, system lock ups or restarts, this is due to the core temperatures of the processor or video card getting to hot, if the heat is not shunted away the system becomes thermally unstable and lockups etc occur, or odd behaviour happens, Until damage to the processor could result. if the fans are clear and working, and still locking and feeling hot, with age the heat-sink compound can start to perish, this results in the system running hotter than usual, which can be okay on certain laptops, so long as its within its limits, different systems vary, to what they can handle, different manufacturing methods is also an added factor.

The best solution is always to keep your system as cool as possible. As laptops have progressed and do suffer from this heat problem, devices such as cooler stands are available to purchase, where the laptop sits on these fan assisted devices, in the form of a flat tray, which is powered from the laptops usb port, in order to keep it cool. Screens and inverters are also repaired/replaced dc socket repairs etc.

A Thermal rework station, and a new infra-red bga (ball grid array) rework station, this equipment is the beast that can rework 500 pins under a chip. This is some of the in house inventory to get them repairable laptops repaired.

Laptop repairs and computer repairs, virus arrests and removals. Computer upgrades. Xbox and Ps3 laser repairs, and the rrod and ylod console errors

Telephone 01723 353900

LED LABS Electronic Workbench Kit

The Led labs product is an electronic workbench for students and hobbyists. It is designed with you in mind.

Micro-controllers such as the arduino or pic can be used with this board, and has on board facilities to aid in program design etc. It is design around 5v USB suppy.

It can also be used as an output board for the raspberry pi or other devices.

The demonstration video below shows, a programmed pic controlling a stepper motor and a led light display…

As the demonstration shows, Led Labs like dealing with the bits and the bytes and 4 bit nibbles which is fundamental to underpinning knowledge in Micros., and the port/pins outputs of the micro just hook up with jump wires as resistors drivers etc are on board. Led Labs includes circuit diagrams and instructions for each of the modules which could also aid in building a working version of your own prototype or experiment based around your code..

Design, manufactured and supplied by Nigel Marsey of Nigel’s Computers, Scarborough.