Project Planning - Part 1
Although I have many completed projects to post, I thought I'd take a minute to write about how I am starting to plan my electronics projects.
I used to think of an idea, draw a schematic, breadboard it, and modify as needed. This worked for small projects. As the projects became larger and more sophisticated, modifications became expensive in both money and time. I've wasted months, and in the case of one on-again-off-again project, over a year. Although I hate the corporate environment, it has taught me one thing: project requirements.
My problem in a nutshell in a thought process that leads to feature creep. I know anyone out there with any sort of hobby involving building something will feel my pain. Let's say I decide to build myself a little radio-controlled car. OK, what do I need?
- Remote control (let's say I'll use the PC as my remote)
- Write a GUI that sends things over the serial port
- A RS-232 - UART level shifter (MAX232, etc.)
- An RF transmitter module
- A microcontroller
- Two drive wheels and a castor wheel
- Two motors (differential drive)
- Two motor drivers
- AA Batteries and holder (we like to start simple)
- A voltage regulator to lower the battery voltage for the microcontroller
- An RF receiver module
- Building materials for small chassis
That's all well and good, but then I start to think, "I'm not using that microcontroller to its full potential!" I know! I'll add headlights that I can toggle with the remote control. I already have the lamps, so why not? Also, I have pulse-width modulation pins on the chip. Let's add a speed control. Now what do I need?
- Remote control (let's say I'll use the PC as my remote)
- Write a GUI that sends things over the serial port
- A RS-232 - UART level shifter (MAX232, etc.)
- An RF transmitter module
- A microcontroller
- Two drive wheels and a castor wheel
- Two motors (differential drive)
- Two motor drivers
- AA Batteries and holder (we like to start simple)
- A voltage regulator to lower the battery voltage for the microcontroller
- An RF receiver module
- Building materials for small chassis
- Lamps and sockets
- Drivers for lamps
- Driver circuitry to interface PWM to motor drivers
I won't be able to see it from the computer. What if I end up smashing it into a wall? I need to prevent it from crashing. I'll add a proximity sensor that will stop the motor when I get too close to a wall. If I get too close to something, there won't be any room to turn. We need the ability to put the motors in reverse. Also, I need to be able to debug this thing, and it would be cool to be able to see how far the sensor says it is from a wall, so the car should be able to send data back.
- Remote control (let's say I'll use the PC as my remote)
- Write a GUI that sends things over the serial port
- A RS-232 - UART level shifter (MAX232, etc.)
- An RF
transmittertransceiver module
- A microcontroller
- Two drive wheels and a castor wheel
- Two reversible motors (differential drive)
- Two motor drivers
- AA Batteries and holder (we like to start simple)
- A voltage regulator to lower the battery voltage for the microcontroller
- An RF
receivertransceiver module - Building materials for small chassis
- Lamps and sockets
- Drivers for lamps
- Driver circuitry to interface PWM to motor drivers
- Ultrasonic proximity sensor
That's fine. But, what does it do? It just moves around. It should do work. Lets put a robotic arm on top of it. Also, since it's remotely controlled, I need to be able to see what it's doing. I'll add a wireless video camera to it.
- Remote control (let's say I'll use the PC as my remote)
- Write a GUI that sends things over the serial port
- A RS-232 - UART level shifter (MAX232, etc.)
- An RF transceiver module
- A microcontroller
- Two drive wheels and a castor wheel
- Two reversible motors (differential drive)
- Two motor drivers
- AA Batteries and holder (we like to start simple)
- A voltage regulator to lower the battery voltage for the microcontroller
- An RF transceiver module
- Building materials for small chassis
- Lamps and sockets
- Drivers for lamps
- Driver circuitry to interface PWM to motor drivers
- Ultrasonic proximity sensor
- Robot gripper (a whole project in itself)
- Wireless video
The gripper and video weight too much. We're going to need stronger motors. Strong motors need more than just AA batteries. We're going to need sealed lead-acid or gel-cell batteries. The chassis can't support the new battery size. Let's make a bigger chassis. And now we need so sort of quick connector to the battery terminals so I can easily charge it. Charging it! I almost forgot! We need a battery charger now too.
- Remote control (let's say I'll use the PC as my remote)
- Write a GUI that sends things over the serial port
- A RS-232 - UART level shifter (MAX232, etc.)
- An RF transceiver module
- A microcontroller
- Two drive wheels and a castor wheel
- Two strong reversible motors (differential drive)
- Two motor drivers
AA Batteries and holder (we like to start simple)Gel-cell battery- A voltage regulator to lower the battery voltage for the microcontroller
- An RF transceiver module
- Building materials for
smalllarge chassis - Lamps and sockets
- Drivers for lamps
- Driver circuitry to interface PWM to motor drivers
- Ultrasonic proximity sensor
- Robot gripper (a whole project in itself)
- Wireless video
- Gel-cell battery charger
- Quick battery connectors
Bad news: the motor driver isn't actually able to drive as much current as the motors will require. I know! I'll build my own H-bridge. I need to heat-sync those FETs, too. Also, if I try to go over an object that is too high, my motors might stall. I should cut the power to them in that case to prevent damage and fire. I'll add temperature sensors to them. Since I'm already adding temperature sensors, I may as well add one for the battery, too, just in case.
- Remote control (let's say I'll use the PC as my remote)
- Write a GUI that sends things over the serial port
- A RS-232 - UART level shifter (MAX232, etc.)
- An RF transceiver module
- A microcontroller
- Two drive wheels and a castor wheel
- Two strong reversible motors (differential drive)
Two motor driversFETs for H-bridge- Heat syncs (need to calculate how large)
- Gel-cell battery
- A voltage regulator to lower the battery voltage for the microcontroller
- An RF transceiver module
- Building materials for large chassis
- Lamps and sockets
- Drivers for lamps
- Driver circuitry to interface PWM to motor drivers
- Ultrasonic proximity sensor
- Robot gripper (a whole project in itself)
- Wireless video
- Gel-cell battery charger
- Quick battery connectors
- Three temperature sensors
New problem: the microcontroller's progrem ROM isn't large enough now that we need to add floating point libraries for the temperature sensors. We'll make it bigger. Also, the wireless video uses a web interface. Why don't I make my remote control web-based? Then I can control it from my laptop when I'm not home!
- Remote control (let's say I'll use the PC as my remote)
Write a GUI that sends things over the serial portWeb server software- A RS-232 - UART level shifter (MAX232, etc.)
- An RF transceiver module
- Web page code (HTML)
- Web page backend (Perl, C, etc.)
- A larger microcontroller
- Two drive wheels and a castor wheel
- Two strong reversible motors (differential drive)
- FETs for H-bridge
- Heat syncs (need to calculate how large)
- Gel-cell battery
- A voltage regulator to lower the battery voltage for the microcontroller
- An RF transceiver module
- Building materials for large chassis
- Lamps and sockets
- Drivers for lamps
- Driver circuitry to interface PWM to motor drivers
- Ultrasonic proximity sensor
- Robot gripper (a whole project in itself)
- Wireless video
- Gel-cell battery charger
- Quick battery connectors
- Three temperature sensors
Trust me, the list goes on. I can add external EEPROM to be able to prerecord routines. I can build an actual remote control with a lot of switches and buttons. I can add a command line interpretter to called prerecorded routines without opening the video, requiring another microcontroller. I can add a status lights. I can add a speaker and sound chips so my car can talk like KITT in Knight Rider.
This doesn't include the large amount of source code that needs to be written to progress from one step to the next. Source code may not seem like much because it's free. Rob Walling once said, "Open source software is free if your time is worth nothing." The same principle applies to this. I want to build the robot, which is fun for me. Writing web code and GUIs is a large part of this project now. That's work to me, not fun. Why should I do something I don't like as a hobby?
The saddest part about everything above is that this really happened to me. I bought books to do all this. I bought parts for a project that became so large, I didn't want to build it anymore. The plans grew and grew. The final plans evolved from a $70 car into an adult-size Power Wheels that can transform into a 20-foot tall bipedal robot that would cost thousands of dollars and well over a year to make.
I never built it. I don't currently plan to build it. But, I keep the plans in my binder, just in case I'm that bored when I'm older.