udamonic.com
  • Start
    • What is a Scamp?
    • Getting Started
    • Getting Started (Windows)
  • Learn
    • What is Forth?
    • Arithmetic
    • The Stack
    • Creating Words
    • Compilation Tricks
    • Decompilation
    • Comments
    • Characters and Strings
    • Accessing Memory
    • Constants, Variables and Values
    • Flow Control
    • Loops
    • Data Structures
    • Doubles, Triples and Quads
    • FlashForth Dictionary Reference
    • Scamp Dictionary Reference
  • Extras
    • Interrupts
    • Timers
    • Multitasking
    • Delays and Tick Count
    • Processor Words
    • Starting up with turnkey
    • Changing the Prompt
    • Formatting Text on Screen
  • Interfacing
    • Using the LED Array
    • Temperature Sensor
    • Input/Output
    • Analog Input
    • Serial >
      • Serial Communication
      • Scamp Serial Comms
      • Scamp2 UART Pins
    • I2C >
      • I2C Overview
      • I2C Commands
    • SPI
    • PWM
    • Peripheral Pin Select
    • Input Capture
    • Digital Signal Modulator
    • DataFlash
    • RS485
  • Create
    • Scamp Projects on Youtube
    • Prototyping >
      • Protoboards
      • Fabricating PCBs
      • Soldering
    • GPIO >
      • Adding Extra GPIO
      • 32-bit GPIO Module
      • Adding a Low Side Switch
    • Sensing >
      • Measuring Temperature
    • LEDs >
      • Adding LEDs
      • LED arc-welder effect
    • Memory >
      • Adding MRAM
      • AT24C256 EPROM Driver
    • Displays >
      • Adding a 7 Segment Display
      • Adding a Touch LCD
      • Touch LCD GUI
      • Game of Pong
    • FizzBuzz
    • Model Train Control
    • Adding a Real Time Clock
    • 1-D Pacman
  • Resources
  • Buy
  • Consulting
  • About

CREATE : GPIO : Low Side Switch Module
​

The Low Side Switch (LSS) module design uses an Infineon Technologies BTS3408G (datasheet).

It can switch two external devices or systems on or off, at supply voltages of between +5V and +60V DC. The total current limit is 1A maximum, with a nominal load current of 450 mA per channel. The on-resistance for each channel is 550 mΩ.

Schematic
module_lowside.pdf
File Size: 167 kb
File Type: pdf
Download File

Each channel has a LED to indicate when that channel is activated, and a FAULT LED indicates an overload or underload condition. The voltage supply (Vs = +5V to +60V) is polarity protected by a DFLS110 diode, however for correct operation ensure that Vs polarity is correct. The polarity is clearly marked on the module. The ON LED illuminates when 3V3 power is present. It is not an indication of Vs. 

Up to four LSS modules may be stacked on your Scamp, giving you up to 8 channels of control.

​
The LSS is controlled by a PCA9554D port expander on the I2C bus. The address selection switch maps the PCA9554D to an address in the range $24 to $27. Once the LSS module is attached to your Scamp, use the modules word to scan for its presence.
The following word definition configures the PCA9554D to control the BTS3408G LSS chip:
\ low side switch configuration

: lssconfig  ( address -- , configure lss switch at I2C address )
   dup
   start 
   write drop
   1 send drop
   0 send drop
   stop
   start 
   write  drop
   $3 send drop
   $ec send drop
   stop
; 
Prior to configuration, the default state is off. Before use, the LSS must be configured with the lssconfig word. To use it, place the I2C address on the stack and call the word. For example, to configure an LSS at address $24:
$24 lssconfig
The following word definition allows you to turn channels on or off:
: lss   ( ch address --  , turn lss channels on or off )
        ( ch 0 = all off, 1, 2, 3 = all on )
   start 
   write drop 
   1 send drop 
   $90 or          
   send drop 
   stop 
;  
If the LSS is at address $24​, then to turn channel 1 on only, the following command is used:
1 $24 lss
Channel 1 off and channel 2 on:
2 $24 lss
Both channels on:
3 $24 lss
Both channels off:
0 $24 lss

Fault Conditions
​

When a fault condition exists, the FAULT LED will illuminate. A fault condition may be a short circuit, an overload, or a thermal shutdown. If a channel is on and there is no supply voltage present, this is also considered a fault condition and the FAULT​ LED will illuminate. Thermal shutdown will occur when the temperature of the BTS3408G exceeds 165°C. 

Site powered by Weebly. Managed by Hostwinds
  • Start
    • What is a Scamp?
    • Getting Started
    • Getting Started (Windows)
  • Learn
    • What is Forth?
    • Arithmetic
    • The Stack
    • Creating Words
    • Compilation Tricks
    • Decompilation
    • Comments
    • Characters and Strings
    • Accessing Memory
    • Constants, Variables and Values
    • Flow Control
    • Loops
    • Data Structures
    • Doubles, Triples and Quads
    • FlashForth Dictionary Reference
    • Scamp Dictionary Reference
  • Extras
    • Interrupts
    • Timers
    • Multitasking
    • Delays and Tick Count
    • Processor Words
    • Starting up with turnkey
    • Changing the Prompt
    • Formatting Text on Screen
  • Interfacing
    • Using the LED Array
    • Temperature Sensor
    • Input/Output
    • Analog Input
    • Serial >
      • Serial Communication
      • Scamp Serial Comms
      • Scamp2 UART Pins
    • I2C >
      • I2C Overview
      • I2C Commands
    • SPI
    • PWM
    • Peripheral Pin Select
    • Input Capture
    • Digital Signal Modulator
    • DataFlash
    • RS485
  • Create
    • Scamp Projects on Youtube
    • Prototyping >
      • Protoboards
      • Fabricating PCBs
      • Soldering
    • GPIO >
      • Adding Extra GPIO
      • 32-bit GPIO Module
      • Adding a Low Side Switch
    • Sensing >
      • Measuring Temperature
    • LEDs >
      • Adding LEDs
      • LED arc-welder effect
    • Memory >
      • Adding MRAM
      • AT24C256 EPROM Driver
    • Displays >
      • Adding a 7 Segment Display
      • Adding a Touch LCD
      • Touch LCD GUI
      • Game of Pong
    • FizzBuzz
    • Model Train Control
    • Adding a Real Time Clock
    • 1-D Pacman
  • Resources
  • Buy
  • Consulting
  • About