yaESP – A multipurpose ESP8266 peripheral board

2015 yaESP 0v32

The yaESP is an exploration of the the new low cost WiFi b/g/n ESP8266 modules and features a number of shared peripherals occupying the 9 available I/O. Programmable in C as well as LUA, the ESP8266 has a strong community building around it.  The peripheral features are as listed as per the I/O connection as follows (4 & 5 are reversed). Pins with suffix a/b/c are options depending on board population.

Connections

PINSCHBRDCONNECTIONS
0PROGPRGButton & Connector & Auto Reset
1&3TX&RXUSBCH340G USB to serial converter
2DHTDHT11 - temperature and humidity sensor
4aOPTOISOConnector for isolated input by optocoupler
4bOPTOVS1838B - IR receiver for remote control
5LEDRGBWS2812B RGB LED & connector
12a1WIREKTCConnector for thermocouple by MAX31850
12b1WIRE1WRConnector for off board devices
13aAUDIOAmplified speaker by IS31AP4991
13bAUDIOSPKConnector with low side 5V switch by N-FET
14aRELAY1OTAConnector with one half of A3910 H-bridge
14bRELAY1OTAConnector with low side 5V switch by N-FET
15aRELAY2OTBConnector with one half of A3910 H-bridge
15bRELAY2OTBConnector with low side 5V switch by N-FET
16aBUTTONPhysical button for user interface
16bBUTTONWake from sleep by reset connection
16cBUTTONBTNConnector for off board function
ADCaADCMicrophone input amplified by MCP6L91
ADCbADCLight sensor ALS-PT19-315C in voltage divider
ADCcADCANAConnector for off board analog input

 

Schematic

The schematic illustrates the connections.

yaESP 0v32 SCH

Enclosure

The enclosure is a three layer acyclic sandwich:

2015 yaESP 0v32 SK09 ENC

On Board Functions

Measuring temperature and humidity

The on board DHT11 can measure temperature to ±2°C and humidity to ±5?RH. Alternatively for better accuracy and resolution the DHT22/AMS2302 is also supported.

Receiving IR remote signals

Shared with the optocoupler input  on 4a/4b is a VS1838B infrared remote demodulator. This device will receive most TV remote control codes modulated at the standard 38kHz.

Listening for sounds

An amplified microphone is connected to the on board ADC. The amplifier is an MCP6L91 configured in inverting form. This input is shared with the light sensor ADCb as well as ADCc, the off board analog connector ANA.

Measuring light level

A phototransistor light sensor ALS-PT19-315C, in a voltage divider, is connected to the ADC input.  This input is shared with the microphone ADCa as well as ADCc, the off board analog connector ANA.

Audio playback

A speaker, amplified by IS31AP4991, is available for audio playback and PWM beeping. The amplifier (13a) is shared with a low side switch (13b).

Off Board Extensions

Measuring high temperatures

Thermocouples can be used to measure a wide temperature range, K-type probes are available for a few dollar that can measure up to 800°C.  Higher temperatures are possible with an upper limit of around 1300°C.  The thermocouple is polarized and connects to the pins labeled KTC, the negative pin on the PCB is marked with a negative symbol.  This option requires populating IC4, the MAX31850 thermocouple amplifier and a few discrete resistors and capacitors.

Measuring multiple temperatures

The 1Wire bus can be used to connect multiple devices simultaneously, it requires no additional on board hardware and does not conflict with the thermocouple amplifier. The common 1Wire temperature sensor is the DS18B20 by Maxim, which has a temperature range of -55°C to +125°C and is accurate to ±0.5°C over the range of -10°C to +85°C.

Switching a 120v AC load

An electromechanical relay or a solid state relay can be use to switch large AC voltages. The SSR-40DA is a common solid state relay that can switch up to 40 Amps and 150 volts. This relay can be controlled with options 14b, 15b or 13b, a low side 5v switch with off board connectors OTA, OTB or SPK.  An electromechanical relay can also be used with the same conenctions keeping in mind the coil should be rated for 5v.

Sensing an AC voltage

The connector labeled ISO provides an optically isolated input along with a few discrete components depending on the AC voltage to be sensed. The optoisolator is part SFH6186-2. For sensing a 24vAC signal, a diode is required for reverse protection along with a pair of 1k ohm series resistors for current limiting. Isolated DC sensing can also be implemented with suitable values parts.

Controlling a DC motor

A small DC motor, up to 5v and 500mA can be speed controlled in forward and reverse by the H bridge. This makes use of options 14a and 15a and requires IC1 and IC3 to be populated, the A3910 H-bridge and 74LVC2G04 level shifter. Motor connections are OTA and OTB and optionally have back EMF protection diodes.

Multiple single direction motor operation can also be implemented, see the next section on switching a DC load.

Switching a 5v DC load

Small DC loads up to 2 Amps can be switched directly by any of the low side N-channel MOSFET switches. These are options 14b, 15b and 13b, with off board connectors OTA, OTB and SPK respectively.  Back EMF protection diodes are optional for OTA and OTB. Current limiting resistors are optional for OTA, OTB and SPK.  Pulse width modulation can be applied to these switches as well.

Connecting more RGB LEDs

The yaESP board has a level shifted WS2812b RGB LED on board running from 5v. This is a serial shifted LED with the data out on the RGB connector. Additional WS2812B LEDs can be added for individual control. The level shifter is part 74LVC1T45.

Sensing a reed switch

A passive reed switch or active PIR sensor can be connected using the BTN connector. This interface has a 3.3 volt pullup resistor and is active low.

Measuring analog voltages

The ANA connector can feed the internal analog to digital converter thru a resistive divider. The range into the divider is 0 to 3 volts.

 

Comments

Leave a comment below if you have an interesting application in mind …

NBOG 2014: AIR WING

airwing

Take a virtual bike ride through the NBOG zones on ‘AIR WING’
http://nbog.ca/en/exhibit/nbog-hub-info-chuo-cawsand-krazatchu-byward-market-zone-11-60-george/

UR Beating <3

UR Beating <3

UR Beating <3 is a wearable Arduino based heart monitor.

ur beating under wraps

In conjunction with Megan Smith.  More to come soon – watch for updates!

DC Servo 2v68: nAn0 Und3rP4nTs

DC Servo Kit - nAn0 Und3rP4nTs - 2v68 - asm

The nAn0 Und3rP4nTs DC Servo is a fully isolated medium power motor driver shield for the Arduino Nano supporting motors up to 85v.  Isolated meaning you can safely use the USB on the Nano without fear.  Additionally no more high power ground loops! The Shield entertains a number of useful features including:

  • High speed optical isolators for PWM.
  • Hall sensor isolated analog current feedback.
  • Five tuning potentiometers for gains and limits.
  • Control header featuring step, serial, i2c and analog.
  • Switched cooling fan with RPM feedback.
  • Two status LEDs and mode button.
  • Single supply motor and gate power.

DC ServoKit nAn0 Und3rP4nTs 2v68.SCH

DC Servo Kit - nAn0 Und3rP4nTs - 2v68 - PCBt

Onward to the assembly:

INSTRUCTIONS

When assembling a circuit board, start with the shortest components first.
This way, when the board is turned over to solder, the parts rest on the table and don’t fall out.

1. RESISTORS

Bend each resistor before inserting them. The resistors are marked with 3 colored bands to indicate value. The fourth colored band is typically gold or silver and this indicates tolerance. The value and color code for each resistor is in the chart.

resistor bent

On the board – each resistor is labeled ‘R’ followed by a number. The numbers increment in a pattern, starting at the top left of the circuit board.
Place all the resistors according to the guide below. 

R1 is much larger being that it is rated for 2 Watts, it’s good to leave a space (2~5mm) for cooling between the PCB and the resistor for this part.

Resistor Footprint Symbol
Value Resistor Name Color Code
33 R R2, R3, R4, R5 Orange Orange Black
100 R R9 Brown Black Brown
150  R R10, R11 Brown Green Brown
360 R R6, R8 Orange Blue Brown
510 R R12, R13 Green Brown Brown
1k R7, R14 Brown Black Red
2k2 2W R1 Red Red Red
Solder each resistor in place and then trim off the extra bits.  

2. DIODES

There are 3 different diode types that are 3 different sizes. The footprints on the PCB are similar, a rectangular part with a stripe to indicate polarity. Diode footprint no sym
The smallest diode part is BAW76, it has an orange glass body. Place it according to the stripe. There are 6 of them, the part numbers are D5, D6, D7, D8, D12 and D13.  diode baw76 pic
The medium size diode is a 1N4937 which will be printed on the diode body. There are 4 of them, the part numbers are D9, D10, D11 and D14.  diode
The largest diode is a fast TVS (transient voltage suppressor), part number P6KE170A. There are 4 of them, they are part numbers D1, D2, D3 and D4.  TVS diode pic
Carefully flip the board over. Solder each capacitor in place, and then trim off the extra bits.  

3. CERAMIC CAPACITORS

There are four different kinds of ceramic capacitors on the PCB and some of them look similar. Most of the footprints are the same, some are more rectangular shaped.

Capacitor Footprint Symbol

The first ceramic capacitors are labeled ‘104’ which means 10 + 4 zeros pF (0.1uF) and are rated for 25 or 50v. They should be yellow, and small but sometimes they are blue. It is 5mm between pins. The part numbers are C8, C9, C10, C11, C15, C16, C18, C20 and C21.

capacitor 104

The second ceramic capacitors are also 104 but are rated for 250v. They are much bigger and are red-brown color. The part numbers are C3, C4 and C5.

104 250v ceramic cap pic

The third ceramic capacitors are label 224k which is hard to read. They are bigger as they are rated for 250v. The K on the label indicates the tolerance of 10%. The part numbers are C6 and C7.

224 250v ceramic cap pic

The fourth ceramic capacitor is 105 (1uF) and rated for 25v. See the label on the part, it reads 105K. The part number is C14.

105 25v ceramic cap pic
Carefully flip the board over. Solder each capacitor in place, and then trim off the extra bits.  

4. ELECTROLYTIC CAPACITORS

There are a bunch of electrolytic capacitors in the circuit. The voltage rating is very important!  Note – The white stripe indicates negative.

electro cap

On the footprint, the white half circle marks the negative terminal. The shorter leg of the capacitor goes in the negative terminal.
Place them according to the following chart.

electro cap footprint no num
Capacity Voltage Name Diameter
33 uF 160 v C13 10.5 mm
100 uF 10 v C17 7 mm
100 uF 25 v C12, C19 7 mm
100 uF 160 v C1, C2 12.5 mm
Place, flip & solder, then trim the leads.  

5. IC SOCKETS

There are four chips sockets, two are for the optocouplers and two are for the gate drivers. They are all 2×4 size. The part numbers on the PCB are IC1, IC2, OK1 and OK2.

 ic socket  8pin DIP pic
As they are just holders it doesn’t really matter which way they fit but you should line up the notch regardless. Place, flip, solder. CHIP Footprint Symbol 8pin DIP

After soldering, the chips can be inserted.
IC1 and IC2 are the gate drivers, they are IR2103. OK1 and OK2 are the high speed optocouplers, they are 6N137.  Make sure to align the notch with the footprint.

IC ior2013 8pin dip pic

6. TRANSISTOR

The transistor is a switch. This part is a BC548, a small signal NPN transistor. There is one of them in the circuit, it is Q5.
Be careful not to confuse it with the small 78L05 voltage regulator which is part VR2. Read the label.
transistor
The shape of the body determines how it fits. Match the round and flat edges to the footprint on the circuit board. Place, flip, solder, trim. TO-92 footprint

7. SMALL VOLTAGE REGULATOR

This regulator has a TO92 footprint just like the transistor in step 6 above. Read the label.
It is VR2 and is a LM78L05, the L in the middle of the name indicates its the smaller part rated for 100mA.
 to92 pic
The shape of the body determines how it fits. Match the round and flat edges to the footprint on the circuit board.  TO-92 footprint

8. LARGE VOLTAGE REGULATORS

These regulators have a footprint just like the MOSFETs in step 9. Read the label, make sure you have the right part. to220 pic
The first part is LM7805 and is part number VR3. The second part is TL783CKC and is part number VR1. The metal tab of the part matches the rectangle on the footprint.  TO-220 footprint

9. MOSFETS

These parts are the main switches for the motor, they are IRF540 N-Channel MOSFETS, a large transistor. Be careful, the footprint looks the same as the voltage regulators in step 8. Read the label, make sure you have the right part.

NOTE: THEY ARE SENSITIVE TO STATIC ELECTRICITY, BE CAREFUL UNTIL THEY ARE SOLDERED IN THE CIRCUIT.

to220 pic
There are four of them, they are part numbers Q1, Q2, Q3 and Q4. The metal tab of the part matches the rectangle on the footprint.  TO-220 footprint

10. SCREW TERMINALS

There are 3 screw terminals, two are green and one is blue, the footprints look like this. The rectangle denotes the negative terminal where applicable. screw term footprint
The green screw terminals are larger and have a higher power rating. They are for the motor and the motor power, both on the same side of the board. screw terminal green pic
The blue screw terminal is smaller and is for the Arduino power. screw terminal blue pic

11. CURRENT SENSE

This is the isolated hall current sensor PCB. The SMD parts are already mounted and soldered. hall current sense pcb pic
Add the male pin header to the current sense PCB.  pinheader single yellow pic
And the female pin header to the servo PCB, it requires cut to size.  1x15 Arduino header pic
The footprint is on the left side of the PCB and looks like this.
The cross hatch area indicates the isolation boarder between the power side and the control side.
current sense pcb footprint

12. ARDUINO NANO HEADER

There are two rows on single header (1×15) for the Arduino. 1x15 Arduino header pic

They fit into the footprint on the board like this.You can use your Arduino to stabilize and align them for soldering. The rectangles around some pins indicate the ground connections.

Arduino nano header footprint

13. POTENTIOMETERS

There are 5 potentiometers in the circuit.  They are used to set gains and limits. They are G0, G1, G2, G3 and G4.  pot small
Like most potentiometers, it has three legs and this makes it easy to fit as the footprint illustrates. pot small no name footprint
 

14. RED & GREEN LEDs

The two LEDs are 5mm size.  L1 is the Error LED and is red. L2 is the OK LED ans is green. LEDs are polarized, the long leg is positive. Inside the LED, the anvil shape is typically negative.

 LED Red 3mm pic
The footprints looks like this. Be careful of the orientation, match up the flat side of the LED with the flat side of the PCB footprint. Also, the long lead is negative, it’s hole is marked with a square solder pad on the PCB. Place, flip, solder & trim. LED 5mm footprint 

15. BUTTON

The button is a simple 4 legged animal, it snaps in place any which way it fits. There is only one, it is 6mm size. button
It’s footprint looks like this. Make sure the pins are not bent going in. Place, flip, solder & trim. Button footprint

16. FAN PIN HEADER

Some single row pin header is included for both the current sense board and the fan header, it looks like this and will require breaking to the correct size.  pinheader single yellow pic
It’s footprint looks like this. Only the three pins on the right are used, the square pin and the next two, those closest to the edge of the PCB. fan header footprint 

17. CONTROL PIN HEADER

This bit is a 2×6 double row right angle male pin header for the control and encoder interface. Optionally straight pin header can be substituted depending on requirements.  pin header double row right angle 2x6
It’s footprint looks like this. Refer to the table below for the pin name and function. control header footprint
 
5  DC 5V regulated output, up to 500mA from blue screw terminal input.
Negative symbol  DC ground pin on Arduino side only (Power side is isolated).
A  Encoder channel A input. Arduino pin D2 (PD2 – INT0).
B  Encoder channel B input. Arduino pin D3 (PD3 – INT1).
S  Control step pin. Arduino pin A5 or A3 depending on Nano.
D  Control direction pin. Arduino pin A4 or A3 depending on Nano.
T  Serial pin TXD. Arduino pin D1 (PD0).
R  Serial pin RXD. Arduino pin D0 (PD1).
E  Optional error pin if programmed. Arduino pin D12 (PD4).
I  Optional incremental encoder input if programmed. Arduino pin D4 (PD4).

18. STANDOFFS

The standoffs keep the board up and mount the fan.  standoff footprint
The brass standoffs are for the top. long brass standoff pic
The plastic standoffs are for the bottom.  long plastic standoff pic

19. FAN

The fan is attached to the standoffs and plugs into the fan header. The plug should be connected to the three pins closest to the edge of the PCB. The black wire is nearest the PCB edge. Some M3 screws are included to attach the fan to the brass standoffs. 60mm fan pic

 

LIBRARIES & SKETCHES

Not yet published.  
   
   
   

IR R3M0C0N 1v09: Multi-Purpose Arduino Shield with IR

IR r3m0c0n shield 1v09 assembled onduino

The assembled shield pictured above is a general purpose mixed bag of hardware for rapid prototyping on the Arduino. This shield features a variety of handy hardware as follows:

  • Two large push buttons (D5, D6)
  • Six small push buttons (D7, D8, D9, D10, D11, D12)
  • Analog microphone and preamp (A3)
  • Analog light sensor (A4)
  • Analog power switch (A5)
  • 3mm red LED (D4)
  • Infrared Transmitter on PWM pin (D3)
  • 38kHz infrared demodulator/receiver (D2)
  • Unused Arduino Pins (A0, A1, A2, D13)
  • Reset disable slide switch for IR Bootloader

The schematic illustrates the circuit and connections to the Arduino as well as the color codes for the resistors (click for large image):

IR R3M0C0N Arduino Shield 1v09 Schematic

And the PCB layout:

ir remcon layout 1v09

Onward to the assembly:

INSTRUCTIONS

When assembling a circuit board, start with the shortest components first.
This way, when the board is turned over to solder, the parts rest on the table and don’t fall out.

1. RESISTORS

Bend each resistor before inserting them. The resistors are marked with colored bands to indicate value. The value and color code for each resistor is in the chart. resistor bent
On the board – each resistor is labeled ‘R’ followed by a number. The numbers increment in a pattern, starting at the top left of the circuit board.

Place all the resistors according to the guide below. Then, carefully flip the board over.

Resistor Footprint Symbol
Value Resistor Name Color Code
18 R R5 Brown Green Black
120 R R10, R11 Brown Red Brown
510 R R3, R4 Green Brown Brown
5k1 R2 Green Brown Orange
10k R1, R9 Brown Black Orange
330k R6 Orange Orange Yellow
Solder each resistor in place and then trim off the extra bits.

2. CERAMIC CAPACITORS

All the ceramic capacitors are 0.1uF. The capacitor symbol on the circuit board looks like this, with incrementing numbers.
NOTE: C3 IS NOT A CERAMIC CAPACITOR & HAS A DIFFERENT FOOTPRINT.
Capacitor Footprint Symbol
The 0.1uF ceramic capacitors are labeled ‘104’ which means 10 + 4 zeros pF. Sometimes they are yellow, sometimes they are blue.
(p = pico, u = micro, m = milli, n = nano)
capacitor 104
Carefully flip the board over. Solder each capacitor in place, and then trim off the extra bits.

3. ELECTROLYTIC CAPACITOR

There is only 1 electrolytic capacitor which is C3.
Note – The white stripe indicates negative.
electro cap
On the footprint, the white half circle marks the negative terminal. The shorter leg of the capacitor goes in the negative terminal.

Place C3, flip & solder, then trim the leads.

electro cap footprint c3

4. LIGHT SENSOR

The light sensor is a light dependent variable resistor. This item has no polarity, ie. it doesn’t matter which pin goes in which hole. It looks like this. light sensor
The footprint symbol on the circuit board looks like this. Put it in, flip it over, solder and trim! Light Sensor Footprint Symbol

5. TRANSISTORS

The transistor is a switch. This part is a BC548, a small signal NPN transistor. There are 2 of them in the circuit. transistor
The shape of the body determines how it fits. Match the round and flat edges to the footprint on the circuit board. Place, flip, solder, trim. Transistor footprint

6. MICROPHONE

The microphone is an electret type used to sense sense sound. microphone
The footprint looks like this, with two offset pins that determine it’s fit. Place, flip, solder, trim. Microphone footprint

7. SWITCH

This part is the slide switch to disable reset. It doesn’t matter which way it fits. switch slide
The footprint is at the bottom left and marked “RSTDSB->” and looks kinda like this. Place, flip, solder, trim. switch slide footprint nolbl

8. INFRARED LEDs

There are two infrared LEDs on the circuit board. They are used to communicate with other IR shields or with a TV. LEDs are polarized, the long leg is positive. Inside the LED the anvil shape is typically negative. Sometimes the IR LED has a darker plastic body, sometimes it is clear. LED
The footprint looks like this and like the LED, has a flat edge to indicate negative. Place, flip, solder, trim. LED laydown footprint

9. INFRARED DEMODULATOR

This is the receiver for infrared remote signals, it contains some demodulation circuitry and a window filter around 38Khz. The part number is VS1838B. IR Demod
The footprint is designed to accept different models. For this PCB occupy only the side nearest IR LEDs as indicated by the RED bar, which has the ground pin in the center (Also refer to the picture of the assembled shield at the top of the page). Place, flip, solder, trim.

SPECIAL NOTE: When soldering the demodulator, don’t dwell as too much heat can damage it.

IR Demod multi indicated footprint

10. RED LED

The Red LED is 3mm size. LEDs are polarized, the long leg is positive. Inside the LED the anvil shape is typically negative.  LED Red 3mm pic
It’s footprint looks like this. Be careful of the orientation, match up the flat side of the LED with the flat side of the PCB footprint. Also, the long lead is negative, it’s hole is marked with a square on the PCB. Place, flip, solder & trim. LED 5mm footprint

11. BIG BUTTONS

The button is a simple 4 legged animal, it snaps in place any which way it fits. There are two of them, they are 12mm size.  button 12mm pic
It’s footprint looks like this.  Place, flip, solder & trim. button 12mm footprint

12. SMALL BUTTONS

The button is a simple 4 legged animal, it snaps in place any which way it fits. There are four black and two red, they are 6mm size. button
It’s footprint looks like this. Make sure the pins are not bent going in. Place, flip, solder & trim. Button footprint

13. PIN HEADER

There are four pieces of single row pin header, two pieces are 1×8 and the other two pieces are 1×6. pinheader single yellow pic
It’s footprint looks like this. Use the outside holes, closest to the edge of the PCB, the inside row is extra for hacking. Place, flip, solder, no need to trim. pin header footprint

LIBRARIES & SKETCHES

IR REMOTE LIBRARY Ken Shirriff’s excellent Multi-Protocol Infrared Remote library for the Arduino
PinChangeInt LIBRARY Library to setup buttons as Interrupts

IR R3M0C0N 2v14J: Multi-Purpose Arduino Shield with IR

IR r3m0c0n shield 2v14j assembled onduino

The assembled shield pictured above is a general purpose mixed bag of hardware for rapid prototyping on the Arduino. This shield features a variety of handy hardware as follows:

  • Analog joystick (A0, A1) with center button (D4)
  • Two momentary push buttons (D7, D8)
  • Analog microphone and preamp (A2)
  • Analog light sensor (A3)
  • 5mm RGB LED on PWM pins (D5, D6, D9)
  • Infrared Transmitter on PWM pin (D3)
  • 38kHz infrared demodualtor/receiver (D2)
  • Unused Arduino Pins (A4, A5, D10, D11, D12, D13)
  • Reset disable slide switch for IR Bootloader

The schematic illustrates the circuit and connections to the Arduino as well as the color codes for the resistors (click for large image):

IR R3M0C0N Arduino Shield 2v14J Schematic

And the PCB layout:

ir remcon layout 2v14J

Onward to the assembly:

INSTRUCTIONS

When assembling a circuit board, start with the shortest components first.
This way, when the board is turned over to solder, the parts rest on the table and don’t fall out.

1. RESISTORS

Bend each resistor before inserting them.  The resistors are marked with colored bands to indicate value. The value and color code for each resistor is in the chart. resistor bent
On the board – each resistor is labeled ‘R’ followed by a number.  The numbers increment in a pattern, starting at the top left of the circuit board.

Place all the resistors according to the guide below. Then, carefully flip the board over.

Resistor Footprint Symbol
Value Resistor Name Color Code
18 R R5 Brown Green Black
68 R R7, R8 Blue Green Black
120 R R10, R11 Brown Red Brown
510 R R3, R4 Green Brown Brown
5k1 R2 Green Brown Orange
10k R1, R9 Brown Black Orange
330k R6 Orange Orange Yellow
 Solder each resistor in place and then trim off the extra bits.

2. CERAMIC CAPACITORS

All the ceramic capacitors are 0.1uF.  The capacitor symbol on the circuit board looks like this, with incrementing numbers.
NOTE: C2 IS NOT A CERAMIC CAPACITOR & HAS A DIFFERENT FOOTPRINT.
 Capacitor Footprint Symbol
The 0.1uF ceramic capacitors are labeled ‘104’ which means 10 + 4 zeros pF.  Sometimes they are yellow, sometimes they are blue.
(p = pico, u = micro, m = milli, n = nano)
 capacitor 104
Carefully flip the board over. Solder each capacitor in place, and then trim off the extra bits.

3. ELECTROLYTIC CAPACITOR

There is only 1 electrolytic capacitor which is C2.
Note – The white stripe indicates negative.
electro cap
On the footprint, the white half circle marks the negative terminal. The shorter leg of the capacitor goes in the negative terminal.

Place C2, flip & solder, then trim the leads.

electro cap footprint c2

4. LIGHT SENSOR

The light sensor is a light dependent variable resistor. This item has no polarity, ie. it doesn’t matter which pin goes in which hole. It looks like this. light sensor
The footprint symbol on the circuit board looks like this. Put it in, flip it over, solder and trim!  Light Sensor Footprint Symbol

5. TRANSISTORS

The transistor is a switch.  This part is a BC548, a small signal NPN transistor. There are 2 of them in the circuit. transistor
The shape of the body determines how it fits.  Match the round and flat edges to the footprint on the circuit board. Place, flip, solder, trim. Transistor footprint

6. MICROPHONE

The microphone is an electret type used to sense sense sound. microphone
The footprint looks like this, with two offset pins that determine it’s fit. Place, flip, solder, trim. Microphone footprint

7. SWITCH

This part is the slide switch to disable reset. It doesn’t matter which way it fits. switch slide
 The footprint is at the bottom left and marked “RSTDSB->” and looks kinda like this. Place, flip, solder, trim.  switch slide footprint nolbl

8. INFRARED LEDs

There are two infrared LEDs on the circuit board. They are used to communicate with other IR shields or with a TV. LEDs are polarized, the long leg is positive. Inside the LED the anvil shape is typically negative. Sometimes the IR LED has a darker plastic body, sometimes it is clear. LED
The footprint looks like this and like the LED, has a flat edge to indicate negative. Place, flip, solder, trim.  LED laydown footprint

9. INFRARED DEMODULATOR

This is the receiver for infrared remote signals, it contains some demodulation circuitry and a window filter around 38Khz. The part number is VS1838B. IR Demod
The footprint is designed to accept different models. For this PCB occupy only the side nearest IR LEDs as indicated by the RED bar, which has the ground pin in the center (Also refer to the picture of the assembled shield at the top of the page). Place, flip, solder, trim.

SPECIAL NOTE: When soldering the demodulator, don’t dwell as too much heat can damage it.

IR Demod multi indicated footprint

10 RGB LED

The RGB LED is common cathode, the negative pin is common. It has four leads that will need to be bent in alternating directions to fit the PCB.  rgb led pic
It’s footprint looks like this. Be careful of the orientation, match up the flat side of the LED with the flat side of the PCB footprint. Also, the long lead is negative, it’s hole is marked with a square on the PCB. Place, flip, solder & trim.  RGB LED footprint

11. BUTTONS

The button is a simple 4 legged animal, it snaps in place any which way it fits. There are two of them, one with a blue hat and one with a red hat.  button 12mm with red hat pic
It’s footprint looks like this. Place, flip, solder & trim.  button 12mm footprint

12. JOYSTICK

The joystick is a composite part containing two potentiometers, a button and some mechanical components.  joystick xbox pic
It’s footprint looks like this. Make sure the pins are not bent going in. Place, flip, solder & trim.  joystick xbox footprint

13. PIN HEADER

There are four pieces of single row pin header, two pieces are 1×8 and the other two pieces are 1×6.  pinheader single yellow pic
It’s footprint looks like this. Use the outside holes, closest to the edge of the PCB, the inside row is extra for hacking. Place, flip, solder, no need to trim.  pin header footprint

LIBRARIES & SKETCHES

IR REMOTE LIBRARY  Ken Shirriff’s excellent Multi-Protocol Infrared Remote library for the Arduino
 PinChangeInt LIBRARY  Library to setup buttons as Interrupts
 BasicSketch  Starting point sketch with the pin names and setup.

Hack UR Baubles: Assembly Instructions

 

A project by Michael Grant & Megan Smith. hack ur baubles will be available in December 2013.

Customize your Christmas lights and add a personal narrative to your baubles with light and sound sensors. Build your Christmas experience to your taste and then control your project with a TV remote. Beam out morse message lights or become a human blinking and singing Christmas tree!

Bauble PCB 2

Board will be available for purchase in a DIY kit or stand alone on this Tindie page.

There are two variations of the ‘Hack UR Baubles’ project: battery powered & adapter powered.
This schematic shows both variations. The instructions below detail the specific builds.
Click for larger image.

Hack UR Baubles SCH pth0v11

INSTRUCTIONS

When assembling a circuit board, start with the shortest components first.
This way, when the board is turned over to solder, the parts rest on the table and don’t fall out.

1. RESISTORS

Bend each resistor before inserting them.  The resistors are marked with colored bands to indicate value. The value and color code for each resistor is in the chart. resistor bent
On the bauble board – each resistor is labeled ‘R’ followed by a number.  The numbers increment in a clockwise pattern, starting at the top left of the circuit board.

Place all the resistors according to the guide below. Then, carefully flip the board over.

Resistor Footprint Symbol
Value Resistor Name Color Code
10k R1, R2, R5, R6, R8, R10 Brown Black Orange
330k R3 Orange Orange Yellow
180 R R4, R7, R9, R11, R13, R17, R19 Brown Grey Brown
22 R R12, R18 Red Red Black
510 R R14 Green Brown Brown
100 R R15 Brown Black Brown
1k R16, R20, R21 Brown Black Red
 Solder each resistor in place and then trim off the extra bits.

2. CERAMIC CAPACITORS

All the ceramic capacitors are 0.1uF except for C4, which is 0.047uF.  The capacitor symbol on the circuit board looks like this, with incrementing numbers.  Capacitor Footprint Symbol
Place the 0.047uF ceramic capacitor, labeled ‘473’ (which means 47 + 3 zeros pF) in C4.  capacitor 473
Then, place the remaining 10 ceramic capacitors in C1, C2, C3, C5, C6, C8, C9, C11, C12 & C13. The 0.1uF ceramic capacitors are labeled ‘104’ which means 10 + 4 zeros pF.  capacitor 104
Carefully flip the board over. Solder each capacitor in place, and then trim off the extra bits.

3. IC SOCKET

The IC sockets make it easy to change the chips, they also protect the chips against heat from soldering. There are two on the circuit board, IC1 and IC2. They look like this.  IC SOCKET
The footprint symbol on the circuit board looks like this.

Note – There are two IC sockets at different lengths. The notch on the end keeps pin 1 of the chips aligned.

 CHIP Footprint Symbol
 Place each IC socket. Then, carefully flip the board over. Solder each IC socket in place, and then trim off the extra bits.

4. LIGHT SENSOR

The light sensor is a light dependent variable resistor. This item has no polarity, ie. it doesn’t matter which pin goes in which hole. It looks like this. light sensor
The footprint symbol on the circuit board looks like this. Put it in, flip it over, solder and trim!  Light Sensor Footprint Symbol

5. BUTTON

The button is a simple 4 legged animal with it’s back to the sun, it snaps in place any which way it fits. Tastes clicky.  button
It’s footprint looks like this. It’s up near the top, where the bauble hangs. Place, flip, solder & trim.  Button footprint

6. MICROPHONE

The microphone is an electret type used to sense sense sound to modulate the LEDs. microphone
The footprint looks like this, with two offset pins that determine it’s fit. Place, flip, solder, trim. Microphone footprint

7. RESONATOR

The resonator is the clock source for the microcontroller which runs at 16MHz, it looks like this. resonator
It goes into this footprint any which way it fits. Place, flip, solder, trim.

SPECIAL NOTE: When soldering the resonator, don’t dwell as too much heat can damage it.

 resonator footprint

8. TRANSISTORS

The transistor is a switch.  This part is a BC548, a small signal NPN transistor. There are 3 of them in the circuit. transistor
The shape of the body determines how it fits.  Match the round and flat edges to the footprint on the circuit board. Place, flip, solder, trim. Transistor footprint

9. SPEAKER

This is a magnetic speaker which has better frequency response than a piezo speaker. Speaker
It is polarized, the plus size can be seen on the footprint and on the bottom of the speaker as well. Make sure it gets in the right way around. Place, flip, solder, trim. Speaker footprint

10. INFRARED LEDs

There are two infrared LEDs on the circuit board. They are used to communicate with other baubles or with a TV. LEDs are polarized, the long leg is positive. Inside the LED the anvil shape is typically negative. LED
The footprint looks like this and like the LED, has a flat edge to indicate negative. Place, flip, solder, trim.  LED footprint

11. INFRARED DEMODULATOR

This is the receiver for infrared remote signals, it contains some demodulation circuitry and a window filter around 38Khz. The part number is VS1838B. IR Demod
The footprint is designed to accept different models. For this tutorial occupy only the side nearest the label ‘IRX1’, which has the ground pin in the center. Place, flip, solder, trim.

SPECIAL NOTE: When soldering the demodulator, don’t dwell as too much heat can damage it.

IR Demod footprint

12. POTENTIOMETERS

There are two potentiometers in the circuit.  The first one is to adjust offset for the audio line in signal, it’s the smaller of the two.  pot small
Like most potentiometers, it has three legs and this makes it easy to fit as the footprint illustrates. pot small footprint
The second potentiometer is bigger. It is used as a general purpose adjustment knob.  pot big
Its footprint is bigger and has a couple of additional solder points for mechanical stability.

Place both potentiometers, flip, solder & trim.

 Pot large footprint

13. RCA CONNECTOR

This connector is a used for audio line in, as an alternative to the microphone.  RCA
The footprint is at the edge of the circuit board to facilitate plugging in an audio source such as an MP3 player.

Place, flip, solder, trim.

 RCA footprint

14. ELECTROLYTIC CAPACITORS

There are three capacitors.  C7 is smaller and both C10 and C14 are the same size.

Note – The white stripe indicates negative.

electro cap
On the footprint, the white half circle marks the negative terminal. The shorter leg of the capacitor goes in the negative terminal.

Place C7, flip & solder. Place C10 & C14, flip, solder and then trim all three.

electro cap footprint

ADDITIONAL INSTRUCTIONS FOR (A)DAPTER POWERED BAUBLE.

A1. DIODE

This diode is a 1N4007, it protects the regulator against reverse voltage. Observe the polarity. The stripe on the part indicates the negative terminal. diode
Match the negative side with the stripe on the footprint. Place, flip, solder, trim. Diode footprint

A2. VOLTAGE REGULATOR

This part is an LM7805 in a TO220 package. The voltage regulator drops the incoming voltage to 5v for the microcontroller. regulator
The footprint looks like this. The heatsink tab aligns with the stripe on the footprint. It will get warm with normal operation. Place, flip, solder, trim.  Regulator footprint

A3. BARREL POWER CONNECTOR

This is a 5.5mm barrel power connector. It is the main power input to run the LED strings. It can be up to 24v DC.  power jack
This is the footprint symbol. It only fits one way with the opening facing off board. Place, flip and use lots of solder. power footprint

CONNECTING LEDS TO THE (A)DAPTER POWERED BAUBLE

The adapter powered bauble switches the LEDs at the adapter voltage, 24 volts DC.  White LEDs drop about 3 volts so we can drive 7 LEDs in series.
7 LED Series String
The best source of LEDs for this are LED Christmas light strings.  They are already wired in series and we can cut them to sections of seven.  The schematic below illustrates how they come wired, parallel sets of series strings.
7 LED Series String v2

ADDITIONAL INSTRUCTIONS FOR (B)ATTERY POWERED BAUBLE.

B1. SWITCH

This part is the power switch to the battery. It doesn’t matter which way it fits. switch slide
 The footprint is just over the microcontroller and looks like this. Place, flip, solder, trim.  switch slide footprint

B2. REGULATOR BYPASS

The Arduino operates directly on battery voltage, so it is necessary to bypass the regulator with a wire joining the two outside pads. Any bit of wire will do just make sure it forms a bridge and doesn’t touch the middle pad which is round. Solder in place. reg bypass

B3. BATTERY CASE

Before this step, check your work!  The battery case fits on the back of the PCB.  battery case
To avoid electrical shorting, it must not touch the PCB (bauble board).  To solve this, use the 1/8″ nylon spacers. nylon spacer
Attach with screws or rivets before soldering. Use two.  rivet
The assembly stacks up first the battery case, then the spacer, then the circuit board.  The rivet holds everything together.  After joining, solder and trim the extra bits. battery stack

CONNECTING LEDS TO THE (B)ATTERY POWERED BAUBLE

The battery powered bauble switches the LEDs at the battery voltage.  This means we can drive one LED per channel.  The round solder pad is the positive, the square is the negative. single LED connected

PROGRAMMING YOUR ARDUINO

To program use the standard 6 pin serial converter. In the Arduino IDE, set the board to ‘Mini 328’ or ‘UNO’ and make sure the com port is selected.

Note – The ground pin is at the top left here, it’s marked ‘GND’.

serial programmer
When plugging in the serial dongle, make sure ground inserts the pin with the square around it.  If it’s backwards you could damage it.  It may be easier to plug it in from the bottom. Serial footprint
These serial programming adapters can be found on eBay for about $5.  It’s most important that it has the FT232RL chip made by FTDI and that it has 6 pins in the order of GND, CTS, 5V, TXD, RXD & DTR.  You do not want the CP2102 based adapter.  Search for “FT232RL USB To Serial Adapter”.
Your computer may not have the Virtual Serial Port Driver for the serial dongle, it’s here if you need it: http://www.ftdichip.com/Drivers/VCP.htm

DEMO SKETCHES

bob_RTTTL_sound_light_0v01 This sketch plays Nokia ring tone songs.  The seven LED channels light up with the seven notes of the scale.
Bob_VU_Meter_0v01 This sketch listens to the microphone and displays the level on the LEDs as a Christmas VU Meter.
bob_multi_mode_lights This sketch was made by Will in the second workshop, it has many modes called by the button.
bob_multi_mode_lights_snd This sketch is the same as above but includes the music player as a mode. This code is preloaded on your MCU.

Firefly Installation: Nuit Blanche Ottawa Gatineau 2013

masthead-bkg

More information can be found on the Lumipendant Website here: http://www.lumipendant.com/