There are actually two PIC16F84's on the hexapod. The main processor contains all of the walking code and generates positioning pulses for all 12 servos. Twelve of the 13 I/O lines are used for switch inputs - one on the bottom of each foot and a contact sensor in the front of each leg. The servo pulses are output sequentially on the last I/O line. All the second processor does is de-multiplex the pulses from the main processor and send them to the appropriate servo
Wednesday, December 16, 2009
PIC16F84 based Hexapod Robot
There are actually two PIC16F84's on the hexapod. The main processor contains all of the walking code and generates positioning pulses for all 12 servos. Twelve of the 13 I/O lines are used for switch inputs - one on the bottom of each foot and a contact sensor in the front of each leg. The servo pulses are output sequentially on the last I/O line. All the second processor does is de-multiplex the pulses from the main processor and send them to the appropriate servo
R/C Transmitter Range Tester
This project suitable for people who like with the transmitter system. It's an electronic analog project. You don't have to programming the IC to build it. The function of this electronic project is to measure the RF power being radiated from a transmitting antenna.
Among the Amateur Radio fraternity, a device such as the one described here would otherwise be known as a Field Strength Meter (FSM). Its main purpose would be to check that RF power is being radiated from a transmitting antenna. Some FSMs are tuneable across a wide range of frequencies, which allows the device to work with different transmitters and antennae - usually from HF to VHF and beyond. A difference with this unit is that it is only sensitive to those signals in the R/C section of the radio spectrum. The on-board trimmer allows you to tweak for maximum signal strength of your frequency of choice, whether it be 27MHz AM, or 40MHz FM.
Tuesday, December 15, 2009
AVR Shark Tag Project
The project used the Atmel Mega32 microcontroller to develop the core platform and functionality of a data archival tag. The project use temperature and pressure as sensor variable. The tasks ranged from logging sensor data to developing a simple user interface that requires only the addition of a laptop and a custom RS232 serial cable in the field.
It used an off-the-shelf SD (Secure Digital) card using flash memory for large capacity multi-read/write data storage. The microcontroller’s ADCs (analog to digital converters) were used to convert analog voltages produced by select sensors into digital format.
XBOX Controller
The message should be self explanatory. So the controller (in this case the psp or nds) polls inputs every so often and then dumps the state. I had it all working at every 100ms, but then something happened - not sure what - so I backed it down to every 250ms. The bottle neck is on the BS2, and to keep things consistant, I just kept all polling intervals the same.
The app on the gumstix consists of 2 threads. One listens for udp commands and the other babbles out the serial port at 38.4k. The serial thread wakes up every 250 ms and sends the status of all buttons to the BS2. The status is stored in global variables that are updated by the udp thread whenever the controller sends an update.
The serial protocol to the BS2 is simple. A 'A' signifies a start of message followed by 8 bytes of status for each of the buttons currently supported. The PIC decodes this message and tells the servos to respond accordingly.
xbc-c-pic.
Sunday, December 13, 2009
PICkit 2 Starter Kit
Features:
- Low Pin Count demo board supporting 8/14/20-pin mid range PIC microcontrollers.
- 20-pin PIC16F690 Midrange microcontroller. Note: Requires the AC162061 ICD Header and AC164110 adapter to debug.
- A series of 12 Lessons on assembly programming that cover I/O, A/D converters, timers, interrupts, and data tables (All source code files are provided)
- Getting Started in PICBASIC PRO tutorial on developing and debugging in BASIC with a FREE microEngineering Labs PICBASIC PRO™ Demo Compiler (contained on the PICkit 2 CD)
- HI-TECH PICC™ LITE C Compiler with MPLAB IDE.
Energy Efficient AMD Processors Reach Retail
Now, the new AMD processors, the Athlon 64, Athlon 64 X2 and Sempron processors are currently available in several stores in Japan.
A number of stores in Japan have begun to sell energy efficient versions of AMD Athlon 64 X2 3800+ and 4200+ models, which consume 65W, down from typical 89W thermal design power (TDP).
In terms of energy consumption, laptop computers consume much less power, and they run on DC voltage — an advantage for off-grid users.
Continuous Microchips Glucose Monitoring Shows Promise
From the company technology page:
MicroCHIPS' technology is based on proprietary reservoir arrays that are used to store and protect chemical sensors or potent drugs within the body for long periods of time. These arrays are designed for compatibility with preprogrammed microprocessors, wireless telemetry, or sensor feedback loops to provide active control. Individual device reservoirs can be opened on demand or on a predetermined schedule to precisely control drug release or sensor activation.
Our reservoir-based platform can also be used in passive control systems without microprocessors or power sources. MicroCHIPS' passive systems are designed to release or expose their contents based on the controlled degradation of polymeric matrices over time. These systems form the basis for miniature insertable devices that provide maximum flexibility for device placement.
Samsung ships 8GB microchips
Wednesday, November 25, 2009
Microchip 16 bit design contest
Microchip/Circuit cellar have announced a 16 bit embedded control design contest - the idea is to promote the use of the dsPIC family of controllers.
Microchip is giving out a generous sample of components to the contest participants - here is what I got:
I find the ENC28J60 device very interesting - it’s an ethernet controller using which your microcontroller can communicate over an ethernet LAN!
Any good ideas to create a prize winning entry?
USB Interfacing with GNU/Linux and PIC 18F2455 - Part 3
Completed interfacing an LCD panel with the USB PIC, thanks to Anish. We are still not able to get interrupt URB’s working properly - except that, everything is OK.
Coming next: A comprehensive tutorial on developing USB gadgets with GNU/Linux and PIC! We hope to get it published as an LDP HOWTO.
USB Interfacing with GNU/Linux and PIC 18F2455 - Part 2
It’s no wonder that there are so few complete resources on writing USB firmware on the net - there is only one word to describe the process - `tedious’.
The last few days have been spent reading USB Complete - this is the only good book available to help you get along … it’s extremely well written. This book, combined with the code ofPUF framework seems to be the best combination for getting started. Another great resource is the code written by Bradley A Minch available from here. I prefer the PUF code because it’s better structured - but there seems to be some trouble with the configuration bit definition in it.
Our development environment is now stable. The programmer, `odyssey’, is working perfectly and SDCC + gputils seems to be generating correct code. Unfortunately, we were unable to get PUF running on our 18F2455. So we began taking out bits and pieces of code from PUF and started testing them independently. We were able to go as far as initializing endpoint 0 and getting an OUT transaction on it. Now the trouble with USB is that it has a tricky state machine - the way you handle the current transaction depends on what the previous transaction was. You will soon reach a point where you won’t be able to test things with 10-20 lines of code - you will have to have the whole state machine running smoothly. So yesterday, Anish `cleaned up’ the PUF code taking out a lot of things which were not going to be useful for us at present but keeping the core intact. And, magically, everything started working. Enumeration was succesful and we have endpoint 0 ready to accept control transfter requests!
Understanding Microchip’s description of the working of their USB SIE (Serial Interface Engine) is another headache.
Now we have to get some `vendor’ requests working and maybe configure another endpoint to do interrupt transfer. I will think of writing a proper tutorial after that.
USB Interfacing with GNU/Linux and PIC 18F2455 - Part 1
Even though USB has become wildly popular, there are not too many resources on the web which gives you a tutorial introduction on how to go about developing USB peripherals and controlling them with GNU/Linux. Anish and myself have started work on creating a simple USB gadget - we intend to document the process thoroughly so that others can do the same with the mininum of effort.
Choosing the proper microcontroller and setting up a decent development environment is the first headache. When it comes to USB aware uC’s, there is not too much of a choice - it seems that the USB PIC18F devices are the only ones commonly available in India. We purchased a few PIC18F2455 devices from Future Techniks. These are 28 pin devices which are USB 2.0 compliant. Now comes the issue of finding out a proper `burning’ software and hardware. The trouble is that most of them are written for Windows. Anish was succesful in running Free PicPgm under Wine. But I am not satisfied until I find a a 100% GNU/Linux solution. We spent lots of time exploring various possibilities which included using bootloaders - Microchip has an `official’ bootloader whose working is fully documented. The trouble is that there is no GNU/Linux frontend for it - so we had to write a Python program to parse Hex files and deliver it to the bootloader in the proper format - the effort was abandoned midway because we thought it would take some time to test the code thoroughly.
Luckily, we discovered Odyssey, a very well written program for downloading code to PIC devices. It works well with the classical David Tait high voltage PIC programmer. Only trouble was creating two config files - one which describes the hardware (which parallel port pin controls which pin on the PIC) and another one which describes the PIC18F2455 device (device id, config bit masks, amount of code memory etc). The programmer has been working reliably for the past two days.
Now comes the issue of choosing development tools - PIC’s are usually programmed in assembly - they have a bizarre architecture which makes them unfriendly to C compilers. But Microchip has brought out a few changes in the 18F family - it’s said that these changes make the processor more compiler friendly. Anyway, I wish to avoid assembly coding as far as possible. The only freely available C compiler for the PIC’s is SDCC which has support for PIC18F devices. We used a version of the compiler bundled with PUF - the PIC USB Framework. It seems the compiler is not very good at generating compact code - but let’s hope it does a good job generating code! We did a few tests yesterday - and they were OK. But the linker, `gplink’ seems to be having a bug (is it a bug - not sure). SDCC lets us declare arrays in program memory space by using the `code’ directive. Thus, we can do:correct
code unsigned char a[] = {0xe, 0xd, 0xe, 0xef};
This places data in the `code’ section of the resulting object file. The linker, `gplink’, objects to this and generates an assertion failure when it tries to produce a list file.
Friday, November 13, 2009
Classic LED 7-Segment Displays
Now, I have 2 models of the classic LED 7-Segment as shown in the picture below: HP 5082-7414 from HP is on the left. It’s a 4-digit Red LED 7-Segment very nice for wristwatch. The one on the right is an 2-digit Red LED 7-Segment from an unknown maker. It can be used in a wristwatch too (with a little bit bigger case).
Based on my inspection, I have made symbols for these displays with Eagle 5.4.0 free version. The displays are common cathode and the symbols are below
The PCB footprints are as the following (DIP 12)
I have made simple clocks using these displays and PIC16F887. The real thing looks much better than the photo. The displays are bright red and sun light viewable. Very COOL!!! They are on my computer desk and I love to see them very often.
Each clock consumes about 0.25W (50mA, 5V) when the PIC16F887 operates at 250kHz (display refresh rate is about 61Hz). The amount of consumed current can be reduced significantly if I use some current limit resistors. But the displays will be dimmer than without resistors. I will try to use PWM for reducing the power consumption as I don’t want to put 8 resistors into my design. The schematic/PCB and firmware including source code in MikroC will be made public once I have complete all of the designs. I will even have kits for sell if my time permitted.
Small LED dot matrix development board
The schematic is as the following:
The PCB is single sided so I can make it at home. Most of the components are SMD to keep small footprint of the board. The PCB size: 58.4mm x 46mm
Acutally, I made a PCB and installed all components but the board didn't work :p. It was working when I tested the schematic on breadboard (with through hole version of PIC16F887). I think the SMD PIC16F887 may be broken or the PCB is bad but I just don't have time to figure out the problem. I will try new PCB and PIC16F887.
USB Coin/Button Cell Battery Charger
Just recently, I have found a rechargeable coin cell battery at Sparkfun.com. It provides 3.7 V. at 200mAh. I don't know that my projects will work at 3.7 V. or not. But, I want to give it a try. For portability, I want to charge the battery from my computer's USB port. So, I designed a USB coin cell battery + charger breakout board. Like many simple battery charger, I use MAX 1555 as the controller of the charger.
The schematic:
The single sided PCB (40mm x 30mm):
The LED goes off when the battery is fully charged (but the charger is still charging).
Please note that the schematic/PCB are just the design and I haven't made it yet. The parts are ordered and I will update when I complete the hardware.
Thursday, November 12, 2009
Square Wave output from DS1307
With this configuration (hardware+software), the LED was blinking at 1 time/second but the blink pattern was not my expectation. The LED is Off when the clock is updated and it is On at 0.5 second later. Quoted from the Control Register section of the DS1307's Datasheet:
I want the reverse pattern (the LED is On when the time is updated and it is Off at 0.5 second later). So, I will add an invert logic before the LED like:
I have a plan to use this square wave output of the DS1307 for generating an interrupt to instruct the MCU to read time from the DS1307 and I will keep in mind that "The clock is updated at the falling edge of the square wave". The complete clock will be posted here later.
3D Electronics Design
I have been playing with Eagle3D for sometimes. However, I cannot manipulate my design interactively and cannot export models to render in other 3D renderers. Just today, I found that blueroomelectronics's designs were made with Google SketchUp. So, I downloaded and installed it. The software is very easy to use. But, there is no electronics component library. However, there are some components available for you to download from google 3D warehouse. If you want anything that not available in the google 3D warehouse, you have to make it by yourself.
Below is my first try on making a PIC16F887 with TQFP-44 package.
I hope that I will come up with complete 3D designs of my clock projects. It's very fun to do these things.
Setting Internal Oscillator for PIC16F627A
Multisim Analog Devices Edition 10.0 Free Download
Not only analog circuit, but it also simulates digital circuit as one may call it 'Mixed-Mode Simulator'.
Some features and limitations:
- Build simulated component evaluation circuits to quickly assess behavior of over 800 Analog Devices operational amplifiers, switches and voltage references
- Examine the unit under test in the intended circuit topology with up to 25 components
- Use built-in instruments and analyses including oscilloscopes and worst-case analysis
- Swap components easily to pinpoint best design options
- Link to the Analog Devices Design Center for more online evaluation tools
- Instantly access product pages and datasheets of each Analog Devices component
- Upgrade to a full edition of NI Multisim to complete designs and transfer to board layout with NI Ultiboard
Wednesday, November 11, 2009
New Micros NMIS-9003 Real-Time Clock Board
We used the excellent New Micros FORTH boards in the Microship project, and find ourselves with a few parts left over. This is part of the 2x4 series of stackable boards, which are very easy to use. There is a PDF data sheet here, and from the NMI website, here are the details of this board:
The NMIS-9003 Real Time Clock Board, in 2x4"s[tm] card format, provides a JEDSTACK[tm] computer system with processor-independent date and time information.
FEATURES:
- Built-in Time (hour, minute, second) and Date (year, month, week, day) counters
- 12hr/24hr clock switchover function and automatic leap year setting
- Interrupt masking
- 30 second error-adjustment function
- CMOS design includes low current consumption and backup function
The NMIS-9003 features a built-in quartz oscillator, time and date function, and CMOS circuitry for low power consumption. The EPSON 62421A Real Time Clock chip is the key part on the board. The 62421A's registers are memory mapped by the card. Its registers provide the second, minute, hour, day, month, year, day of week and control information to the processors. The 62421A can operate in either 12 or 24 hour mode. Leap year timing is automatic.
The real time information is maintained and updated through processor power down periods by the on-board, 3V lithium coin battery. Two battery sockets are installed on the board, allowing a fresh battery to be inserted in the open socket before the removal of a failing battery.
The NMIS-9003 can also provide real time interrupts to the processor. This can be useful when very low power modes are desired, in which the processor wakes up only occasionally. The NMIS-9003 can create such an interrupt once an hour, once a minute, once a second, or 64 times a second.
A Vertical Stacking Connector in the lower right hand corner (top view) provides connections to the processor's address and data bus, control signals, 5V power and ground. Address decoding of the Real Time Clock chip's space in memory is accomplished by two octal comparators and 16 two-position jumpers. The NMIS-9003 occupies 16 addresses. Any 16-byte boundary in the 64K address space of the JEDSTACK[tm] processor's bus can be selected by correct jumper placement.
Olimex MT-128 Development Board for AVR ATMega128, with JTAG
This beautiful little board for ATMega128 development was made by Olimex, and provides lots of I/O to help get your project running quickly. There are detailed specs at this Olimex page, including links to PDF manuals, demo code, schematics, and a complete open-source weather station. We only have one of these for sale; our new research vessel has standardized on the Arduino platform, so this is no longer needed. It has been tested with the supplied demo code, but never been fully in use.
FEATURES:
- MCU: ATMega128-16AI with128K Bytes Program Flash, 4K Bytes data EEPROM, 4K Bytes RAM
- JTAG connector for in-circuit programming and debugging with AVR-JTAG
- ICSP 5x2 (10) pin STKxxx compatible connector for in-circuit programming with AVR-PG1B or AVR-PG2B
- RS232 connector with TTL levels
- RS232 interface circuit with Tx, Rx signals
- RS232 DB9 female connector
- Dallas touch button port
- Frequency input
- LCD 16x2 display
- LED status
- five buttons
- Buzzer
- power supply circuit +5V, 78L05 with plug-in power jack and diode bridge
- 32 768 Hz oscillator crystal
- 16 Mhz crystall oscillator
- power supply filtering capacitor
- RESET supervisor IC ZM33064
- RELAY with 10A/250VAC NO and NC contacts with screw terminals
- extension headers for unused in the schematic ports available for external connection
- PCB: FR-4, 1.5 mm (0,062"), green soldermask, white silkscreen component print
- four mounting holes 3.3 mm (0.13")
- Dimensions: 120x38 mm (4.7x1.5")
Tuesday, November 10, 2009
New Micros NMIS-9002 3-channel, 16-bit counter
This board, part of the New Micros 2x4" series, is based on a high-performance programmable counter for system timing control. Three 16-bit counters, each with its own clock input, and OUT pin, can be clocked from D C to 8 Mhz. Under software control, the uPD71054 can generate accurate time delays.
The chip contains three counters capable of binary, or BCD, operation. There are six programmable count modes. The counters operate independently and each can be set to a different mode.
After initialization, the uPD71054 can count the delay and generate an interrupt when the task is complete, without further CPU intervention. This eliminates the need for software timing loops and frees the CPU for other tasks.
As with all the boards in this series, a Vertical Stacking Connector in the lower right hand corner provides connections to the processor’s address and data bus, control signals, 5V power and ground. Address decoding of the drivers’ space in memory is accomplished by two octal comparators and 16 two-position jumpers. Each jumper setting corresponds to the state of a particular address line. The NMIS-9002 occupies 4 address locations. Any 4-byte boundary in the 64K address space of the JEDSTACK processor’s bus can be selected by the correct jumper placement.
I used this series quite successfully during the Microship project, and this is excess inventory... only one is available.
Microchip dsPICDEM 28-Pin Demo Board with dsPIC30F2010
This unused development board is based on the Microchip dsPIC30F2010, a 16-bit,30 MIPS RISC machine optimized for motor control. This is in current production and there is a detailed dsPIC30F2010 product page that includes links to PDF data sheets and application notes.
This Starter Development Board has a socketed dsPIC30F2010 digital signal controller, power supply regulator, crystal oscillator, ICD header, serial port, power on indicator, Reset push-button, 28L SOIC layout pad and a prototyping area. It operates from a 9-volt supply, includes a power-on program that demonstrates interrupts, device I/O, and UART communications. There is a PDF Users Guide for the board here.
This is new, and arrived here with a project in mind... but we are not going to need it. Looks like a pretty capable chip, though, so if you have some serious motor control apps this is a way to get to know the device without having to cobble together a breadboard.
Arduino Duemilanove Microcontroller - ATmega168
We have fallen in love with these things here at Nomadic Research Labs, and are using 15 of them on the research vessel Nomadness to take care of all embedded control and data collection (see this blog post for overview and drawings). The Arduino boards are cheap, low-power, and exceedingly easy to use: just plug them into your Mac/Linux/Windows machine with a USB cable, run the development tools freely downloadable over here, and start playing. The language is a rich dialect of C, with such niceties as direct pin number references and painless support for I/O and serial communications, along with a very quick development cycle. The community is highly supportive... have a browse around the resources and forums at the Arduino site and you'll likely be drawn in. Since discovering these, I have abandoned all the other development boards that have accumulated here in the lab.
The Arduino Duemilanove (Italian for "2009") offered here is a microcontroller board based on the ATmega168 (PDF datasheet). It has 14 digital input/output pins (of which 6 can be used as PWM outputs), 6 analog inputs, a 16 MHz crystal oscillator, a USB connection, a power jack, an ICSP header, and a reset button. It contains everything needed to support the microcontroller; simply connect it to a computer with a USB cable or power it with a AC-to-DC adapter or battery to get started.
There are lots of shields available which plug directly into the board and provide workspace or specialized functionality (including ethernet, XBee wireless, displays, motor control, and general prototyping). We'll be adding to our inventory of these and related items as the product line develops.
Sunday, November 8, 2009
Programming Adapter with ZIF Sockets
This programming Board is designed to be used with Serial, ICP and USB programmers detailed elsewhere on this site.
PB2 board is similar to PB1 but contains ZIF sockets with 20Pin, 18Pin & 40Pin. (18pin socket may be substituted by 20pin ZIF in Kits, as 18pin ZIF are unavailable at times)
20Pin socket is used for programming of 8pin, 14pin & 20pin PIC Micro Controllers.
18pin ZIF is dedicated to 18pin PICs.
40pin ZIF covers 28 and 40pin PIC Micros.
PB2 kits are now available with one 20/18 PIN ZIF, One 40PIN ZIF or 2x20 & 1x40PIN ZIFs. In addition to this, you may also order PB2 with Standard IC Sockets.
Basic Kit contain LVP pull-down switches for those trying to program PICs with LVP, 4 0.1uf ceramic capacitors, a 10K LVP resistor and 6 PIN R/A Male header.
Serial , ICP and FD-UPP Programmers:
This board is 100% compatible with FD-ICP, FD-SPP and FD-UPP Programmers
Interface to PICKIT2:
This board is pin compatible with PICKIT2 & FD-UPP programmers. You may use this programming board to program 8, 12, 18, 20, 28 & 40 pin PIC Micro Controllers.