You are hereForums / Radio Forums / Projects / Controller for Repeater Station
Controller for Repeater Station
---------------------------------------
Specifications
---------------------------------------
The interface to the external world: Analog and Digital.
Multiple inputs and outputs:
Digital: standard TTL levels
Analog: 0-5V
Outputs Morse code on one of its output
Talk/Hold one bit input to the micro controller, and output to the repeater station
Serial interface:
bare minimum something similar to RS232, it would be nice to have USB or Ethernet interface
Must have a voltage regulation unit: Capable of regulating 8V up to 25V and provide regulated 5V/3.3v/2.5v (depending on whatever the micro controller requires)
An LCD visual display along with three or four push button interface (Similar to an electronic watch, where one can scroll through a menu and select one of many options)
Analog inputs: for monitoring various sub modules such as temperature and humidity.
To get started we could try out the old one, and I'll try to find the code and stuff.
Interesting spec !
A bientot, kwd...
Keith Daniel VE2KXD
PIC or Atmel and why?
naeem
This is another *holy war* in technology.... but mostly trivial because they do almost the same things. Both the PIC and AVR are 8-bit uC's and have very similar architectures (especially when comparing the 18F PICs with the Atmega series of AVR's)
I prefer AVR because the linux/BSD tools are great, especially the open source avr-libc C library, avr-gcc, and the programming software, avrdude. All of these tools are also ported to Windows under the WinAVR library and plug directly into the Atmel AVR Studio IDE. Plus the programmer for the Atmega is super easy to build, especially since the In-circuit system programming voltage is the same as the AVR operating voltage (ie. approx 5V). Also there is lots of stuff on the web for AVR projects and sample code.
Comparing this to PIC, the PIC programmer was far more complicated to build, mostly since the programming voltage is different from the regular operating voltage, so there is additional power circuitry involved. Many additional parts were required. I used this programmer: http://ucapps.de/mbhp_burner.html. Another complication for me is that the open source C-libraries (cpik, sdcc) for the PIC aren't very mature as of yet, and the rest of the programming software I was using (pikdev/pkp) for linux didn't yet support the chip I had.
However, one good thing about the PIC (for me) is that it is very easy to get free samples. Microchip is very liberal with the free samples (sample.microchip.com). They used to be completely free, now they ship 2 types of parts with 3 samples each for $8 shipping. Not a bad deal for 6 parts! Also, compared to the AVR, it seems its easier to find books on the PIC at the local library. I think this is because the PIC has a longer history than the Atmel and has been a hobbyist's tool for many years, with many loyal users, no doubt related to the fact that they give free samples so easily. However, I have received some freebies from Atmel once, though it's not so simple to get them, you need to fill out a form and it takes a while.
In the end though, it doesn't really matter which one you use, as I think they are virtually the same idea. Now the 32-bit ARM architecture... that's a different story! I'm interested in trying that out some day, as it is very popular for more advanced applications and commonly runs full-featured operating systems.
To complement our workshop on trying to build the controller for the
repeater, here are some links to check out to get started with the
Atmel AVR.
PROGRAMMER HARDWARE
===================
The programmer hardware that I use is also known as the bsd programmer
and it can be found here:
http://www.bsdhome.com/avrdude/
Its basically a parallel port programmer, where certain Pins on the
parallel port connect to certain pins on the uC:
Parallel-Pin AVR-Pin
Pin 7 AVR /RESET
Pin 8 AVR SCK (clock input)
Pin 9 AVR MOSI (instruction in)
Pin 10 AVR MISO (data out)
Pin 18 Signal Ground
**Note that all the connections except for ground should go through 1k
resistors to protect from short-circuit currents damaging your computer
or the uC.
There are many other types of programmers you can use:
USB
----
AVRISP MKII ($, not-DIY)
http://www.atmel.com/dyn/products/tools_card.asp?tool_id=3808
LADYADA USBTINYISP ($ or DIY)
http://www.ladyada.net/make/usbtinyisp/
USBASP ($ or DIY)
http://www.fischl.de/usbasp/
SERIAL
------
I heard ladyada has a design for a simple serial programmer, but don't
know where exactly to find it... (expect this to be updated at the
workshop as my friend will be there )
also there are a bunch here:
http://electrons.psychogenic.com/modules/arms/art/5/AVRInSystemProgramme...
PROGRAMMING
===========
I use a debian based distro, and simply had to install the following
packages through apt:
gcc-avr
avr-libc
avrdude
build-essential
Also, I use the following Makefile when building my projects:
http://electrons.psychogenic.com/modules/arms/view.php?w=art&idx=8&page=2
Edit the Makefile to suit your needs, basically change these variables
(here I'm using values that would work for an atmega16, with a project
called blinkenLEDs and source file blinkenLEDs.c):
MCU=atmega16
PROGRAMMER_MCU=m16
PROJECTNAME=blinkenLEDs
PRJSRC=blinkenLEDs.c
Then with the Makefile in the same directory as my source files, I
issue the following command in the command line in that directory.
$ make clean && make hex
Now if all goes well this will produce a file called blinkenLEDs.hex.
If not, we need to check the error output to debug the code.
For programming the uC, I prefer to use the command line and avrdude,
here would be my command line for using the bsd programmer (the parallel
port one I discussed first in the PROGRAMMER section)
$ avrdude -p m16 -c bsd -e -U flash:w:blinkenLEDs.hex
if you want more details about what this command does you can issue
$ man avrdude
at the command line. Basically here is what the flags mean:
-p = uC part id (ie m16 for atmega16)
-c = programmer cable to use (bsd for the bsd programmer)
-e = erase chip
-U memtype:op:filename[:format] = memory operation. Here we use the
flash memorytype (flash), and we do a write (w) operation, using the
file (blinkenLEDs.hex). We omit the format option as by default the
file is intel hex which is what our file is. Alternatively, we could
also do a read (r) operation and write to a file, but that's for you to
play with after reading the manpages!
LINKS
=====
http://www.atmel.com/products/AVR/
(Atmel's site)
http://www.atmel.com/dyn/resources/prod_documents/doc2486.pdf
(An example of a datasheet for an ATmega8. Each microcontroller will have one of these on Atmel's website)
http://www.nongnu.org/avr-libc/
(a great FOSS C library for the AVR, also check out the sample code section and the documentation for the library on this site, its very useful)
http://winavr.sourceforge.net/
(the windows port of some FOSS linux tools)
http://www.atmel.com/dyn/Products/tools_card.asp?tool_id=2725
(Atmel's AVR Studio software IDE. Can be used with avr-gcc/winavr libraries!)
http://hubbard.engr.scu.edu/embedded/avr/avrlib/
(The Procyon library. Kindof dated, but lots of great stuff here that should work if your compiler is somewhat backwards compatible with old flags)
http://www.jump.to/fleury
(Peter Fleaury's AVR website, with lots of great code and tools for getting started. I've used the LCD library and it works well)
http://www.atmel.com/forms/Samples.asp?family_id=607
(free samples can be had, but they take time and no guarantees about
this form actually working for you)
http://electrons.psychogenic.com/modules/arms/sec/1/AVR/
(some great articles and sample projects)
http://www.avrfreaks.net/
(AVR user web-shangri-la)
A few pictures and a video from earlier today.
Pictures:
=========
http://concordia-ieee-amateur-radio-group.googlegroups.com/web/P8070200....
http://concordia-ieee-amateur-radio-group.googlegroups.com/web/P8070198....
http://concordia-ieee-amateur-radio-group.googlegroups.com/web/P8070196....
http://concordia-ieee-amateur-radio-group.googlegroups.com/web/P8070193....
Video:
======
This link will go stale in 48 hours.
https://fis.encs.concordia.ca/upload/n9bER4M_qqIE/P8070202.AVI
naeem
Hi guys,
Here's the source code for our work yesterday in the workshop...
http://groups.google.com/group/concordia-ieee-amateur-radio-group/web/re...
I was thinking about Naeem's suggestion for the LCD screen and menu, and I think something that might be cool is if we made a way to reprogram the device through a menu, so it could say basically anything via morse and using any arbitrary interval between. Also we can have it display a clock so it shows the current time as well, as a reference.
Is it possible to post the circuit schematic of the micro controller circuit we experimented with yesterday?
naeem
Here you go:
http://groups.google.com/group/concordia-ieee-amateur-radio-group/web/bs...
http://groups.google.com/group/concordia-ieee-amateur-radio-group/web/sc...
(also found here: http://users.encs.concordia.ca/~n_goswam/repeaterWorkshop/ )