Cirkit Designer Logo
Cirkit Designer
Your all-in-one circuit design IDE
Home / 
Component Documentation

How to Use Photon 2: Examples, Pinouts, and Specs

Image of Photon 2
Cirkit Designer LogoDesign with Photon 2 in Cirkit Designer

Introduction

The Photon 2 is a compact and powerful Wi-Fi development kit designed for creating connected projects and products. It features a microcontroller with built-in Wi-Fi capabilities, making it an ideal choice for Internet of Things (IoT) applications. With its small form factor and robust feature set, the Photon 2 is perfect for both hobbyists and professionals looking to develop smart, connected devices.

Explore Projects Built with Photon 2

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
Photon 2 Motion Detector Alarm with PIR Sensor and Wi-Fi Control
Image of final project: A project utilizing Photon 2 in a practical application
This circuit is a motion-activated alarm system using a Photon microcontroller, a PIR sensor, a piezo buzzer, a red LED, and a pushbutton. When motion is detected by the PIR sensor, the red LED lights up and the buzzer sounds an alarm, which can be deactivated manually via the pushbutton or remotely through the Particle Cloud.
Cirkit Designer LogoOpen Project in Cirkit Designer
ESP32-Based Wi-Fi Controlled Laser Shooting Game with OLED Display
Image of 123: A project utilizing Photon 2 in a practical application
This circuit is a laser shooting game controlled by a PS3 controller, featuring an ESP32 microcontroller, two photosensitive sensors for light detection, and a motor driver to control two DC motors. The game includes an OLED display for score visualization, and a MOSFET to control an LED bulb, with power supplied by a 12V battery and regulated by a DC-DC step-down converter.
Cirkit Designer LogoOpen Project in Cirkit Designer
ESP32-Based Security System with RFID and Laser Intrusion Detection
Image of CPE doorlock system upgrade: A project utilizing Photon 2 in a practical application
This circuit is a security and access control system featuring motion detection, laser beam-break sensing, and RFID scanning, interfaced with a keypad and visual/audible indicators, powered by a solar-charged battery, and capable of controlling an electric lock via a relay.
Cirkit Designer LogoOpen Project in Cirkit Designer
ESP32-Based Security System with RFID, PIR Sensor, and Laser Modules
Image of CPE doorlock system upgrade: A project utilizing Photon 2 in a practical application
This circuit is designed for a security and access control system with motion detection, beam-break detection, RFID-based access, and user input via a keypad. It is managed by an ESP32 microcontroller, which also controls an OLED display and an electric lock through a relay. The system is powered by a solar panel with a charge controller and UPS battery, with buck converters for voltage regulation.
Cirkit Designer LogoOpen Project in Cirkit Designer

Explore Projects Built with Photon 2

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
Image of final project: A project utilizing Photon 2 in a practical application
Photon 2 Motion Detector Alarm with PIR Sensor and Wi-Fi Control
This circuit is a motion-activated alarm system using a Photon microcontroller, a PIR sensor, a piezo buzzer, a red LED, and a pushbutton. When motion is detected by the PIR sensor, the red LED lights up and the buzzer sounds an alarm, which can be deactivated manually via the pushbutton or remotely through the Particle Cloud.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of 123: A project utilizing Photon 2 in a practical application
ESP32-Based Wi-Fi Controlled Laser Shooting Game with OLED Display
This circuit is a laser shooting game controlled by a PS3 controller, featuring an ESP32 microcontroller, two photosensitive sensors for light detection, and a motor driver to control two DC motors. The game includes an OLED display for score visualization, and a MOSFET to control an LED bulb, with power supplied by a 12V battery and regulated by a DC-DC step-down converter.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of CPE doorlock system upgrade: A project utilizing Photon 2 in a practical application
ESP32-Based Security System with RFID and Laser Intrusion Detection
This circuit is a security and access control system featuring motion detection, laser beam-break sensing, and RFID scanning, interfaced with a keypad and visual/audible indicators, powered by a solar-charged battery, and capable of controlling an electric lock via a relay.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of CPE doorlock system upgrade: A project utilizing Photon 2 in a practical application
ESP32-Based Security System with RFID, PIR Sensor, and Laser Modules
This circuit is designed for a security and access control system with motion detection, beam-break detection, RFID-based access, and user input via a keypad. It is managed by an ESP32 microcontroller, which also controls an OLED display and an electric lock through a relay. The system is powered by a solar panel with a charge controller and UPS battery, with buck converters for voltage regulation.
Cirkit Designer LogoOpen Project in Cirkit Designer

Common Applications and Use Cases

  • Home automation systems
  • Smart appliances
  • Remote monitoring and control
  • Wearable technology
  • Industrial IoT solutions
  • Prototyping and development of connected products

Technical Specifications

Key Technical Details

Parameter Value
Microcontroller ARM Cortex-M4
Operating Voltage 3.3V
Input Voltage 3.6V - 5.5V
Digital I/O Pins 18
Analog Input Pins 8
Flash Memory 1MB
RAM 256KB
Wi-Fi 802.11 b/g/n
Clock Speed 120 MHz
Dimensions 36.58mm x 20.32mm

Pin Configuration and Descriptions

Pin Number Pin Name Description
1 VIN Input voltage (3.6V - 5.5V)
2 GND Ground
3 3V3 3.3V output
4 D0 Digital I/O
5 D1 Digital I/O
6 D2 Digital I/O
7 D3 Digital I/O
8 D4 Digital I/O
9 D5 Digital I/O
10 D6 Digital I/O
11 D7 Digital I/O
12 A0 Analog Input
13 A1 Analog Input
14 A2 Analog Input
15 A3 Analog Input
16 A4 Analog Input
17 A5 Analog Input
18 A6 Analog Input
19 A7 Analog Input

Usage Instructions

How to Use the Photon 2 in a Circuit

  1. Powering the Photon 2:

    • Connect the VIN pin to a power source (3.6V - 5.5V).
    • Connect the GND pin to the ground of the power source.
  2. Connecting to Wi-Fi:

    • Use the built-in Wi-Fi module to connect to a Wi-Fi network.
    • Configure the Wi-Fi settings using the Particle IDE or Particle CLI.
  3. Programming the Photon 2:

    • Use the Particle Web IDE, Particle Desktop IDE, or Particle CLI to write and upload code.
    • The Photon 2 supports programming in C/C++.
  4. Interfacing with Sensors and Actuators:

    • Use the digital I/O pins (D0-D7) to connect to sensors and actuators.
    • Use the analog input pins (A0-A7) to read analog signals from sensors.

Important Considerations and Best Practices

  • Ensure the input voltage does not exceed the specified range (3.6V - 5.5V).
  • Use appropriate pull-up or pull-down resistors for digital inputs if necessary.
  • Avoid placing the Photon 2 near sources of electromagnetic interference to maintain Wi-Fi performance.
  • Regularly update the firmware to benefit from the latest features and security patches.

Example Code for Arduino UNO

// Example code to connect Photon 2 to an Arduino UNO and read an analog sensor

// Define the pin connected to the sensor
const int sensorPin = A0;

// Variable to store the sensor value
int sensorValue = 0;

void setup() {
  // Initialize serial communication at 9600 baud rate
  Serial.begin(9600);
}

void loop() {
  // Read the analog value from the sensor
  sensorValue = analogRead(sensorPin);

  // Print the sensor value to the serial monitor
  Serial.println(sensorValue);

  // Wait for 100 milliseconds before the next reading
  delay(100);
}

Troubleshooting and FAQs

Common Issues Users Might Face

  1. Wi-Fi Connection Problems:

    • Ensure the Wi-Fi credentials are correctly configured.
    • Check if the Wi-Fi network is within range and operational.
    • Restart the Photon 2 and the Wi-Fi router.
  2. Power Supply Issues:

    • Verify that the input voltage is within the specified range (3.6V - 5.5V).
    • Check for loose connections or faulty power sources.
  3. Programming Errors:

    • Ensure the correct board and port are selected in the Particle IDE.
    • Check for syntax errors or missing libraries in the code.

Solutions and Tips for Troubleshooting

  • Wi-Fi Connection:

    • Use the Particle mobile app to reconfigure Wi-Fi settings.
    • Move the Photon 2 closer to the Wi-Fi router to improve signal strength.
  • Power Supply:

    • Use a stable and regulated power supply.
    • Double-check all connections to ensure they are secure.
  • Programming:

    • Refer to the Particle documentation for detailed programming guides.
    • Use the Particle community forums for additional support and troubleshooting tips.

By following this documentation, users can effectively utilize the Photon 2 for their IoT projects and overcome common challenges they may encounter.