The PicAxe 18M2+ is a powerful and versatile microcontroller designed for hobbyists, educators, and professionals. It combines a BASIC programming environment with a wide range of input/output (I/O) capabilities, making it an excellent choice for controlling electronic projects and automating tasks. Its ease of use and flexibility make it ideal for applications such as robotics, data logging, home automation, and educational projects.
Common applications and use cases:
Robotics control systems
Sensor data acquisition and logging
Home automation and IoT projects
Educational tools for learning microcontroller programming
Prototyping and small-scale automation
Explore Projects Built with PicAxe 18M2+
Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
This circuit is designed for a multi-motor application, likely a drone or a similar vehicle, featuring eight brushless motors controlled by two 4-in-1 electronic speed controllers (ESCs). The ESCs are powered by a 3s2p 18650 battery pack and interfaced with a Pixhawk flight controller for motor management. Additionally, the system includes a Raspberry Pi 4B for advanced processing and control, which is connected to a NoIR camera module and a cooling fan, and a power module to supply and monitor the power to the Pixhawk.
This circuit features two Raspberry Pi Pico microcontrollers interfacing with various peripherals including an OV7670 camera module, a TFT display, and an OLED display. It also includes a multiplexer and a motor driver to control two planetary gearbox motors, powered by a battery and regulated through buck converters. The setup is designed for image capture, display, and motor control applications.
This circuit features a Raspberry Pi Pico microcontroller interfaced with an HC-05 Bluetooth module for wireless communication, an HMC5883L compass module for magnetic field measurement, and a GPS NEO 6M module for location tracking. The Pico is configured to communicate with the HC-05 via serial connection (TX/RX), with the compass module via I2C (SCL/SDA), and with the GPS module via serial (TX/RX). Common power (VCC) and ground (GND) lines are shared among all modules, indicating a unified power system.
This circuit features a Raspberry Pi Pico microcontroller interfaced with multiple peripherals for navigation and control. It includes an HC-05 Bluetooth module for wireless communication, an HMC5883L compass for magnetic heading detection, a GPS NEO 6M module for location tracking, and an SG90 servomotor for actuation. The Pico manages data exchange with the GPS and compass via serial connections, controls the servomotor, and communicates wirelessly through the HC-05 module.
The PicAxe 18M2+ microcontroller offers the following key technical features:
Specification
Value
Operating Voltage
2.0V to 5.5V
Clock Speed
32 MHz (internal resonator)
Programming Language
BASIC
I/O Pins
16 (including 6 analog inputs)
EEPROM
256 bytes
RAM
128 bytes
Program Memory
2048 lines of BASIC code
Communication Protocols
Serial, I2C, SPI
Power Consumption
Low power (nanoWatt technology)
Package Type
18-pin DIP
Pin Configuration and Descriptions
The PicAxe 18M2+ has an 18-pin layout, with each pin serving specific functions. Below is the pin configuration:
Pin Number
Pin Name
Description
1
V+
Positive power supply (2.0V to 5.5V)
2
C.5
Digital I/O or analog input (ADC channel 4)
3
C.4
Digital I/O or analog input (ADC channel 3)
4
C.3
Digital I/O or analog input (ADC channel 2)
5
C.2
Digital I/O or analog input (ADC channel 1)
6
C.1
Digital I/O or analog input (ADC channel 0)
7
C.0
Digital I/O
8
0V (GND)
Ground
9
B.0
Digital I/O or PWM output
10
B.1
Digital I/O or PWM output
11
B.2
Digital I/O or serial input
12
B.3
Digital I/O or serial output
13
B.4
Digital I/O
14
B.5
Digital I/O
15
B.6
Digital I/O or I2C clock (SCL)
16
B.7
Digital I/O or I2C data (SDA)
17
RES
Reset pin (active low)
18
V+
Positive power supply (2.0V to 5.5V)
Usage Instructions
How to Use the PicAxe 18M2+ in a Circuit
Power Supply: Connect the V+ pin (pin 1 or 18) to a power source (2.0V to 5.5V) and the 0V (GND) pin (pin 8) to ground.
Programming: Use the PicAxe Programming Editor software to write and upload BASIC code to the microcontroller via a serial programming cable.
I/O Connections: Connect sensors, actuators, or other peripherals to the I/O pins. Use the appropriate pins for digital, analog, PWM, or communication functions.
Communication: For serial communication, use pins B.2 (input) and B.3 (output). For I2C communication, use pins B.6 (SCL) and B.7 (SDA).
Important Considerations and Best Practices
Decoupling Capacitor: Place a 0.1 µF capacitor between V+ and GND to stabilize the power supply.
Pull-Up Resistors: Use pull-up resistors on the I2C lines (B.6 and B.7) for proper communication.
Programming Cable: Ensure the serial programming cable is correctly connected to avoid upload errors.
Pin Protection: Avoid exceeding the voltage and current limits of the I/O pins to prevent damage.
Example Code for Arduino UNO Integration
The PicAxe 18M2+ can communicate with an Arduino UNO via serial communication. Below is an example of Arduino code to send data to the PicAxe:
// Arduino code to send data to PicAxe 18M2+ via serial communication
void setup() {
Serial.begin(4800); // Initialize serial communication at 4800 baud
}
void loop() {
Serial.println("Hello PicAxe!"); // Send a message to the PicAxe
delay(1000); // Wait for 1 second before sending the next message
}
On the PicAxe side, you can use the following BASIC code to receive and display the message:
' PicAxe BASIC code to receive data from Arduino
main:
serin B.2, N4800, b0 ' Receive data on pin B.2 at 4800 baud
sertxd ("Received: ", b0, 13, 10) ' Send received data to the PC via serial
goto main ' Repeat the process
Troubleshooting and FAQs
Common Issues and Solutions
Problem: The PicAxe does not respond to programming commands.
Solution: Check the serial programming cable connections and ensure the correct COM port is selected in the PicAxe Programming Editor.
Problem: The microcontroller resets unexpectedly.
Solution: Verify the power supply voltage is within the specified range (2.0V to 5.5V). Add a decoupling capacitor if necessary.
Problem: I2C communication is not working.
Solution: Ensure pull-up resistors (typically 4.7 kΩ) are connected to the SCL and SDA lines. Check the wiring and device addresses.
Problem: Analog readings are inaccurate.
Solution: Ensure the analog input voltage does not exceed the supply voltage. Use proper grounding and shielding to reduce noise.
FAQs
Q: Can the PicAxe 18M2+ run on batteries?
A: Yes, it can operate on batteries as long as the voltage is between 2.0V and 5.5V.
Q: What is the maximum current output of the I/O pins?
A: Each I/O pin can source or sink up to 20 mA, with a total maximum current of 90 mA for all pins combined.
Q: Can I use the PicAxe 18M2+ with a breadboard?
A: Yes, the 18-pin DIP package is breadboard-friendly, making it easy to prototype circuits.
Q: Is the PicAxe 18M2+ compatible with other microcontrollers?
A: Yes, it can communicate with other microcontrollers (e.g., Arduino) via serial, I2C, or SPI protocols.