Friday, August 19, 2011

Accelerometer for cars



Introduction
The circuit is drawn for measurement of acceleration from  –1000 mg until + 1000 mg. It can be placed in kantra'n the car and be supplied from the sheath of electric lighter. The circuit includes one indicative LED and a screen LCD.  





Description
The measurement of acceleration becomes with the use of IC from Analog Devices, the ADXL202. The particular element contains 2 autonomous vertical between them sensors, for the measurement in two axes. For the particular application becomes use of only it's one. Acceleration meter measures dynamic or static acceleration from  –2g until 2g (where g is the acceleration of gravity) and when this is equal to zero, exit is a signal PWM, with Duty Cycle 50%. As long as the acceleration increases, increases also the Duty Cycle, with biggest response the 75% (in the 2g), while for acceleration  –2g, the Duty Cycle is 25%. As conclusion from more, has that for change 1g, is altered also the Duty Cycle of exit at 12,5%. 
 The measurement of Duty Cycle of response of acceleration meter becomes with the help of Timer1 (16 bit). The period of signal of expense, has been fixed in the 1,12 msec. The frequency of oscillation of microcontroller is in the 3,6864 MHz and this means that it's each circle of access lasts 0,27 * 10 -6  sec. Using timer1, in frequency of measurement ck/1, the biggest feasible counted time is the 65536 * 0.27 * 10 -3  msec = 17.778 msec, which is bigger than period (1,12 msec). So, any price Duty Cycle it is possible to be measured. 
 Before the beginning of measurements, it precedes a process of accelerator’s initializing. At this process it is doing 16 measurements, and then is found their mean. In short time interval, it is considered that the acceleration was not altered also thus the result, us gives the point of null acceleration. In other words at this process becomes approach of value Duty Cycle, that corresponds in null acceleration. From now on, after each measurement, it will be removed from Duty Cycle, the null acceleration.
 At the placement of appliance, the completed ADXL202 should be always parallel with the surface of ground and the pins 1 and 14 they see front part of car.  The LCD is connected at the K2 connector and the ADXL202 is connected at the K1 connector (K3 is connected with K1).

Function
 With the shooting of switch of starter, the circuit is supplied. In the beginning, and as long as LED is power-off, becomes initializing of meter. Acceleration meter is will be always placed so as to it measures the acceleration at the address of movement of vehicle. As long as however well and it is placed this, will always exist a component vertical in the movement and with time to the centre of ground. This component is the acceleration of gravity and which is always removed from each measurement. As soon as the LED turns on (in minimal time), then the initializing it has become. From now on the meter measures the acceleration and him presents in the screen. When is presented the symbol "-", it means that it is deceleration.
 In the above department of screen is presented the clue of total time interval, that your car is in operation. The operation of this clock is based on vibrations that come in the pin External Interrupt 0, from exterior circuit based in the timer LM555. 
 In the future it is is published new circuit, with the himself characteristically, that will use the second exit acceleration meter, for the measurement of centripetal acceleration, at the movement of car.  

 http://www.ziddu.com/downloadlink/16099830/Accelerometer.zip

http://www.ziddu.com/downloadlink/16099829/ADXL202_10_b.pdf 

Source by : http://www.serasidis.gr/
Designed by: Michael Karaoglanidis

Midi Generator




This circuit based on ATtiny26 but it could be anyone microcontroller of AVR family. Produce stable one MIDI tone and you can change it by press some keys like to change midi channel 0-15, velocity 0-127, pitch 0-127. It is start from center tone (C) at channel 0 with velocity 30. Every tone is equivalence with two midi events "note on" and "note off". A LED is used to show the start and stop of the midi tone. This LED is turn-on every time a command is executed by the key pressing.

http://www.ziddu.com/downloadlink/16099700/MidiGenerator.zip

Source by : http://www.serasidis.gr/
Designed by: Vassilis Stergiopoulos

USB Switch





To share a regional press as USB printer, scanner etc. two computers is relatively easy. Just connect the two computers on a network device and say the printer as shared. This method however requires the continued operation of the computer we plugged the printer. Solution to above problem is to give the circuit that we present, as has the ability to be transferred to the printer in any one of the two computers we want, because the printer is connected to one of the two computers, but in our manufacturing.
 

With lower prices on laptop computers became affordable sailer acquisition and the average Greek. Getting two computers, however, automatically generated and the need to link with the most common peripherals already available, such as printer, scanner, the WEB camera, the ISDN NetMod and more. For selecting the type of peripheral interface with the computer we took into account that most modern peripherals are interconnected USB, leading us to this choice. As regional USB to mention USB printer. In his place may well be a scanner, a camera or other USB device preferably low-speed USB 1.1 (1.5 Mbps), this does not mean it can not work with devices and USB 2.0. But since our manufacturing include mechanical parts, perhaps   create communication problems of some regional through the floor construction, because of both high speed as this USB 2.0 (480 Mbps) and "noise" generated in the contacts of the relay. According to the block diagram of Figure 1, the printer connects to the computer and the microcontroller No1 computer No2. When given a command from the software the construction (USBswitch. exe), is the cross-switching devices and the printer is now No. 2 on the computer while the computer microcontroller No1.


Figure 2: The theoretical circuit construction.
The theoretical circuit The circuit consists of a few parts because the microcontroller IC 1 to take control of where it is attached printer, and is responsible for communicating with software the computer via USB. The supply of construction is of the USB ports on both computers, as well as provide voltage +5 v with a maximum current of 500 mA each, capable of not only the power of our workmanship but also for the regional will connect. Furthermore, this ensures the smooth operation of our construction where we have a single computer. The data signals D +   and D - the USB bus are level 0 and +3.3 V. The IC 1 but operates with TTL levels 0 and +5 V. So there are two ways to customize: or to build a converter station from the   5 V at 3.3 V and back to the data bus D + and D - or down trend   supply of IC 1 to 3.3 V when the signal level will be between 0 and 3.3 V. The Atmel We guarantee that the operating voltage of a ATtiny 2313 is between 2.7 V and 5.5 V, so we chose the second way, namely the operation of IC 1 to 3.3 V.   Instead of a stabilizer to 3.3 V chose three diodes 1 N 4001 (D 5 - D 7) that the proper time, creating a voltage drop 0.7 V hence VCC = 5 - (0.7 * 3) = 2.9 V. These in theory because in practice the voltage is about 3 V. The specification of the USB bus for low-speed devices is 2.7 - 3.6 V so that 3 V enough. R 6 is the load impedance to ensure circuit always 3 V. The relay RE 1 and RE 2 assume connecting IC 1 with the first and the second printer to the computer. The RE 1 working backwards from RE 2. That is reinforced when the RE 1, the RE 2 is disarmed, and vice versa. When the base of T 1 we have 0 V, the transistor will not conduct and therefore the collector will   have +5 V Winding through the RE 1. This trend of 5 V is driven into the base of T2 putting a state conductivity. By the same logic when the base of T1 will have 3 V, will pass a state conductivity dropping the voltage of the collector to 0 V and thus drive the RE 2 disarm. The diodes D 1, D 3 are used to protect the T1 and T2 of the reverse currents generated in the windings of RE 1 and RE 2. The LEDs D 2, D 4 are indicative of the state of each relay (ON - OFF). The relays have a rated voltage of 6 V DC and consumption is a ~ 20 mA. For this reason we chose to arm only one at a time and not to arm or disarm both simultaneously, thus reducing the overall power consumption of the circuit. The R 7, R 8 is terminating resistors of the bus USB.   By R 9 Poles D - USB port to +3 V thus declaring the existence of low-speed device USB (1.5 Mbps). Building the circuit The construction of the circuit will not be a problem because of the simplicity. Little attention should be paid to the polarity of the materials (diodes, capacitors, integrated). Glue the first shorter and smaller components and then larger and taller. The black lines connecting the holes in the plan of placing materials are wire bridges on top of the board. The LEDs D 3, D 4 and resistors R 1, R 2 can not be placed on reducing power consumption by 6 mA. If you can not find ATtiny 2313 to market you in a position to schedule the same files. Hex and. eep an AT 90 S 2313 and put on the same basis as they have the same layout on the pins. If, after connecting the peripheral with the computer, show you the message that found an unknown device and you have already installed drivers will need to remove one of the diodes D 5 and D 6 and D 7 and the position of sticking a wire bridge. With this conversion will increase the voltage VCC from 3 V at 3.7 V, sufficient for the proper functioning of the AT 90 S 2313. The AT 90 S 2313   can operate from 2.7 V - 6 V. Then why should move up the voltage to 3.7 V and can be operated with 2.7 V; The reason is simple. The operating voltage is 2.7 V as the maximum operating frequency, which is 10 MHz. In our case, however, the operating frequency is increased to 12 MHz ie 20% more (overclocking). For this reason we can not work at lower voltage. On the other hand, ATtiny 2313 has a maximum operating frequency of 20 MHz so that we can comfortably operate at 2.7 V. Programming IC1 The microcontroller IC 1 should be programmed with two files. Flash memory you should plan to file USBswitch. hex and internal memory eeprom the file USBswitch. eep. If you do choose ATtiny 2313 against AT 90 S 2313 should range from <Fuses> programmer you make sure that option is checked <Ext. Crystal Osc.; Frequency 8 -    MHz; Start-up time 14 CK + 65 ms; (CKSEL = 1111 SUT = 11)>. This will have to check because this microcontroller has the ability to activate the internal oscillator 0.128 - 8 MHz, and should make sure that is selected using the external crystal frequency of 8 MHz more. Operation When connected to our manufacturing in a free USB port the computer through port K1, the computer will recognize a new device and will ask drivers (Drivers). The driver for the device «USB switch »is in the folder« Driver »and consists of three files: AVR 309. dll,   AVR 309. Inf and AVR 309. sys.   After   installing the drivers, our device will be ready for use. Both computers must have installed the drivers and the program «USBswitch. Exe». When you connect both computers with our device, install drivers and run the program USBswitch. Exe, we see that the computer will see a message of Figure 3 and in another the message of Figure 4. In this will display the message in Figure 3 will be connected to the printer. In this case, as you see the button "Connect to a common regional" is disabled because we have already connected the printer to this computer. In the case of Figure 4, the program informs us that the device "USB switch "   ie essentially the IC 1, has been found and we can press the button   "Connecting with the common regional USB» to the IC 1 to change the status of relays and switches the printer on this computer. If you do not install the driver, can not run the program.


Figure 3: When the computer is connected to the printer displays this message.


 Figure 4: When the computer is not connected to the printer displays this message.



 MATERIALS
C1: 100nF
C2: 470mF/16V
C3: 22 pF
C4: 22 pF
D1, D3: 1 N 4148
D2, D4: LED
D5, D6, D7: 1N4001
IC1: ATtiny2313 (see text)
K1: Plug onboard USB-B
K2 : Plug onboard USB-A
K3: Plug onboard USB-B
R1, R2: 1k
R3, R4, R5, R6: 10k
R7, R8: 56R
R9: 1k5
RE 1, RE 2: Relay 6 V, duplicate contacts.
T1, T2: BC547
X1: 12 MHz
Cost of materials:   20 €
Difficulty of manufacture: * Inaccessible materials: *


Source by : http://www.serasidis.gr/
Designed by: Vassilis Serasidis

SMS Controller


>> Photo of a workable <SMS remote control> with 4 relays version.
Introduction

With this circuit we can controll up to 8 devices (4 devices in our example project), by sending a specific SMS message with any mobile phone. Its very usefull at the cases that, at the place we have the devices, we have not a wired telephone line. If you have an old ericsson mobile phone and you are not using it, its the time to build some useful with that.  The controlling that we can do to the devices, it is ON , OFF or Reset.


Usage of this circuit

With this circuit you can switch-ON , OFF or  Restart some Linux servers, ADSL modems, Printers, Door with electric lock, Garage door, House lights, Water pumpselectric sunshadeBlock the engine of your car or your motorcycle, at the steal case  and much more. The purpose of this circuit is to make the human life better and easier.


The circuit

The hardware of the circuit its very very simple, because the communication port of ericsson mobile its working at the 5 volts with AT commands ( like the modem commands, but for mobile phones).
The firmware of the AT90S2313 (or ATtiny2313) its very complicated because, we have to convert the 'septets' of the phone to 'octets' because the AVR need bytes with 8 bits length ( The 'septet' is 1 byte with 7 bits length and  'octet' is 1 byte with 8 bits length). All this proccess its necessary to decode the message from SMS.

This circuit is working on both AT90S2313 and ATtiny2313 microcontrollers. In case of ATtiny2313 you have to select "External Crystal Oscillator" instead of default "internal RC oscillator" from the "Fuses" tab of your programmer's software. You have to uncheck the "Divide clock by 8 internally".







>> Schematic of SMS remote control circuit.

When you finish the circuit connect it to the mobile phone, turn on the phone and then power on the circuit, not before . The AVR now its trying to read the message from the 1st memory location of the phone, for that  i suggest to delete all SMS messages from the phone before connect it to the circuit. If there is no message to the 1st memory location, the AVR its trying again until you sent any.

The format of the message must be only '1' or '0'. '1' to enable, or '0' to disable the device. The message must have only 8 numbers, '1' or '0' , alone or mixed .
Example: if you send the message 11000100 then you enable, starting from the right, the devices 3,7,8 ('1') and disabling the devices 1,2,4,5,6 ('0') .
If you want to send a new message and you don't want to change some device, must send the same number as the old message.
Example: If you want to enable only the 5th device, you must send a new message like 11010100 to keep the other devices as there are (we send the same message as the old ( 11000100 ) and we change only the 5th bit from '0' to '1' to enable the device ).




>> You don't need any Data cable. Connect the AVR's pins direct to T10s connector.





>> You don't need any battery for T10s. Take +5V DC from <SMS remote control> board.
>> You can remove the <NO> key from T10s and solder an ON-OFF switch in this place. If you put it in ON position, the phone is will power-ON automaticly every time you cut and then apply, the main +12V DC power supply. To add this switch you have to disassemble the T10s.









>> The PDU decode proccess. Take 7 bytes (8bits) and convert them to 8 bytes (8bits) by adding one zero at the start of each byte. The PDU format is use bytes with 7bit length.


Advice !

If you want to protect your devices from other person's messages, modify the source code, to read the AVR, your telephone number before execute any message. In the source code i have some part of code, to read the telephone number, the service center number, the date and the time of the received message.
The project its based on the Greek mobile phone network of  <Vodafon GR> and i don't know if the SMS message in other country, have the same syntax ( I mean the form of the septets that the GSM receiving from the GSM network ).

After the GSM receive the message, the AVR execute it, delete it from the phone memory, to release the 1st memory location and start again to search for a new message.


Service mode

If you connect the pin7 (PD3) of the AVR to MAX 232 chip and this to computer, you will see at the terminal window software, all the data that the GSM is send to the AVR (Sender's number, service center number, date, time and the AT commands ) . Setup the COM port to 19200 bps 8n1.



Troubleshoot

I have test it only with Greek sim cards and T10s mobile phone. I don't know if this circuit its working fine to other countries or other mobile phone models. You can build the diagnostic circuit that is in the dot frame of the schematic, and to connect the circuit with PC via RS232 port.

When you power-on the circuit and the phone, the AVR it will send the follow commands to the mobile phone:

1)   AT+CPMS="ME"      (Select the phone memory "ME")
and
2)   AT+CMGR=1            (read the received message from memory possition 1)



If the mobile phone will response with:

AT+CMGR=1[CR][CR][LF]   (this message its sended when there is no message in the phone memory)
+CMS ERROR: 500[CR][LF]

At this case the AVR it will send again the commands 1 & 2


If the mobile phone will response with:

AT+CMGR=1[CR][CR][LF]   (this message its sended when a new message arrive in the phone memory)
+CMGR: 0,,26[CR][LF]
0791039624910000240C91xxxxxxxxxxxx00003001205151302108B1180C068BC162[CR][LF]
OK[CR][LF]
(xxxxxxxxxxxx is the phone number of the sender)

the AVR will decode the septets message to octets, execute it (arm or disarm the relays) and send the command

AT+CMGD=1            (delete the received message from memory possition 1)

to delete the message from the phone memory.


You can see the voltage of the PortB with any voltmeter if you have +5 or 0v voltage, to check if the command you send, for example"11001010", its executed.



History of SMS remote control (SMSrc):

03.12.2006
V2.2
  • Plug 'n' play function: Some times the AVR stopped to communicate with T10s. Fixed!

24.08.2006

V2.1
  • Reset command: Added a reset command. By sending the letter "r" or "R" , the AVR will disarm for 2 seconds the specific relay and then it will arm it again, until rext received SMS. It is perfect to reset ADSL modems, WiFi Access points, linux servers e.t.c.
  • Transmition bytes to PC: The transmition pin has changed. Now the pin7 (PD3) is sending the data to PC, to see if the circuit is working propperly. The serial data communication has changed to 19200bps 8 none 1 .
  • Problem with unrecognized characters is fixed. Now if you send SMS to T10s with any different character than "1" , "0", "r" and "R" , the AVR it will ignore it. At the previous versions (up to V2.0) when received any unknown character, the specific relay was went to <disarm> state.
  • Send response message: is removed because the cell phone provider is inform you for free, if SMS is delivered (this service in lot of countries is free).
The command method has not change it, you must send only up to 8 numbers '1' , '0' , 'r' and 'R' . For example 110r101R .

06.07.2004  

V2.0 is now available. I have rewrite the code again from the start and I add 2 more features

  • Plug 'n' play: now you can connect the SMSRC (SMS Remote Control) circuit with T10s mobile phone, power them  ON both and then send any command '1' or '0' from some other mobile phone to the T10s of the circuit. The AVR will read the message and execute it and change the relay state.
  • Send response message: when you send some command message from some other mobile phone (like nokia, siemens etc) to ericsson T10s like "11001010", the AVR will execute the command and then it will response to the sender's mobile phone, if command is executed.

The new code is more stable than the old one. The command method has not change it, you must send only 8 numbers '1' or '0' for example 11001010 .

23.10.2002  

V1.0 is now available. You can control up to 8 devices by sending commands '1' or '0' . Example: 11011010

 http://www.ziddu.com/downloadlink/16099331/sms_controller.zip

http://www.ziddu.com/downloadlink/16099330/smscontroller.zip

http://www.ziddu.com/downloadlink/16099329/ericssonT28_R1A.zip

http://www.ziddu.com/downloadlink/16099328/sms_controller_v2.2.zip

http://www.ziddu.com/downloadlink/16099327/sms_controller_V2.1.zip

http://www.ziddu.com/downloadlink/16099326/sms_controller_v2.zip

http://www.ziddu.com/downloadlink/16099325/pduspy.zip


Source by : http://www.serasidis.gr/
Designed by: Vassilis Serasidis
 

RF Remote Control





RF Transmitter




RF Receiver


Introduction

    How many times you needed some remote control to handle some electric device ? many times. There are lot of remote controls like infrared, RF, SMS (like my other circuit) and more. The basic small-range remote controls are 2, Infrared and RF (Radio Frequency). One of the weaks of Infrared is that the signal can not pass the walls. So, if you want to control your garage door, the only way is to use some RF remote control. The circuit (transmitter and receiver) use few components and ordinary (I love few component circuits) . Its easy to build it because you don't have to tune-up any coil or variable capacitor. The RF modules are fix to work in 418MHz area.
    I have designe this remote control considering :
      a.) the check of the received data because many other devices are working in this frequency (418MHz)
      b.) and the power-saving of the transmitter. One transmitter must have battery long-life, there is not good to change the battery after 3 days ;) . I don't care about the receiver`s power supply, because receiver must be working all the time.

Features


    Transmitter
    • Standby: <1uA (less than 1 microampere)
    • only 3v power supply
    • 10...15m distance range
    • 2400bps communication
    • 2 initial bytes for device recognition (ID bytes)
    • calculate the checksum of the sended data (to avoid fake commands)
    • few components
    • small size

    Receiver
    • Hardware UART at 2400bps
    • 4 bytes (32bit) length communication
    • checksum of the received bytes  (to avoid fake commands)
    • few components
    • smal size


Transmitter description





Schematic of the transmitter
    The transmitter is constituted by AT90S2323 microcontroller and TLP434 RF transmitter module at 418MHz. I have designe the transmitter for more battery economy and safe transmition of the data.
    • The battery economy is made it by the use of powerdown mode of AVR. In this case the AVR goes to sleep with less than 1uA (microampere) current and wait for external interrupt on pin PB1 to awake from sleep and continue operating.
      If you press the S2 key, the logic of this pin goes to '0' (0V) and AVR awake frome the sleep mode (because PB1 is INT0) and check if pressed the S1 key. If not, the AVR take as pressed key the S2. If yes the AVR take as pressed key the S1.
      If you press the S1 key the logic of this pin and PB1 (through 1N4148) goes to '0' (0V). In this case the AVR take as pressed key the S1.
      After, calculate the checksum and transmit 4 times the same 4 byte sequence to make sure that receiver takes the data and goes to sleep mode until next interrupt on PB1.
      When the INT0 pin (PB1) of AVR goes to 0V, the transmitter TLP434A is working. If you stop press the switch S1 or S2, the TLP is stop working.
    • The safe transmition of the data based to transmition of 4 bytes with serial form at 2400 bps (bits per seconds). 1st and 2nd byte are for recognition of valid remote control from receiver (like ID bytes), 3rd byte is command byte. The relays status dependet by the value of this byte. Finaly, the 4th byte is the checksum of the earlier 3 bytes.
    example: if byte1=30h, byte2=35h and byte3=02h the 4th byte (chechsum) will be (byte1) XOR (byte2) XOR (byte3) = 30h XOR 35h XOR 03h = 06h.
    This method use 4 bytes x 8 bit each = 32 bit length (without start and stop bits). That is mean 1 possibility at 4.294.967.295  to receive the receiver, the same 4 bytes from some other RF device.
    This transmitter will work with all 2323 chips but better is AT90LS2323 with working voltage 2.7 - 6 volts.The microcontroller that I use is AT90S2323 with working voltage 4 - 6 volts. Its worked fine with 3v lithium battery.
      As antenna you can use ~7cm cable in to transmitter`s box.
 

Receiver description

 

 




Schematic of the receiver

The receiver constituted by RF receiver module RLP434A at 418MHz, the microcontroller AT90S2313 and the 2 relays with can handle any electric (or electronic) device up to 10 Amps (the contacts of my relays are 10Amp at 250Volts).

The RLP434A is an RF receiver module with receipt frequency at 418MHz with ASK modulation. There are 2 outputs from this module, the digital, with levels from 0v to VCC (5 volts in our case) and the analog output. Analog output is not used. The transmitter send 4 bytes with 2400bps 4 times and the receiver RLP-434A, collect them and move them to AT90S2313 to RxD pin, PD0.
Two reasons to select AT90S2313 (20pins) instead of AT90S2343 (8pins) is because
    a.) AT90S2313 use a hardware UART adjusted at 2400bps and the hardware UART  is more stable, with smaller code, than software UART that I use in the transmitter. If some serial data arrive at the middle-time of some other routine other than receive routine,  for sure we will loose this bits of data. The hardware UART does not have this problem because have buffer for this (UDR register). This is what I mean that the hardware UART is "stable".  
    b.) with AT90S2313 we can drive up to 14 relays with future upgrade of the firmware, one relay to each pin.
As antenna you can use a cable 30 - 35cm long


The power supply


The power supply of receiver

The power supply of RF receiver constituted by 2 voltage regulator, LM7812 and LM7805. The first (12V) its only to power the 2 relays and the 2nd (5V) to power the AVR microcontroller and the RF receiver module. The LED, is voltage indicator and the 4 capacitors are to flattening  the voltage.



Usage of transmitter
    Power on the receiver and press S1 key to transmitter. You will see that relay on PB0 of receiver will arm. If you press one more time the same key, the relay will dissarm. If you press S2 key from transmitter you will see that relay on PB1 of receiver will arm. If you press one more time the same key, the relay will dissarm. Each key is for 1 relay only.
    I choose to drive 2 relays and not only 1 because for some application like garage door 1 relay can handle the door (open-close) and the other to turn-on or off the light of the garage.
UPDATED!!!

New feature added! roll-code. Roll-code function is increase the safety of remote control, because it is change the transmitting code everytime you press any key on the remote control (AT90S2323 circuit) and the RF thief scanners will be useless!

Source by : http://www.serasidis.gr/
Designed by: Vassilis Serasidis

USB AVR Programmer








Introduction.
Nowadays, USB is the most popular connection connection between PC and peripherals such as AVR programmers, printers, scanners etc. For that reason I had to modify my old serial AVR In-System-Programmer (ISP) to work with USB connection. You can say, "use a USB to Serial adaptor to connect your AVR ISP with your PC". Yes, that could be a solution but it would cost me more money than a singe FT232BM chip because I had to include an USB to RS232 adaptor and a power supply for my programmer. (almost €30).  
So, the solution was to replace the two transistors, that were used to adapt the RS-232 voltage levels to TTL voltage levels, with a USB to RS-232 chip such as FT-232BM.
Initially, I used the John Samperi's firmware V3.2 but afterwards I found out the Klaus Leidinger's firmware that was a little bit faster. So, I chose the second one firmware but I had to modify the source code to work with 11.0592MHz crystal instead of 7.3724MHz that was initially designed because I couldn't find this crystal in the market .
This programmer worked perfect with AVRprog but then I found a software that could support much more AVR devices than the AVRprog could program. This software is AvrOspII V5.47.



>> The schematic diagram of USB AVR In-System-Programmer


The circuit.
Following the schematic diagram that I read in the FT232BM manual I made the connections between ATtiny2313 and FT232BM. The FT232BM requires a few and ordinary components to work. When you connect this circuit to your PC you will see the message " a new hardware was found" and then the factory name of FT232BM. IC1 is a serial EEPROM that used to store user's settings. So, you can rename this programmer to be appeared as "AVR In-System-Programmer" or "MyAVR programmer". Furthermore, you can add the firmware version of your circuit. Of cource, you can bypass this component because it's optional. I saw that the programmer works with or without this EEPROM. Anyway, FTDI suggests you to use this EEPROM. Led D1 flashes when data are transmitted or received by FT232BM. CN1 is a USB-B connector and CN2 is a 6-pin connector to your target AVR (it is connected to the AVR to be programmed). The S1 switch is used to supply your target circuit with +5V from the USB connector of your PC. In this case you won't need any additional power supply for your target circuit. Consider that a single USB port can supply up to 500mA current. You should not exceed this current limitation including the current that needs your AVR programmer too.


 >> The PCB was designed with Sprint-Layout 4


>> The placement of the components on PCB


Programming the ATtiny2313.
Burn the ATtiny2313 with avr910_2313_v38c.hex file. Do not forget to deselect the "Devide clock by 8 internaly" option and select the "Ext. Crystal Osc. 14CK + 65ms" option on fuses section of your AVR programming software.



>> Configuration tool for the EEPROM of FT232BM chip

Optional: Configure the USB programmer.
As I said before, you can configure your programmer to be appeared with the name you want. In this case, my programmer is appeared as "AVR In-System-Programmer" when I plug it in to the USB port. Note that if you change any information on this screen you should change the same information in the "FTDIBUS.INF" and "FTDIPORT.INF" files. If you don't make any modification to the EEPROM and you have Windows XP SP2 or newer operating system, you won't need any driver. All the necessary drivers are included in your operating system.


 >> The initial screen of AvrOspII



>> The settings screen of AvrOspII


The AvrOspII programming software.
The programming software that was chosen is AvrOspII V5.47 (currently version) because it supports a lot of AVR devices and the author of this software Mike Henning is keep on writing new versions supporting new AVR devices. You can see if there is a new AvrOspII version available Here.



Source by : http://www.serasidis.gr/
Designed by: Olesaether, Terie Frostad, Ingar Fredriksen, Morten W. Lund, Haakon Skar, Paal Kastnes