Showing posts with label Electronics. Show all posts
Showing posts with label Electronics. Show all posts

Sunday, 29 November 2020

Nissan Skyline R34 GTT remote locking & alarm

So what's it like to own a Skyline?

I'm not gonna lie: the R34 Skyline is a car that I've lusted after for years, and seeing this beauty in my garage never fails to put a smile on my face!

The downside

Constant worries! Theft risk was apparently not much of a problem when this car was produced. Although the car does have central locking, Nissan didn't think it was necessary to fit an alarm system. How different is that situation now, with people constantly taking pictures of the R34 on the streets and in parking lots. To stop myself from having to look outside every five minutes one of the first things that needed to be added was a decent alarm system.
NO, I'm not going to share details on the alarm for this car, LOL. However, one of the things I needed to find out was how to link the alarm's central locking feature to the car's existing electronics. The way to do this is described below; hopefully it will help others in the future.


The challenge

The wiring diagram clearly shows the lock / unlock connections that need to be used to add the new remote locking signals coming from the alarm unit (pins 10 and 11 on the original Remote Locking module). Pulling these pins low (e.g. to ground) will activate the lock/unlock function.

The issue with this? When using these pins, only the driver's door will lock/unlock with the new remote! Something clearly needs to be changed to also make the passenger door work.

 

A simple solution

Luckily the fix for this problem is an easy one. First, locate the Remote control entry module mounted next to the steering column:


Remove the board from its plastic case:

The only change that will need to be made is to bridge the two diodes located in the top right corner of the picture above. Here's a detailed picture of the diodes:


That's it! The diodes separate the signals for the doors; without these the alarm remote will work as expected, locking and unlocking both doors.

 

Did this help you? Please let me know

Please feel free to leave a comment below if you have any questions about this change. Also, I'd like to hear from you if this article was helpful to you!

Friday, 4 May 2018

Building a TTN gateway

Following a Things Network meeting in my hometown, I decided to try and move things forward by donating a Raspberry Pi / IMST 880A - based gateway to the guys from Zuid-West TV . They have access to a number of high locations in the area, and are currently building a nice metal cabinet with an internal power supply, which will then be installed on top of one of the highest buildings in Bergen op Zoom. More on that later!
However, in the meantime my original TTN gateway in Roosendaal had suddenly gone very quiet. As it turns out, the gateway range is suddenly limited to about 10 meters! Clearly something is amiss here? It seems that the internal RF receiver has given up, something that cannot be easily repaired and needs to be looked at by the Things Network team.
As there is no way to predict how long this will take, I've quickly built myself a new gateway, based on the proven Raspberry Pi and IMST IC880A board...

A quick 'n dirty gateway build!


So here's what you need to build yourself a multichannel gateway:

The main parts shown in the picture are a Raspberry Pi 2, the IMST IC880A concentrator board, an adapter board to connect the two, and a small housing to put the gateway into. Quite easy, no? Well, that depends on how fancy you want your gateway to be. I just needed it to be simple and reliable, so here's what I did:

1: Put the concentrator and adapter board together
I wanted my gateway to be as compact as possible, so I've soldered the concentrator directly onto the adapter board. I also cut off the original micro-usb connector from the adapter, because it would not fit in my compact housing. However, the adapter also comes with headers which can be used to plug in the concentrator so it is removable.

2: Connect the adapter to the Raspberry Pi
My housing has slots to hold a pcb board, so I've cut a blank board to size and mounted the gateway on it using 5mm plastic spacers. This way no screws are visible from the outside, which is a bonus :)

3: Slide the gateway assembly in the slots

4: Add power supply connections
 Although it is possible to connect the power supply directly, I much prefer to use a proper power connector. I also added an LED, and made a cutout for the network connector, which makes it look like this:
Wiring power to the board was done by connecting power directly to pins 21 (+VDD) and 22 (GND) of the concentrator board. The adapter will then also power the Raspberry Pi, keeping the number of wires to a minimum.

 5: Put it all together
The other end has the SMA connector, which connects to the IMST board. Removing this end will also allow access to the SD card:
The end result looks like this!

Installing software and registering the gateway


Now that the gateway is finished, you will need to install and configure the whole thing of course. Instead of describing this whole process, I'm going to be lazy and refer you to the excellent walk-through put together by the Things Network Zurich group:

From zero to LoRaWAN in a weekend


They've done a very good job in describing the whole installation, which will result in a fully functional gateway. Great work guys!

Parts list


IMST IC880A concentrator board
Raspberry Pi (preferably v2, but v3 will also work)
Adapter board (I used the one from Hackables.cc)
U.Fl to SMA pigtail
5V / 2A adapter (I used a Raspberry Pi adapter)
A suitable housing (mine is a Hammond 1455K1202)
Power connectors
Some nuts, bolts and spacers (depends on the housing used)

Sunday, 24 June 2012

An All-Tube Stereo Level indicator


Add some tube nostalgia to your modern stereo

Every tube loving electronics enthusiast has some tubes in his/her collection that are designed for such specific tasks, that they are very difficult to use for anything else. One of these difficult tubes is the EABC80 (6AK8). They are found in many older tube radios, and contain a triode and three diodes, two of them connected internally to the cathode of the triode. This makes it very hard to use them for anything other than what they were originally designed for.
Another tube that almost everybody has in their collection is the EM84 (6FG6) tuning indicator. Many people agree that these tubes were the eye-catcher of many tube radios. However, today almost no one uses them anymore. Well, things are about to change! With a few hours of work you can bring those nice indicator tubes back into your living room, and as an added bonus the design uses two EABC80 tubes and a tube rectifier.

Schematic diagram


 As you can see in the schematic diagram, the triode section of the EACB80 is used to amplify the incoming audio signal. The internal diodes are then used to create a negative voltage, which is fed to the input of the EM84. The RC combination connected to the grid of the EM84 provides a peak-hold function, and can of course be altered to suit everyone's individual tastes.

Putting it together


Caution! Tube circuits use lethal voltages! Don't say I didn't warn you!

As can be seen in the pictures, i have made a printed circuit board for my level indicator, but the simple nature and low parts count of this design allows many other ways to build it.  Unfortunately I don't have the time to make and send you a copy of this PCB, but for those of you who want to etch the board themselves, here is the layout in PDF format.
The power transformer I used came from an old Philips radio, but almost any transformer can be used, provided it can supply 6.3V @ 2A and about 500VCT @ 10mA. The 10k resistors in the B+ line can be tweaked to get the correct voltage (should be between 250V and 275V DC). The rectifier tube can be an EZ81 (6CA4) but an EZ80 may be even better, because it has the same size as the rest of the tubes.



Usability

Although this stereo level indicator is a great step forward from the usual LED or LCD devices, both in speed and in looks, it is NOT a 100% accurate measuring device. It can be used to compare one recording to another, but lacks the speed and accuracy to provide a reliable clipping detection. But it sure looks cool!
The bandwidth of the device is 20Hz - 100kHz, which is more than enough to ensure an accurate reading for most purposes, and certainly better than most analog meters. However,  as Jukka Tolonen points out in his excellent article on this subject, a 'perfect' peak detector should have an even greater range for adequate peak detection, and should include a full wave rectifier to deal with both negative and positive peaks in the signal. Jukka 's full article can be found here: Peak Reading Level Meter Using Indicator Tubes.
Unfortunately this goal is difficult to achieve with an all-tube design, and would certainly not be a beginners project. Within its limitations however, this level meter gives a fairly accurate view of the incoming audio signal. Adding a full-wave rectifier is of course possible, and could lead to even better results. Solid state diodes are out of the question of course! Besides, that would make things way too easy :-)
A possible idea would be to use EAA91 (6AL5) diodes... if anyone cares to give this a try please let me know!


(Article originally published in VALVE magazine 2/2003)

Tuesday, 29 November 2011

Elmer 160 -  PIC introduction

Want to get started with PIC microcontrollers? If so, here's a link to a nice introductory course:

Elmer 160 - Course Lessons

This course will get you started with programming controllers using Microchip's MPLAB development suite, available as a free download from the Microchip website.

So now it's a stopwatch.

After watching the numbers flash by, produced by the code in my previous article, i now tweaked the program to do something useful for a change. The display will now count to 59.9 seconds, and resets when a button is pressed. It still isn't very sophisticated, and a $2.00 wristwatch will actually do a much better job, but that wasn't the point :-)

Tuesday, 22 November 2011

A small step for mankind, a giant leap for... me!

Finally, last night I had some time to spare... enough to fire up MPLAB, Microchip's microcontroller development studio. I'd spent some time trying to learn to program in assembler, then in C, but gave up in frustration. But, as any true geek knows, projects like this keep on nagging in the back of your mind. So, I decided to give it another go, this time trying to make a counter on the LED display of my homemade controller board, using a PIC16F630:


For some reason, this 16F630 controller never, ever does what it's supposed to do, at least not in my world. This time however, I was determined to get the bastard to submit to my will, instead of the other way around! After an hour or so, I came up with the following:

--------------------------------------------
//Includes & references
#include <htc.h>

//Processor configuration (look in processor header file for definitions)
__CONFIG(FOSC_INTRCIO & WDTE_OFF & PWRTE_OFF & BOREN_OFF &
    MCLRE_OFF & CPD_OFF & CP_OFF);

#define _XTAL_FREQ    4000000
#define DIGIT0        RA0
#define DIGIT1        RA1
#define    DIGIT2        RA2
#define    BUTTON1        RA5

//Global variables
//int counter = 0;

//Put initialization code here
void init (void)
{
    //Disable interrupts
    INTCON        = 0b00000000;
    PIE1        = 0b00000000;
    //Set options
    OPTION_REG    = 0b10000111;
    //Switch off comparator to enable digital I/0
    CMCON        = 0b00000111;
    //Set port directions
    TRISA        = 0b00101000;
    TRISC        = 0b00000000;
    //T1CON        = 0b00110101;
}

/**** Function prototypes ****/
void ShowDigit (int Number);

/**** Main function block ****/
void main (void)
{
    init();
    int count = 0;
    int i = 0;
    for (;;)
    {
        //Blank display before digit switch
        ShowDigit(11);
       
        switch (i)
        {
            case (0):
            //Digit 2 (MSB)
            //PORTA = 0b11111011;
            DIGIT0 = 1;
            DIGIT1 = 1;
            DIGIT2 = 0;
            break;
            case (1):
            //Digit 1
            //PORTA = 0b11111101;
            DIGIT0 = 1;
            DIGIT1 = 0;
            DIGIT2 = 1;           
            break;
            case (2):
            //Digit 0 (LSB)
            //PORTA = 0b11111110;
            DIGIT0 = 0;
            DIGIT1 = 1;
            DIGIT2 = 1;
            break;
            default:
            //PORTA = 0b11111111;
            ;
        }
       
        //Show next number
        ShowDigit(count);
        __delay_ms(500);
        i++;
        if (i > 2)
            i = 0;
        count++;
        if (count > 9)
            count = 0;
           
        //Reset counters when sw1 is pressed
        if (!BUTTON1)
        {
            i = 0;
            count = 0;
        }
    }
}

/**** Functions ****/

//Call with 0 - 9 to show digit. All other values blank the display.
void ShowDigit (int Number)
{
    switch (Number)
    {
        case (0):
        PORTC = 0b000000;
        RA4 = 1;
        break;
        case (1):
        PORTC = 0b111001;
        RA4 = 1;
        break;
        case (2):
        PORTC = 0b100100;
        RA4 = 0;
        break;
        case (3):
        PORTC = 0b110000;
        RA4 = 0;
        break;
        case (4):
        PORTC = 0b011001;
        RA4 = 0;
        break;
        case (5):
        PORTC = 0b010010;
        RA4 = 0;
        break;
        case (6):
        PORTC = 0b000010;
        RA4 = 0;
        break;
        case (7):
        PORTC = 0b111000;
        RA4 = 1;
        break;
        case (8):
        PORTC = 0b000000;
        RA4 = 0;
        break;
        case (9):
        PORTC = 0b010000;
        RA4 = 0;
        break;
        default:
        //Defaults to blank
        PORTC = 0b111111;
        RA4 = 1;   
    }
}

-------------------------------------------- 

Predictably, this did not work... at first. The output ports would not react the way I wanted, resulting in strange characters on the display. As a last resort, i turned to the 16F630 manual. And Eureka! Because of the fact that many of the controller's pins have multiple functions, it is very important to set up the peripherals correctly. Switching off the internal comparator by including the command:

CMCON        = 0b00000111;

did the trick! So now i've got a 3-digit counter of sorts, which counts from 0 to 9 across the 3 digits, and resets when a button is pressed. Next step is to implement multiplexing, and make this into a useful counter / stopwatch. Also, the button should activate an interrupt, making it more responsive. The way things are going, this may take another year.. but hey, at least now it works!

Update: Let's watch the result: