PICAXE Microcontroller Projects For Makers
By Simon Carter
()
About this ebook
This eBook contains detailed instructions on how to build and program 15 different PICAXE Microcontroller projects. It is very comprehensive and includes all of the programs as well as circuit diagrams, parts lists, photographs and construction details. There are abundant details on every aspect of each project and detailed descriptions of how the circuits and programs work together. Any maker with a basic understanding of electronics and the PICAXE programming tools will be able to successfully build and program these projects.
Simon Carter
A business analyst by day, an electronic music producer and author by night... That's when the dreams start to come alive!
Read more from Simon Carter
Related to PICAXE Microcontroller Projects For Makers
Related ebooks
Simulation-Driven Electronics Design: The easy way to design your own electronics projects (English Edition) Rating: 0 out of 5 stars0 ratingsProgramming Arduino with LabVIEW Rating: 3 out of 5 stars3/5Brilliant LED Projects: 20 Electronic Designs for Artists, Hobbyists, and Experimenters Rating: 3 out of 5 stars3/5Internet of Things with Arduino Blueprints Rating: 0 out of 5 stars0 ratingsPractical Electronic Design for Experimenters Rating: 0 out of 5 stars0 ratingsAutodesk Fusion 360 PCB Black Book (V 2.0.15509) Rating: 0 out of 5 stars0 ratingsLearning C for Arduino Rating: 0 out of 5 stars0 ratingsRaspberry Pi LED Blueprints Rating: 0 out of 5 stars0 ratingsArduino Electronics Blueprints Rating: 4 out of 5 stars4/5Arduino: The Ultimate Guide to Arduino for Beginners Including Arduino Basics, Tips & Tricks, Projects, and More! Rating: 0 out of 5 stars0 ratingsIntelligence Devices for Smart World Rating: 0 out of 5 stars0 ratingsImplementing a Cpu using Fpga Rating: 0 out of 5 stars0 ratingsArduino Made Simple: With Interactive Projects Rating: 0 out of 5 stars0 ratingsSolidWorks Electrical 2020 Black Book Rating: 5 out of 5 stars5/5Fearless Experiments With Microcomputers Rating: 0 out of 5 stars0 ratingsMicrosoft .NET Gadgeteer: Electronics Projects for Hobbyists and Inventors Rating: 0 out of 5 stars0 ratingsArduino for the Cloud:: Arduino Yun and Dragino Yun Shield Rating: 0 out of 5 stars0 ratingsMake Your Own PCBs with EAGLE: From Schematic Designs to Finished Boards Rating: 5 out of 5 stars5/5Learn Arduino Prototyping in 10 days Rating: 0 out of 5 stars0 ratingsPython for Microcontrollers: Getting Started with MicroPython Rating: 0 out of 5 stars0 ratingsArduino BLINK Blueprints Rating: 0 out of 5 stars0 ratingsBook of Making Volume 2: 50 Projects for Makers and Hackers Rating: 0 out of 5 stars0 ratingsDigital LED Thermometer with Microcontroller AVR ATtiny13 Rating: 5 out of 5 stars5/5BeagleBone Robotic Projects Rating: 5 out of 5 stars5/5Digital Electronics with Arduino: Learn How To Work With Digital Electronics And MicroControllers Rating: 5 out of 5 stars5/5PICAXE Microcontroller Projects for the Evil Genius Rating: 0 out of 5 stars0 ratingsAbc of Power Modules: Functionality, Structure and Handling of a Power Module Rating: 0 out of 5 stars0 ratingsRaspberry Pi Home Automation with Arduino - Second Edition Rating: 0 out of 5 stars0 ratings
Electrical Engineering & Electronics For You
Arduino | Step by Step Rating: 0 out of 5 stars0 ratings2022 Adobe® Premiere Pro Guide For Filmmakers and YouTubers Rating: 5 out of 5 stars5/5The Innovators: How a Group of Hackers, Geniuses, and Geeks Created the Digital Revolution Rating: 4 out of 5 stars4/5How Do Electric Motors Work? Physics Books for Kids | Children's Physics Books Rating: 0 out of 5 stars0 ratingsA Mind at Play: How Claude Shannon Invented the Information Age Rating: 4 out of 5 stars4/5Simple, Practical Electronics Rating: 5 out of 5 stars5/5Understanding Electricity Rating: 4 out of 5 stars4/5How to Diagnose and Fix Everything Electronic, Second Edition Rating: 4 out of 5 stars4/5Electricity for Beginners Rating: 4 out of 5 stars4/5Business Analytics Rating: 4 out of 5 stars4/5Basic Electricity Rating: 4 out of 5 stars4/5Beginner's Guide to Reading Schematics, Fourth Edition Rating: 4 out of 5 stars4/5Digital Filmmaking for Beginners A Practical Guide to Video Production Rating: 0 out of 5 stars0 ratingsINCOSE Systems Engineering Handbook: A Guide for System Life Cycle Processes and Activities Rating: 5 out of 5 stars5/5Flexible Power Transmission: The HVDC Options Rating: 5 out of 5 stars5/5Electrical Engineering | Step by Step Rating: 0 out of 5 stars0 ratingsElectrical Engineering Rating: 4 out of 5 stars4/5Programming the Raspberry Pi, Third Edition: Getting Started with Python Rating: 5 out of 5 stars5/5Information Theory: A Concise Introduction Rating: 0 out of 5 stars0 ratingsArduino Essentials Rating: 5 out of 5 stars5/5Electric Circuits Essentials Rating: 5 out of 5 stars5/5Getting Started with Electronic Projects Rating: 5 out of 5 stars5/5Basic Electronics: Book 2 Rating: 5 out of 5 stars5/5CNC Machining Certification Exam Guide: Setup, Operation, and Programming Rating: 0 out of 5 stars0 ratingsCircuitbuilding Do-It-Yourself For Dummies Rating: 0 out of 5 stars0 ratingsYour Face Belongs to Us: The Secretive Startup Dismantling Your Privacy Rating: 4 out of 5 stars4/5Common LISP: A Gentle Introduction to Symbolic Computation Rating: 4 out of 5 stars4/5Digital Marketing All-In-One For Dummies Rating: 4 out of 5 stars4/5
Reviews for PICAXE Microcontroller Projects For Makers
0 ratings0 reviews
Book preview
PICAXE Microcontroller Projects For Makers - Simon Carter
This book developed from my experiments with PICAXE microcontrollers. It is not intended to be a comprehensive overview of PICAXE hardware and software. There are already several excellent books, manuals and on line resources that provide very detailed and in depth descriptions of the PICAXE BASIC language and commands as well as PICAXE chip types, pin-outs, capability and configuration.
What will be provided in this book is the specific detailed information that you will require to build and program a number of interesting PICAXE based projects. This will include an overview of the project, circuit diagram, parts list, construction technique, listing of the BASIC program together with a description of how the circuit and program work. To begin with I will start off with a couple of simple projects and then progress to more complex projects later. Feel free to skip ahead if you are already familiar with the fundamentals and want to progress to something more advanced.
Pre-requisites are that the reader will have some basic electronics knowledge, will use the existing resources available, will have the PICAXE programming software and download cable and the basic know how to use them. So rather than a detailed overview of the PICAXE, this is more a book about the practical aspects of building a project, programming it and getting it working. In the resources section I will suggest parts sources, on line resources and some excellent books on PICAXE fundamentals. Together these constitute far more information than you will ever need to build and program the projects in this book.
Each project will include photographs of the project as I have built it on a breadboard for experimentation as well as the completed circuit built on prototype board (also known as protoboard or vector board). This is so that the reader will have an idea of how each circuit is put together as a finished project. For the circuits in these projects, component location is not critical, so the reader may place components on protoboard as they see fit and provided they are connected as per the circuit diagrams, they should work. In some cases, where it makes sense I have mounted the project in a project box and in these cases will provide the dimensions of the box required and any applicable construction details.
Each project includes a parts list and for some components a suggested source and part number. This is so that the reader can see an example of the less common components that are used in the projects. In many cases it is not compulsory that the reader use the exact parts suggested and you are encouraged to use whatever you may already have on hand or are able to source easily and inexpensively. The only requirement is that you know it will work as a substitute.
For example I use a variety of power sources with these projects. All circuits are shown with a standard reference power of +5 Volts which assumes you are using a benchtop supply or wall adapter and most calculation examples assume a standard 5V supply. However most of the projects will work with 3V or 4.5V which is standard with two or three 1.5V cells. (An exception to this is the projects using LCDs which require at least 4.5V). Typically a battery holder with 2 or 3 AA or AAA cells will work and you will see that we use a variety of these although any one of them would work for almost all of the projects. It is usually much easier and less expensive to use batteries instead of a dedicated power supply for each project.
All projects on prototype board are connected on the backside using ad hoc point to point wiring and then soldered. Typically I use 30 AWG wire wrap wire for this.
You are encouraged to make modifications to the circuits and code as you see fit. If you feel for example that you want to have an on/off power switch and I’m not using one in the design, feel free to implement that in your own project. Want to put your project in a box? Add lights? Add sounds? Go ahead! Experiment, modify, innovate and implement it!
As a final note I’d like to say that putting together a book with this level of complexity is not easy and has taken many hours of experimentation, building, photography and editing. I have endeavoured to get the technical details correct and I hope that you will be able to understand how these projects work and build functioning circuits from the text and drawings as given.
Resources
Parts Sources
Here are some suggested parts sources, many of which I have used to order parts. This is by no means an exhaustive list, but here you will find all the parts you need to complete projects in this book. For some parts, for example joysticks used in a project, I will suggest a source (and the source’s part number when available).
Solarbotics
Sparkfun
Adafruit Industries
All Electronics
Jameco Electronics
Mouser Electronics
Digikey
DX
Elenco Electronics
Sayal
A1 Electronics
Element 14
Creatron
Robotshop
Recommended Books
Here are two excellent books that are recommended:
PICAXE Microcontroller Projects For The Evil Genius by Ron Hackett and
Programming and Customizing the PICAXE Microcontroller by David Lincoln
In particular Ron Hackett’s book is excellent. This was the first book I used to learn how to program the PICAXE. It has very good chapters for the beginner on getting started with programming the PICAXE as well has how to structure your code and comment it effectively.
I have tried to emulate Mr. Hackett’s style when it comes to structure, comments and overall program flow as I think it is a very sensible and clear way to code. I also learned a lot from him on how to interface parallel LCD displays and I have used a very similar method as his to get the LCD displays in these projects to work. That said, all of the projects, code and circuit design found in this book are unique and of my own invention.
I also continue to learn about PICAXE microcontrollers from Mr. Hackett’s excellent articles in Nuts and Volts Magazine and encourage you to do likewise.
Online resources
The first place that you should look on line for PICAXE information is the Revolution Education website www.picaxe.com
Here you will find all of the software you will need including the PICAXE Programming Editor, AXEpad Editor (for Mac and Linux users), AXE027 USB Cable driver etc. You will also find a project gallery, help forum, list of software commands with code examples and most helpfully the PICAXE manuals. These specify all of the different types of PICAXE chips, their pin outs, software commands, code examples and circuit examples in detail.
The PICAXE manual is divided into 4 separate pdf downloads:
Section 1 - Getting Started
Section 2 - BASIC Commands
Section 3 - Microcontroller interfacing circuits
Section 4 - Using Flowcharts
It is recommended that you download all of them and keep them on your computer for handy reference.
Other suggested websites where you will find helpful information as well as project build instructions and code are:
www.hackaday.com
www.pyroelectro.com
www.instructables.com
www.inklesspress.com
www.joliebrisemodels.co.uk
Project Software Programs, Component Specifications and Circuit Diagrams
Copies of the code used in these projects, component specifications, circuit diagrams and any future corrections, notes etc. can be found on my web site at:
http://www.squeezebyte.com/
In order to retrieve some of these files you will require a Dropbox account. You can create a free account at www.dropbox.com.
Back to Top
Project 1 – A programming jig for PICAXE
Overview
Many people build projects on a breadboard first to try them first just as we will do for each project. They are also often content to leave their project at the breadboard stage. The PICAXE download cables (AXE027 and AXE026) terminate in a 3.5 mm stereo plug. This plug is then inserted into a 3.5mm jack which is then connected to the PICAXE chip to be programmed. Figure 1-1 shows a typical 3.5mm jack and Figure 1-2 shows the AXE027 download cable.
Figure 1-1 - the 3.5mm programming jack.
Figure 1-2 - PICAXE AXE027 programming cable.
This immediately leads us to a couple of issues. The pins on the 3.5 mm jack do not fit in a standard breadboard and if forced in, the connection is not reliable. Also figuring out the 3.5mm jack pin connections each time is prone to errors.
So building a simple jig for reliably connecting your PICAXE download cable to your breadboard will be our first project.
Circuit Diagrams
Figure 1-3 shows the circuit diagram of the programming jig. The stereo plug on the AXE027 programming cable will plug into J1 the 3.5 mm jack, while pins P1, P2 and P3 will plug into your breadboard.
In Figure 1-4 we see the complete circuit diagram for a jig correctly connected to program a 08M2 PICAXE. Here there is a 0.1 uF capacitor is connected from +5 volts to ground. This is required on all PICAXE projects to bypass any noise on the +5 Volt power line to ground but is not part of the jig. Rather it would be connected as close to the PICAXE +5V and ground pins as possible.
At this stage we should also make a very important point about PICAXE circuits. If you remove the jig after programming or later build circuits without the programming circuit in place, be sure to place a 100k resistor between the PICAXE Serial-in pin and ground as per the PICAXE specifications. If you don’t do this and leave the Serial-in pin floating, your circuit will not work or will not work reliably.
Figure 1-3 - programming jig circuit diagram.
Figure 1-4 - circuit diagram of the programming jig connected to an example circuit.
Programming jack connection details
In Figure 1-5 we see the programming jack installed on a prototype board with each output jumper clearly labelled. The jumpers are standard bread board prototyping jumpers with one end cut off, stripped and then solder & wired to the protoboard.
Figure 1-5 - the programming jig on protoboard.
Figure 1-6 shows the jig as it would normally be used plugged into a breadboard.
Figure 1-6- the programming jig plugged into a breadboard.
In Figure 1-7 the pins on the J1 programming jack are identified. This picture shows the location of the Ground, Serial-in and Serial-out pins on the jack. Note that this is the TOP view of the jack.
R1 and R2 are required as part of the programming circuit and are used to adjust the voltage level between the PICAXE IC and the programming cable. They are also required to pull the PICAXE Serial-in pin to ground during circuit operation if you do not have a dedicated pull down resistor on this pin.
Figure 1-7- the 3.5mm jack connections.
Parts List
In order to build a programming jig you will require the following parts:
1 – Protoboard approximately 2 x 2.75
(DX.com)
1 - 3.5mm stereo jack (Solarbotics 17850, Sparkfun PRT-08032)
3 - Jumper wires (Sparkfun PRT-11026)
1 - 10K resistor
1 - 22K resistor
Solder & Wire
Back to Top
Project 2 – Blink an LED
Overview
As an introductory PICAXE build and program project we will start with something very simple – making an LED blink. We will also take the opportunity to test out the programming jig built in Project 1 with this simple circuit. If you find this too basic, feel free to skip to the next project. For this project we will look at the options of using a pre-configured PICAXE 08M2 protoboard kit or building the entire project from scratch on a breadboard.
As shown in Figure 2-1 for the first option we are using the AXE021, a small inexpensive PICAXE-08 protoboard kit from Revolution Education. This comes with a small pre-marked protoboard and the basic hardware you need to populate it. For first time users this makes it easy to assemble a simple PICAXE project and get all the connections right. This kit does not come with a 08M2 microcontroller, programming cable, LED, current limiting resistor or battery holder. The user needs to provide these separately.
As another important