Received two 2.7" EPaper displays and an adaptor for pervasive displays.
These are Embedded Artists products and so far tests with an Arduino Uno are promising.
Saturday, August 10, 2013
Friday, August 9, 2013
PIR Sensor IO
Datalogging the output from a PIR sensor. The output of the PIR is connected to an Arduino digital input. The PIR output is digital with no PWM for distance. On or Off is as good as it gets.
A separate +12V supply is connected to the PIR as the +5V from the Arduino is not enough for the PIR output to be stable.
A separate +12V supply is connected to the PIR as the +5V from the Arduino is not enough for the PIR output to be stable.
PIR hooked into an Arduino via a Protoshield |
Labels:
arduino,
digital,
diy,
electronics,
excel,
hack,
input,
MEGA328P,
PIR,
programming,
prototype,
sensor,
TQFP32,
usb
Tuesday, August 6, 2013
From Midday till Dusk
Light readings taken with the stormTrigger circuit from mid-day until dusk in Songkhla - Thailand.
The graph shows interval (x-axis) and A/D output (y-axis). Readings were taken at 400mS intervals.
Next step is to correlate the readings with actual light level measurements.
Next step is to correlate the readings with actual light level measurements.
Labels:
a/d,
arduino,
diy,
electronics,
excel,
hack,
input,
lightning,
photograph,
programming,
prototype,
sensor,
TQFP32,
trigger
Saturday, August 3, 2013
stormTrigger and 7D
Some video showing tests with 7D. Light was provided by a Canon 430EXII flash.
Labels:
arduino,
automatic,
canon,
diy,
electronics,
hack,
lightning,
MEGA328P,
photograph,
programming,
prototype,
sensor,
TQFP32,
trigger
Friday, August 2, 2013
soundTrigger first shots
With soundTrigger set to activate the camera at 50 A/D counts above ambient, I got some shots of my lighter striking. They came out not too bad.
Labels:
arduino,
canon,
electret,
electronics,
hack,
hotshoe,
microphone,
photograph,
programming,
prototype,
sensor,
sound,
TQFP32,
trigger
From breadboard to protoshield
Tests on both the light and sound circuits on breadboard were promising. They tests did show a great deal of false triggering and I believe this was due to the bad connection nature of breadboards.
I took both circuits and layed them out on protoboard. This allows direct connection to the Arduino.
Tests so far are very promising.
I took both circuits and layed them out on protoboard. This allows direct connection to the Arduino.
Tests so far are very promising.
soundTrigger circuit with microphone in the background |
stormTrigger V3 layed out and working well |
Labels:
arduino,
bootloader,
canon,
coincell,
diy,
electronics,
enclosure,
hack,
hotshoe,
lightning,
MEGA328P,
n3,
nature,
photograph,
programming,
prototype,
sensor,
TQFP32,
trigger,
usb
Wednesday, July 31, 2013
Ultrasonic distance measurement
LV-MaxSonar-EZ1, PWM output connected |
PWM output, 9.8ms @ 2 meters |
Data captured varying distance between 2 meters and 10cm |
Labels:
arduino,
diy,
electronics,
excel,
hack,
maxbotix,
MEGA328P,
oscilloscope,
programming,
prototype,
sensor,
TQFP32,
ultrasonic
Tuesday, July 30, 2013
soundTrigger rising
Playing with an electret microphone and a simple circuit.
A Mega328 samples the noise generated by the circuit and triggers a camera on the output via an opto-isolator.
Performance looks promising. Measuring a triggering delay of 35uS (microseconds).
Arduino sketch to follow...
A Mega328 samples the noise generated by the circuit and triggers a camera on the output via an opto-isolator.
Schematic in Eagle |
Bread boarded Prototype |
Measuring I/O performance |
Arduino sketch to follow...
Labels:
arduino,
automatic,
bootloader,
canon,
coincell,
diy,
electronics,
enclosure,
MEGA328P,
n3,
nature,
photograph,
programming,
prototype,
sensor,
TQFP32,
trigger
Monday, July 29, 2013
New light detector circuit
Prototyping the new light circuit on breadboard. Everything is working well so far.
Output in dim light is about 0.13V going up to just over 1V with an inspection lamp close to the transistor.
This circuit will form the second PCB in a two stack design. Interconnects will be via pin headers (0.1") and power will be from a CR2032 3V coin cell battery.
The prototype PCB will be mostly SMD tech with the photo transistor and pin headers being through-hole.
Bit of code that just works...
/*
StormTrigger V3 30-07-2013
*/
#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
#define LIGHT 0
#define OUT_FOCUS 2
#define OUT_SHUTTER 3
#define LED 13
int trigVal = 0;
void setup() {
#if FASTADC
// set prescale to 16
sbi(ADCSRA,ADPS2) ;
cbi(ADCSRA,ADPS1) ;
sbi(ADCSRA,ADPS0) ;
#endif
pinMode(OUT_FOCUS, OUTPUT);
pinMode(OUT_SHUTTER, OUTPUT);
pinMode(LED, OUTPUT);
PORTD = B01010000;
// calibrate sensor to just above ambient reading
int ambVal = analogRead(LIGHT);
trigVal = ambVal + 40;
}
void loop() {
//read light level
int lightVal = analogRead(LIGHT);
//compare light reading to trigger value
if (lightVal >= trigVal)
{
//trigger camera
PORTD = B00101100;
delay(15);
PORTD = B01010000;
digitalWrite(LED, HIGH);
delay(30);
digitalWrite(LED, LOW);
}
}
Circuit detail (Transistor is wrong type but the correct footprint for the PCB) |
Output in dim light is about 0.13V going up to just over 1V with an inspection lamp close to the transistor.
Photo Transistor |
Low Power Op-Amp |
The prototype PCB will be mostly SMD tech with the photo transistor and pin headers being through-hole.
Bit of code that just works...
/*
StormTrigger V3 30-07-2013
*/
#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
#define LIGHT 0
#define OUT_FOCUS 2
#define OUT_SHUTTER 3
#define LED 13
int trigVal = 0;
void setup() {
#if FASTADC
// set prescale to 16
sbi(ADCSRA,ADPS2) ;
cbi(ADCSRA,ADPS1) ;
sbi(ADCSRA,ADPS0) ;
#endif
pinMode(OUT_FOCUS, OUTPUT);
pinMode(OUT_SHUTTER, OUTPUT);
pinMode(LED, OUTPUT);
PORTD = B01010000;
// calibrate sensor to just above ambient reading
int ambVal = analogRead(LIGHT);
trigVal = ambVal + 40;
}
void loop() {
//read light level
int lightVal = analogRead(LIGHT);
//compare light reading to trigger value
if (lightVal >= trigVal)
{
//trigger camera
PORTD = B00101100;
delay(15);
PORTD = B01010000;
digitalWrite(LED, HIGH);
delay(30);
digitalWrite(LED, LOW);
}
}
Labels:
arduino,
canon,
coincell,
diy,
electronics,
hack,
hotshoe,
lightning,
MEGA328P,
nature,
photograph,
programming,
prototype,
sensor,
trigger
Tuesday, July 23, 2013
Program TQFP32 MEGA328P (Arduino)
A quick look on the web reveals a lack of ways to get a bootloader onto an MEGA328P AU in TQFP32 SMD package.
Atmel have a board available for their STK600 development kit (Atmel.com). With some modification the board can fit to an Arduino on the standard headers, and have bootloaders burned easily.
A good alternative is available on ebay (here). However you will need to add a PCB to adapt to Arduino headers.
Oscillator circuit (crystal, capacitors and resistor) connected to xtal1, xtal2 and GND.
Atmel have a board available for their STK600 development kit (Atmel.com). With some modification the board can fit to an Arduino on the standard headers, and have bootloaders burned easily.
A good alternative is available on ebay (here). However you will need to add a PCB to adapt to Arduino headers.
Oscillator circuit (crystal, capacitors and resistor) connected to xtal1, xtal2 and GND.
Birdsnest of interconnecting cables from the Arduino headers.
Closeup of MEGA328P in place for programming
Remove the MEGA328P from the Arduino
Mount the AVR board to the Arduino
Hook up the set via USB to your PC then use the following to program the TQFP32 MEGA328P
That gets the bootloader onto the chip.
You will need to include a header on your PCB to access TX, RX, RESET, 5V and GND to program the MEGA328P from the Arduino environment, using an Uno to pass-through the signals, or a standard ICSP header for programming via Atmel Studio and an AVRISPII.
Playing with Bluetooth
Baby steps in development of bluetooth limit switches for CNC.
Materials used:
Arduino Uno
BlueSMiRF Gold
Breadboard & 4 connection wires
Android phone with Android Bluetooth Terminal installed
Code:
// basic Arduino sketch to demonstrate output based on serial data received from bluetooth
// the Arduino does not know this is Bluetooth, only that it is serial comms
// connect bluesmirf to VCC, GND, TX and RX
void setup(){
//configure serial at 115200 baudrate
Serial.begin(115200);
//set arduino led on pin 13
pinMode(13, OUTPUT);
}
void loop(){
if(Serial.available()){
//if serial comms are established, read characer received
unsigned char charreceived = Serial.read();
//determine operation based on character received
switch(charreceived){
case 'a':
digitalWrite(13, HIGH);
Serial.println("Pin 13 Led On");
break;
case 'b':
digitalWrite(13, LOW);
Serial.println("Pin 13 LED Off");
break;
case 'c':
digitalWrite(13, HIGH);
delay(1000);
digitalWrite(13, LOW);
Serial.println("Pin 13 LED Blink 1 second");
break;
default:
break;
}
//we only want first character so flush remaining characters
Serial.flush();
}
delay(10);
}
After pairing the phone with the bluesmirf, entering either text "a", "b" or "c" will affect the LED on Pin 13 of the Arduino, and will provide feedback to the phone.
Materials used:
Arduino Uno
BlueSMiRF Gold
Breadboard & 4 connection wires
Android phone with Android Bluetooth Terminal installed
Code:
// basic Arduino sketch to demonstrate output based on serial data received from bluetooth
// the Arduino does not know this is Bluetooth, only that it is serial comms
// connect bluesmirf to VCC, GND, TX and RX
void setup(){
//configure serial at 115200 baudrate
Serial.begin(115200);
//set arduino led on pin 13
pinMode(13, OUTPUT);
}
void loop(){
if(Serial.available()){
//if serial comms are established, read characer received
unsigned char charreceived = Serial.read();
//determine operation based on character received
switch(charreceived){
case 'a':
digitalWrite(13, HIGH);
Serial.println("Pin 13 Led On");
break;
case 'b':
digitalWrite(13, LOW);
Serial.println("Pin 13 LED Off");
break;
case 'c':
digitalWrite(13, HIGH);
delay(1000);
digitalWrite(13, LOW);
Serial.println("Pin 13 LED Blink 1 second");
break;
default:
break;
}
//we only want first character so flush remaining characters
Serial.flush();
}
delay(10);
}
After pairing the phone with the bluesmirf, entering either text "a", "b" or "c" will affect the LED on Pin 13 of the Arduino, and will provide feedback to the phone.
Sunday, July 14, 2013
Version 3 - New Design
Hotshoe mounted
Built-in sensor
Coincell battery operation
Single LED feedback
Automatic setting & operation
35mm x 25mm x 15mm volume to work within.
Shown is the enclosure mounted on 7D.
Stacked PCBs. One uC PCB and one I/O PCB with a board interconnect.
Built-in sensor
Coincell battery operation
Single LED feedback
Automatic setting & operation
35mm x 25mm x 15mm volume to work within.
Shown is the enclosure mounted on 7D.
Stacked PCBs. One uC PCB and one I/O PCB with a board interconnect.
Labels:
automatic,
canon,
coincell,
enclosure,
hotshoe,
lightning,
n3,
nature,
photograph,
sensor,
trigger
Subscribe to:
Posts (Atom)