Archive for the ‘Microprocessor Systems’ Category

Solid State Switches – Zero Crossing

December 12, 2007
I spent today building a prototype microcontroller system to control the power supply to an incar computer system.
The system takes battery, ignition, door lock etc as inputs.
It outputs PC power switch, PSU control signal and audio blanking with processing based upon the inputs with delays.
 
I am actually using a Basic Stamp Proff. Dev Board because  Rapid Prototyping is easy with it.
(Parallax have doen a nice job on their web site recently)
Intend to go to PCB later with, say, a PIC micro.
 
I had an earlier system based upon reed switches and ULN2003A (Darlington Pairs switches) as current driver for the relays and outputs back to the car.
 
For this version I intended to use SSRs (solid state switches) but I spent a couple of hours chasing my tail!
I didn’t have a data sheet and couldn’t find one so I assumed input meant that and output meant that.
Could find the part no. with any internet search engine.
Jaycar, the supplier did not have any data sheets, or link to.
5V Reed Swich CAT. No. SY4030
12V Reed Switch CAT No. SY4032
12V Relay Cat No. SY4052
5V SSR Cat No. SY4088
I’ll post the datasheet linkas as comments below
 
I eventually found the data sheet by reducing the training characters on teh part no. until I got a match that made sense .. and a supplier.
I then drilled into the supplier’s web site and found it, including a matching picture!
(I used this approach later for some reed switches  as well with success).
 
On reading the documentation and a bit more Wiki sluething the cause of my problem was this:
– The SSRs were AC SSRs with Z
– This means that they don’t switch after the input logic enables the output until the voltage across the output is zero!
– This won’t happen with a DC voltage !!
– This makes sense of course
 
So I went back to using reed switches (5V versions) .. Next problem!
Do I need to use a current sink device to power the control circuit of the switch?..Look at the data sheet stupid..if you can find it.
It says that they can be driven by TTL levels, so I was possibly in luck.
I tried this, by driving the reed switches directly from the microprocessor outputs  .. It worked!
My system was instantly simplified
 
WALA! QED!
 
Next I wanted to isolate the power supply from the battery (12V) when the computer is fully turned off (One original reasons for using the multi-amp SSR in teh first place.  I implemented this with a 5A load relay that needs to be driven with 12V (actually 9-15V).  This I drove from a current switch using the input to board’s voltage regulator. .. And it all now works
 
Tomorrow: Make it all work with the computer incar!
======================
Notes: The Computer runs XP Embedded with HORM
The power supply is M3-ATX device
 
Refs.
 

CAN BUs References (AS URLs)

April 11, 2007

CAN Bus URLs

 

Here is the list of links as promised in a previous Blog entry:

References

Original Bosch Specification http://www.semiconductors.bosch.de/pdf/can2spec.pdf

·         “An Overview of Controller Area Network (CAN) Technology, Mannisto & Dawson, Nov 03, mBus, http://www.parallax.com/dl/docs/prod/comm/cantechovew.pdf

·         “15 Years of CAN”,  http://www.canopen.us/history.htm

·         Wikipedia (CANBus)

o   http://en.wikipedia.org/wiki/Controller_Area_Network

·         There are numerous other discussions of the CAN Bus

·          

·         AN228 (ISO1198) http://ww1.microchip.com/downloads/en/AppNotes/00228a.pdf

·         TTCAN: http://www.can-cia.org/can/ttcan/

There are several CAN physical layer standards:

·         ISO 11898-2: CAN high-speed

·         ISO 11898-3: CAN fault-tolerant (low-speed)

·         ISO 11992-1: CAN fault-tolerant for truck/trailer communication

·         ISO 11783-2: 250 kbit/s, Agricultural Standard

·         SAE J1939-11: 250 kbit/s, Shielded Twisted Pair (STP)

·         SAE J1939-15: 250 kbit/s, UnShielded Twisted Pair (UTP) (reduced layer)

·         SAE J2411: Single-wire CAN (SWC)

·         GMW3089: GMLAN Single Wire CAN Physical and Data Link Layers Specification-Engl; Revision D

 

CAN Bus Electrical Interface Circuit

Ref http://www.interfacebus.com/Design_Connector_CAN.html

 

 

References

 

 

Other USB-LAN Connectors:

·         There is also a CAN device The Grifo with a DIP28 profile that does a multitude of things at
http://www.grifo.com/CAN/uk_gm1.htm

·          

·         Wikipedia (CANBus)

 

 

1.      GMW3089, GMLAN Single Wire CAN Physical & Data Link Layers Specification

·         Purchase from: http://auto.ihs.com/collections/gmw/index.jsp?mid=W097
Note : We have a copy

·          

2.     Vehicle-Bus Interface with GMLAN for Data Collection, Pheanis & Tenney,

·         http://www.public.asu.edu/~pheanis/documents/VBI_CAN.pdf

·          

3.     : http://www.vector-cantech.com/va_canbedded_us,,4165.html

http://www.c-a-n.com/pccards.html

www.intrepidcs.com  (Look for neoVI Blue)

CANcaseXL, available CANpiggys and the XL Driver Library for self-programming of applications. In order to work on GMLAN you will need the single wire CANpiggy 5790c opto.

CAN Bus

April 2, 2007
I’ve been working lately on the CAN Bus.  In particular we are interested in getting live information from teh vehicle for logging purposes and for making some real-time decisons.  CAN means controller area network and was originally specified by Robert Bosch.  It involve the 2 bottom layers of teh OSI model:
Layer1:  Physical Layer
Layer2: Data Link layer (Data Packets).
 
There exists controllers that implement layer 2 with an interface to a microcontroller through interfaces such as SPI.  There are also microcontrollers that implement layer 2 themselves.  Both of these devices send and receive through a Tx and Rx signal at TTL levels that then needs to be translated into the physical layer.  Typical CAN layer 1 is a twisted pair (2 wire) with logic 0 (recessive) having both wires at the same voltage and logic 1 (dominant) having them at least 1.5V apart so the receiver only needs to do a difference.   There exists ICs to take the level 2 signals and turn them into level 1 signals.  There are also single wire implementations of layer 1 with ICs being available.  For example teh low speed GMLAN is single wire.  There is also an Israeli company that has car (DC) power line modulation for Layer 1 CAN.  A WiFi or Bluetooth version of layer 1 CAN would be interesting!
 
The layer 2 protocol takes care of collision avoidance (necessary because its a singlel bus -multiple drop) wiithout retransmission based upon priority bits being in the leading part of the packet.
 
The use of controllers as an add-on to a microcontroller has the added complexity that you have to implement the interface messaging as well, eg SPI.  There is a standalone controller that has A2D, PWM and GPIO that gets programmed over CAN.  I have some samples and are keen to get started on this.
 
Of interest is that messaging is above layer 2 (typically 3) in the OSI model.  Layer 2 CAN only specifies 1 to 8 data bytes (Short messages) , nothing about what is in those data bytes; although there are other bits in a CAN packet, check sum , priority bits etc… The layer 2 controller adds those.  To interact with a proprietary CAB Bus, eg in a vehicle, you have to know what message structure within those 1 to 8 bytes it is using.  Knowing the CAN protocol is not not enough.  I’ll follow up with a list of CAN URLs and some other stuff.
Cheers