Locodoco/Loco Decoder: Unterschied zwischen den Versionen

Aus LaborWiki
Wechseln zu: Navigation, Suche
Zeile 44: Zeile 44:
* 2 Switching outputs, 1A each + 1x500mA Output (shared with 2nd Servo connector)
* 2 Switching outputs, 1A each + 1x500mA Output (shared with 2nd Servo connector)
* 2 Servo Connectors (with 5V voltage levels)
* 2 Servo Connectors (with 5V voltage levels)
* SUSI Interface (with 5V voltage levels)
* SUSI Interface
* Connector for infrared transceiver
* Connector for infrared transceiver
* Support for the RFM12, RFM12B and similar communication modules
* Support for the RFM12, RFM12B and similar communication modules
Zeile 51: Zeile 51:
* 2-gear load regulation circuit (with 4x gain "switch")
* 2-gear load regulation circuit (with 4x gain "switch")
* Track voltage measurement
* Track voltage measurement
* Support for additional external rectifier for LM2576 and the high current switches
* Support for additional external rectifier for high current switches


The overall circuit is designed to be as flexible as possible and highly configurable by the user. Many components are optional and don't have to be present on the board to provide basic functionality. The board provides support for 1 up to 3 different power regulators and voltages in order to meet the requirements of all components on the loco. The high-current (LM2576) may for example be used for the 18V smoke generator, while the 7805 provides stable 5V power for servos.
The overall circuit is designed to be as flexible as possible and highly configurable by the user. Many components are optional and don't have to be present on the board to provide basic functionality. The board provides support for 1 up to 3 different power regulators and voltages in order to meet the requirements of all components on the loco. The high-current (LM2576) may for example be used for the 18V smoke generator, while the 7805 provides stable 5V power for servos.


==== 5V vs. 3.3V ====
==== 5V vs. 3.3V ====
When using 5V logic levels instead of 3.3V, 7 additional resistors may as well be omitted, since they are (were) to be used as pullup resistors when working with 3.3V logic levels (i.e. for the SUSI interface and Servos). The 3.3V regulator is however mandatory when using a RFM12B module instead of the RFM12 variant.
The AVR is powered with 5V, but the RFM12'''B''' can't operate at voltages above 3.6V. The circuit provides the option to use an 3.3V power regulator for the RFM12B module. This additional regulator is not needed when using the 5V version of the transceiver module (RFM12).
 
When using the RFM12 module, the 5 resistors connecting the RFM12 with the Microcontroller may be omitted and replaced by 0-Ohm variants (aka a dip of soldering tin).


==== Motor velocity measurement ====
==== Motor velocity measurement ====

Version vom 19. September 2011, 13:47 Uhr

This Page is part of the Locodoco project. It currently only contains some vague notes about the planned version of the loco decoder.

List of (planned) features

Common on both Versions
  • SUSI interface Support
  • internal 3.3V logic levels (for RFM12b)
  • measurement of rail voltage (= option for DCC integration)
  • measurement of generator voltage (motor speed/load regulation)
  • connector for IR transceiver
  • seperate out/inletlets for each, motor-driver and logic power supply (GoldCaps)
  • 4 GPIO Pins
  • Processor: One out of Atmega8, Atmega168 and friends (all pin compatible devices)
Big version
  • 5V power regulator, 3A
  • 3 servo connectors
  • >= 3A constant Motor current
  • Socket for add-ons (shields)
  • 2 N-Fets for high loads, 4A each, seperate rectifier to GND
  • 4 additioal GPIO Pins
Small version
  • 1A Motor current
  • Maximum dimensions: 22x60x10mm

Two Versions

Larger locomotives provide a "massive" amount of space and require some more Amps to drive their engine(s). While the big version of the decoder includes many features, the small version is a rather minimalistic approach.

The hardware design of both versions however is designed to be as flexible as possible, letting the user choose the components to use from a variety of parts. The Processor for example may be an Atmega8, which is rather cheap, or the more expensive Variant Atmega328.

"Big" Version

Schematic for the big version

A (preliminary) schematic for the big decoder version is checked into the SVN repository. It's main features are:

  • Different options for power regulators: 7805, 7812 and similar, LM2576 and similar, LM2574 (logic level)
    • All 3 Power Regulators may be used - i.e. for 3 different supplies
    • Only one is mandatory - all of them may be used as logic power supply
  • Two Seperate connectors for Goldcap buffers with current limiting, one for each, VCC and logic supply buffering
  • 3.3V or 5V Power regulator for logic levels (at option)
  • 2 Mosfet power outputs, alternatively 2x500mA Transistor outputs
  • 2 Switching outputs, 1A each + 1x500mA Output (shared with 2nd Servo connector)
  • 2 Servo Connectors (with 5V voltage levels)
  • SUSI Interface
  • Connector for infrared transceiver
  • Support for the RFM12, RFM12B and similar communication modules
  • 4A max. Motor current
  • DCC support (at least in hardware... ;))
  • 2-gear load regulation circuit (with 4x gain "switch")
  • Track voltage measurement
  • Support for additional external rectifier for high current switches

The overall circuit is designed to be as flexible as possible and highly configurable by the user. Many components are optional and don't have to be present on the board to provide basic functionality. The board provides support for 1 up to 3 different power regulators and voltages in order to meet the requirements of all components on the loco. The high-current (LM2576) may for example be used for the 18V smoke generator, while the 7805 provides stable 5V power for servos.

5V vs. 3.3V

The AVR is powered with 5V, but the RFM12B can't operate at voltages above 3.6V. The circuit provides the option to use an 3.3V power regulator for the RFM12B module. This additional regulator is not needed when using the 5V version of the transceiver module (RFM12).

When using the RFM12 module, the 5 resistors connecting the RFM12 with the Microcontroller may be omitted and replaced by 0-Ohm variants (aka a dip of soldering tin).

Motor velocity measurement

Motor velocity, or the generator voltage is measured accross both connectors of the motor. The resistor network of the motor measurement circuit is designed to forward 1/6 th of the generator voltage to the ADC of the AVR when the "sense_dec" resistor is not connected and 1/24th of the voltage when the resistor is connected to GND. Since the ADC of an Atmega328P has a reference voltage of ~1V at max., this schematic allows for sampling generator voltages up to 6V at a resolution of 1024bits - thus provides a very accurate reference (~6mV per Step) and very percise driving behaviour at low speeds. For voltages above 6V, the "sense_dec" resistor must be pulled to GND to assure that the reference volage is still within the measurable range of the ADC. When pulled to GND, the entire resistor network divides the generator voltage by (approx.) 24. With the division factor 24, the ADC measurement equals ~23mV per step.

Load regulation

A common feature among digital model railroad systems is load regulation and measurement of the actual speed of the motor. When performing scripted actions like (de)coupling cars on a certain point of the layout, it is essential to know the actual speed of the loco. I've done some experimenting with different circuits and documented the results in a small video.