Radio Transmitter

For your comments, suggestions, or your looking for a circuit or design, or a electronics designer, please send you Inquiries to pcb1001@gmail.com. We are happy to help and attend to your concerns.
Showing posts with label Microctrollers. Show all posts
Showing posts with label Microctrollers. Show all posts

Tuesday, May 12, 2009

Port-Powered Temperature Meter

This is a four-channel temperature measurmet adapter that works without external power supply. It will suitable for measureing temperature and logging its data with a PC. The circuit diagram is very simple and no adjustment is required, everybody will able to build it with ease :-)


Specs. Micro-controller ATtiny15L (Atmel)
Number of channels Four channels
Measurement Range -40°C to +105°C (0.1°C/step)
or raw A-D value
Measurement Error ±0.5°C (at room temperature)
Sensor 103AT (Semitec)
Power Supply Supplyed from COM port (typ. 5mA)
Cost Approx. 1200JPY (All parts)

HARDWARE

Micro-controller

I chose an Atmel ATtiny15L for this project. It is the only device that has a built-in 10bit A-D converter in the 8 pin AVRs. The A-D converter has a bandgap reference and differencial amplifire as its front-end. The AVR core is clocked by only internal RC oscillator (calibrated to 1.6MHz), any other clock souce cannot be used. Also 25.6MHz clock source that 16x multiplied from core clock is available for timer/counter. This means that a fast PWM output can be generated. Therefore the ATtiny15L has good analog I/O capabiltity.

In this project, the A-D converter is used as four channels, single-ended, no gain and VREF from Vcc configuration. However RSTDISBL fuse must be programmed in order to use pin #1 as one of the analog inputs, an AVR programmer that can program in HVS mode is required.

Power Supply

The devices that works on the COM port without external power supply, such as serial mouse, are powered from the COM port. When an application program opens COM port, ER and RS signals will go high. The high level voltage is from 6V to 12V at most PCs, and it can supply 5mA at least. This is sufficient for low power micro-controllers.

Sensors

Four 103AT precision thermisters are used as temperature sensor. Its variation is very small, its temperature - resistance error at room temperature is ±0.3°C. The error of series resisters should be within ±0.5% to enable calibration-free design.

FIRMWARE

The program only respond the values of each channel to the PC by trigger command. The temperature - resistance curve of the thermister is not linear so that the raw A-D value is linearlized and converted to temperature value in software process. When replace the thermister with any oters, the linearlization table in the source code must be re-built. The raw A-D value can also be read, it will be used as voltage meter.

The trigger command is one "T" or "R" character, returened results are the temperarute for "T" command, raw A-D value for "R" command. Each value is separated by a comma and terminated by a .

Free Firmware

Sunday, May 10, 2009

GPS Data Logger

I have got a GPS module last year and I built a GPS data logger that records position data from the GPS module. The position data is output in NMEA-0183 format and store its sentence into any storage device. The position data can be processed with existing GPS utilities for interesting applications, such as Tracing the route on Google Maps (HTML source text).



Hardware



This is the inside of the built data logger and the circuit diagram. To store the tracking log, MMC/SDC is used for the recording media. The MMC/SDC is the most suitable purpose to collect the logged data to the PC. The GPS data logger is mainly used on automobile, so that its power supply circuit should pass the load dump surge immunity test. The operating power is got from only ACC line for good usability, and power switch is ommited. To detect brown-out and power-off, input supply voltage is monitored with the microcntroller. The controller part works at 3.0 volts and the GPS module works at 5.0 votls are tied via a level converters each other.

Software

When a positioning is established and a valid RMC sentence is detected, logging operation is started with a log file named in current UTC time YYMMDD.log. When same name is already existing, it starts to store from end of the file.

Because the operating power is got from ACC line, power-off will occure asynchronously regardless of the operating state. When power-off is occured, open file in write mode must be closed quickly during operating power is retaining in the capacitor, or the log file will be lost. In this project, when supply voltage is continuously below 8.0 volts for 10 milliseconds, it reecognizes that power-off and close the log file.

Free Firmware

Tuesday, April 7, 2009

Classic PIC Programmer

PICs are small microprocessors containing RAM, ROM, and some peripherals. Almost no other parts are required to make a complete “embedded system”. They are readily available and well supported by the manufacturer, third party developers, and most importantly, users. This has led to their immense popularity.


Assembly:

The PC board design is fairly straightforward and can be made by laser printing to special paper or a page from TIME magazine, then ironing the image onto copper-clad board, then etching with ferric chloride. There are a few jumper wires. The power source needs to be at least 15 volts. A 12 volt DC adapter usually produces about 17 volts, so that's a good choice. Two 9-volt batteries in series will work too. Solder directly to the PC board or use a connector that mates with your power source. Pay attention to the direction of the voltage regulators because the plastic regulators are backward from the tab type. Substitute Japanese or European generic equivalents for the transistors and diodes, but remember that the pinouts will be different. A right angle PC mount DB-25M connector is specified, but a conventional solder-cup DB-25M connector works, see the picture how I did it.


Operation:

The programmer connects to the parallel printer port of your computer and requires external power. If you want to program a PIC you'll have a hex file created by your assembler or created by someone else(see my propeller clock). You will also need to drive the programmer with some software. Here are programs that run under DOS and Windows. Linux software for Intel-based computers is available elsewhere. Macintoshes do not have parallel ports and can't use this programmer. Do not insert the PIC to be programmed until you have power applied and have run the software, and the programming LED is not lit. The DOS software requires command line switches for fuse settings(unless in the chip's hex file)and also the environmental variable "set ppsetup=3" to be typed before running the program. The Windows software requires the driver "dtait.drv" to be in the \windows\system directory and also the line "PINAPI=DTAIT.DRV" added to the system.ini file. Tell the software you have 7407 chip and PNP transistors. These details are explained in the text files included with the software.

The Files:

DOS software by David Tait "pic84v05.zip".
Windows software v1.03 by Silicon Studio "picser.zip".

Programming newer PICs:
  • The whole “F” series can be programmed. You need to use newer software, like this cool software. The PIC16F627 and PIC16F628 are 18 pin devices and fit right in the socket, but you must make a ground connection to pin 10 to prevent LVP programming, a new feature this programmer does not use. Some people suggest using a 10K resistor to ground, if you are doing in-circuit programming that probably makes sense. Programming the bigger PICs, including the PIC16F872 through 16F877 requires fitting the correct(28 or 40 pin) socket and wiring the pins to the corresponding function. Remember to ground the LVP pin on these, too. The bigger PICs also have extra power and ground pins. These must all be used.
  • You must select the port your computer is using(usually 0378) and the type of programmer (P16PRO) and the type of buffers the programmer uses (non-inverting). The software is beta, but I have tested it and can testify it working on the 16F84 and 16F628 I tried. It only programs locations used in the hex file, so it is very fast. If your program is 250 bytes, only 250 bytes get programmed, but when I used my PicstartPlus to verify the chips I tried, it would show a verify error unless I blanked the chip first, although the chip functioned fine. Leaving those unused areas in the previously programmed state shouldn’t be a problem.
  • Propic2 keeps the power to the chip on while idle. This can be useful for “burn and crash” in-circuit programming. You’ll see the LED is lit. I don’t like to insert or remove the PIC when power is present, so I pull the power cord before I insert or remove the PIC.
  • propic2 software, in case the above link is broken.