Category Archives: Hardware Hacking

C Electronics Hardware Hacking i2c PIC

XC8 + PIC 16F1509 with the Wii Nunchuk (yet another…)

A quick and dirty PIC to Wii Nunchuk project
A quick and dirty PIC to Wii Nunchuk project

I needed a “quick fix” of bench time.. I’ve been working on hunny-dos replacing light switches with dimmers, replacing our HVAC control with a remote network interfaced controller, etc… I needed a little bench time! I took the first quick-looking project off my “shelf of unfinished or unstarted projects”. Wii Nunchuk + a little eBay interface board that cost me a dollar or two. I spent the evening getting some C code set up using the data sheet at robotshop and some 80s music.

The TAUTIC 20 Pin PIC dev board was an obvious, I already had done some recent I2C code on it; reuse, reduce, recycle!

I wrote the code to look for the “Z” button push. The C & Z buttons threw me off a bit because I think the datasheet was a little off in some of the text. The last two bits (LSB) of the 5th status response bytes indicate the button positions of BOTH buttons. It incorrectly states one bit is for one button and the other for the other. This is the table I figured out using the Saleae logic analyzer:

0Bxxxx xx11 no buttons pushed

0Bxxxx xx01 C pushed

0Bxxxx xx00 Z pushed

0Bxxxx xx10 both buttons pushed

This is a white original Wii remote…. I didn’t do any OR decoding, etc.. I didn’t really pay much attention to the other data other than verifying it actual works.

The code doesn’t do much; we initialize the *white* nunchuk and then turn on LATA1 port when the Z button is pressed (but not the C and Z simultaneously). From here everything is popped into a variable for your happy hardware hacking needs!

Well anyways.. what you’re here for! The code:


/*
 * File:   main.c
 * Author: Charles M Douvier
 * Contact at: http://iradan.com
 *
 * Created on January 26, 2014, 12:00 PM
 *
 * Target Device:
 * 16F1509 on Tautic 20 pin dev board
 *
 * Project:
 *  Wii Nunchuck
 *
 * Version:
 * 0.1  Start Bit, and Control Byte ... check
 * 0.2  Read_State Success

 *
 */
#ifndef _XTAL_FREQ
#define _XTAL_FREQ 4000000 //4Mhz FRC internal osc
#define __delay_us(x) _delay((unsigned long)((x)*(_XTAL_FREQ/4000000.0)))
#define __delay_ms(x) _delay((unsigned long)((x)*(_XTAL_FREQ/4000.0)))
#endif

#include 
#include 
#include 
#include 

//config bits
#pragma config FOSC=INTOSC, WDTE=OFF, PWRTE=ON, MCLRE=ON, CP=OFF, BOREN=OFF, CLKOUTEN=OFF, FCMEN=OFF
#pragma config WRT=OFF, STVREN=OFF, LVP=OFF


#define _XTAL_FREQ 4000000 //defined for delay

    unsigned int ACK_bit;
    int i, x;   //garbage flags
    long int tempi, tempn, tempx, tempy, temp10, temp25;
    unsigned char byte, tempbyte1, tempbyte2;
    unsigned char StatusByte;
    unsigned char RESP1Byte, RESP2Byte, RESP3Byte, RESP4Byte, RESP5Byte;
    unsigned char RESP6Byte, RESP7Byte, RESP8Byte, RESP9Byte, RESP10Byte;
    char buf[10];

void init_io(void) {

    ANSELA = 0x00; // all port A pins are digital I/O
    ANSELB = 0x00; // all port A pins are digital I/O
    ANSELC = 0x00; // all port B pins are digital I/O

    TRISAbits.TRISA0 = 0; // 
    TRISAbits.TRISA1 = 0; // 
    TRISAbits.TRISA2 = 0; // 
    TRISAbits.TRISA3 = 1; // /MCLR
    TRISAbits.TRISA4 = 0; // 
    TRISAbits.TRISA5 = 0; // 

    TRISBbits.TRISB4 = 1; // RB4 I2C SDA, has to be set as an input
    TRISBbits.TRISB5 = 1; // RB5 NC (RESERVED RS232)
    TRISBbits.TRISB6 = 1; // RB6 I2C SCLK, has to be set as an input
    TRISBbits.TRISB7 = 0; // RB7 NC (RESERVED RS232)

    TRISCbits.TRISC0 = 0; // 
    TRISCbits.TRISC1 = 0; // 
    TRISCbits.TRISC2 = 0; // 
    TRISCbits.TRISC3 = 0; // 
    TRISCbits.TRISC4 = 1; // 
    TRISCbits.TRISC5 = 1; // 
    TRISCbits.TRISC6 = 1; // 
    TRISCbits.TRISC7 = 1; // 
}

/*
 *  I2C Functions
 *
 */

void I2C_ACK(void)
{
   PIR1bits.SSP1IF=0;          // clear SSP interrupt bit
   SSP1CON2bits.ACKDT=0;        // clear the Acknowledge Data Bit - this means we are sending an Acknowledge or 'ACK'
   SSP1CON2bits.ACKEN=1;        // set the ACK enable bit to initiate transmission of the ACK bit to the serial eeprom
   while(!PIR1bits.SSP1IF);    // Wait for interrupt flag to go high indicating transmission is complete

}

void Send_I2C_Data(unsigned int databyte)
{
    PIR1bits.SSP1IF=0;          // clear SSP interrupt bit
    SSPBUF = databyte;              // send databyte
    while(!PIR1bits.SSP1IF);    // Wait for interrupt flag to go high indicating transmission is complete
}

unsigned char RX_I2C_Data (void)
{

    RCEN = 1;               //
    while( RCEN ) continue;
    while( !BF ) continue;
    byte = SSPBUF;
   return byte;
}

void I2C_Control_Write(void)
{
    PIR1bits.SSP1IF=0;          // clear SSP interrupt bit
    SSP1BUF = 0xA4;             // send the control byte 
    while(!PIR1bits.SSP1IF)     // Wait for interrupt flag to go high indicating transmission is complete
        {
        i = 1;
          // place to add a breakpoint if needed
        }
    PIR1bits.SSP1IF=0;

}

void I2C_Control_Read(void)
{
    PIR1bits.SSP1IF=0;          // clear SSP interrupt bit
    SSP1BUF = 0xA5;             // send the control byte
    while(!PIR1bits.SSP1IF)     // Wait for interrupt flag to go high indicating transmission is complete
        {
        i = 1;
          // place to add a breakpoint if needed
        }
    PIR1bits.SSP1IF=0;
   }

void I2C_Start_Bit(void)
{
    PIR1bits.SSP1IF=0;          // clear SSP interrupt bit
    SSPCON2bits.SEN=1;          // send start bit
    while(!PIR1bits.SSP1IF)    // Wait for the SSPIF bit to go back high before we load the data buffer
        {
        i = 1;
        }
    PIR1bits.SSP1IF=0;
}

void I2C_check_idle()
{
    unsigned char byte1; // R/W status: Is a transfer in progress?
    unsigned char byte2; // Lower 5 bits: Acknowledge Sequence, Receive, STOP, Repeated START, START

    do
    {
        byte1 = SSPSTAT & 0x04;
        byte2 = SSPCON2 & 0x1F;
    } while( byte1 | byte2 );
}
/*
 * Send the repeated start message and wait repeated start to finish.
 */
void I2C_restart()
{
    I2C_check_idle();
    RSEN = 1; // Reinitiate start
    while( RSEN ) continue;
}

void I2C_Stop_Bit(void)
{
    PIR1bits.SSP1IF=0;          // clear SSP interrupt bit
    SSPCON2bits.PEN=1;          // send stop bit
    while(!PIR1bits.SSP1IF)
    {
        i = 1;
        // Wait for interrupt flag to go high indicating transmission is complete
    }
}

void I2C_NAK(void)
{
    PIR1bits.SSP1IF=0;           // clear SSP interrupt bit
    SSP1CON2bits.ACKDT=1;        // set the Acknowledge Data Bit- this means we are sending a No-Ack or 'NAK'
    SSP1CON2bits.ACKEN=1;        // set the ACK enable bit to initiate transmission of the ACK bit to the serial eeprom

    while(!PIR1bits.SSP1IF)     // Wait for interrupt flag to go high indicating transmission is complete
    {
        i = 1;
    }
}

/*
 *  nunchuk commands
 *
 */

void initialize_nunchuk(void)
{
// 0xA4 0x40 0x00

    I2C_Start_Bit();                     // send start bit
    I2C_Control_Write();                 // send control byte

    Send_I2C_Data(0x40);
    Send_I2C_Data(0x00);                 //

    I2C_Stop_Bit();
    __delay_ms(100);
}

void start_conversion_with_nunchuck(void)
{
// 0xA4 0x00

    I2C_Start_Bit();                     // send start bit
    I2C_Control_Write();                 // send control byte

    Send_I2C_Data(0x00);                 //0x00

    I2C_Stop_Bit();
			
}



void read_state (void)
{
/*
 *   STATUS, 6 Bytes
 *  Joy X
 *  Joy Y
 *  Accel X
 *  Accel Y
 *  Accel Z
 *  Z, C bits and LSB Accel

*/
//0x52 RX_STATUS
//STATUS, RESP1, RESP2, RESP3, RESP4, RESP5, RESP6

    I2C_Start_Bit();                     // send start bit
    I2C_Control_Read();

    RX_I2C_Data();                      //Joy X
	StatusByte = byte;
    I2C_ACK();

	RX_I2C_Data();                      //Joy Y
	RESP1Byte = byte;
    I2C_ACK();

	RX_I2C_Data();                      //Acc X
	RESP2Byte = byte;
    I2C_ACK();

	RX_I2C_Data();                      //Acc Y
	RESP3Byte = byte;
    I2C_ACK();

	RX_I2C_Data();                      //Acc Z
	RESP4Byte = byte;
    I2C_ACK();

    	RX_I2C_Data();                      //CZ Status LSB
	RESP5Byte = byte;
    I2C_ACK();

    RX_I2C_Data();                      //
	RESP6Byte = byte;
    I2C_NAK();                          //NAK

	I2C_Stop_Bit();                     // Send Stop Bit

}



int main(void) {

    OSCCONbits.IRCF = 0x0d;     //set OSCCON IRCF bits to select OSC frequency 4MHz
    OSCCONbits.SCS = 0x02;
    OPTION_REGbits.nWPUEN = 0;  //enable weak pullups (each pin must be enabled individually)

    init_io();

    __delay_ms(50);            //let the power settle


    TRISBbits.TRISB6 = 1;

    SSPSTATbits.SMP = 1;
    SSPCONbits.SSPM=0x08;       // I2C Master mode, clock = Fosc/(4 * (SSPADD+1))
    SSPCONbits.SSPEN=1;         // enable MSSP port
    SSPADD = 0x27;              //figure out which one you can ditch sometime (probably either)
    SSP1ADD = 0x27;             // 100KHz
                                //0x09 = 100KHz
    // **************************************************************************************


    initialize_nunchuk();
    x = 0;
    LATAbits.LATA1 = 0;
    __delay_ms(50);


    while (1) {
        x = 0;
        LATAbits.LATA1 = 0;

        start_conversion_with_nunchuck();
        __delay_ms(5);
        read_state();
        //RESP6Byte
        if (!(RESP5Byte & 0x02) && !(RESP5Byte & 0x01)){
            x = 1;
        }
        if (x) {
            LATAbits.LATA1 = 1;
        }
        __delay_ms(100);
    }
    return;
}

The only thing that might not work for your application right out of the box is the return through the loop turns off the output for just a bit while the button stays pressed… you would want to change this obviously.

Electronics Hardware Hacking

0xEE.net UART / Weekend Tinkering

We did it,  0xEE.net is live. Our first post is a very detailed look into the PIC UART. This article is a stepping stone for other projects we have lined up. Tell us what you think!

Sunday Morning Tinkering

In other bits I haven’t had a lot of time to do other things, I have been busy building two dev boards and write code for the above mentioned article but my Saturday was spent helping my sister and wife at their yard sale. It came away with a surprise for my daughter and an old Pelco dome camera. Video is a lot more interesting to look at on a scope than it is on an SA.

I also hacked up a super simple camping nightlight for my daughter. We are going camping the weekend after father’s day. I tore a cheap-o handheld temperature gun apart to get the thermopile and had a bunch of spare parts. The battery case and backlighting for the LCD will make a nice nightlight. No switch but she kills the batteries anyways as  her flashlights never get shut off. I’ll have to grab some rechargeables..

camping_nightlight

I hope you all have a pleasant memorial day weekend. I thank all my fallen military service family, and their families for their service and their sacrifice.

Electronics Hack Hardware Hacking MOSFETs

A long week of mouse hacking and projects

I’ve been a little busy on the workbench lately. I’ve been working late at the-day-job so I’ve been neglecting my workbench notebook and my blog for most of this week. I’ve got a ton of “fun” stuff planned for this weekend; no way I’ll get it all done.

I won’t make you read through the whole post if I pulled you in with mouse hacking 😉

I am a poor gamer.. give me a cheat code and I’ll use it. I have no shame in gaming. Adam Fabio recently got me slightly addicted to ClickingBad … I refuse to link it, don’t search for it.. it’s a god-awful time suck. I clicked a freakn’ mouse for 90 minutes straight… Well screw that. I pulled out one of those el-cheapo USB mice you get with a refurb computer… the $5 throw-away kind. I popped it open and as luck would have it little microswitchs on a single sided PCB. Well 2-1/2 minutes later I had soldered wires to the switch contacts, dumped them on the normal open contacts of a small relay,  hooked it up the relay coil to my MOSFET driver (yes, way overkill, it was laying there already), and threw it under a PIC. I used a rate of 70 ms off 40 ms on.. I probably could have sped that up but it was at that warp speed, I was happy. Did it take away from the game? Nah, I had that much more to buy! I was shocked the relay held out for a few days of being hammered (“Batches hand-cooked: 1.01Q” , that’s not a quadrillion clicks, but it was a lot regardless). I pulled my cheat-clicker off after a while because the super-fast click of the relay was getting pretty damn annoying. I had little bug in the system: a little phantom drift issue with the el-cheapo mouse so turned down pointer sensitivity to as slow as possible; That allowed for a couple hour stretch of non-stop cheating.

Mouse Click Hack

Continuing on with actual electronics projects: I have five active projects I’m working on, a few I’ve recently benched waiting on a big purchase, trying to get other stuff out of the way or for other reasons.

1. Video Synth … Lawrence has inspired me to help him build a Video Synth. I’ve gotten a fair amount of reading done. Looks like I’m going to need a spectrum analyzer for some filters I want to build (awww darn! heh). I’ve gotten some boards finished which I needed for other projects but just happened to work for this one as well.

 

Sweep Generator -- Opps I forgot something
Sweep Generator — Opps I forgot something

… version 2.0 of these boards in at the fab. I’ll probably sell some of these for people needed a quick sweep generator for their VCOs, etc.

 

2. Workshop Time Standard  — Just started this because I got most of the parts in. This will be powered by my MikroElectronika PIC clicker and GPS2 click…. Stay Tuned.

3. WWVB for non-US persons… Edward contacted me about using my WWVB project but to actually broadcast the correct time. Well, fair enough. This has gotten me to buy all the stuff I think I need to create a PIC NTP client, GPS NMEA input .. and then the easy part. Broadcast it on 60KHz… I’ll have some kind of notice you should do this in a lead box under the ocean. I certainly wouldn’t sell this to someone within the US. I don’t think the FCC has any rule that allows a person to broadcast any tiny amount of power on 60KHz, certainly not intentionally. I didn’t find anything I thought I’d be safe under Part 15. I’d love to be proven wrong on this.. really.

4. My electric scooter. I just got a welder … now for some more material. Most of the electronics are done-enough until testing.

5. My ESR meter… waiting on parts of course.. come on Customs.. let me have my fun-stuff.

… all this work has left me bench a disaster zone.

 

The Great Mess of April 2014
The Great Mess of April 2014

 

.. I’ll finally leave you with this fun photo:

Ohm's law
Ohm’s law
Hardware Hacking

The @JohnS_AZ Blogger Guilt Trip

There is a lot of content out on the internet… a lot.. but it’s amazing how much of it you can burn through on a day full of programming. I started picking up a couple more podcasts just because I’ve been running out my normal subscriptions. I started listening to ZombieTech; a podcast made by the @tymkrs… entertaining and informative. I finished listening to Episode 003 with John (@JohnS_AZ) this afternoon and it really made me think about my content as a blogger. My blog isn’t intended to be a “build this” or “this is how you do it” type of blog but I feel John’s message still applies. If I come along a blog or project site of some sort, more than not, the media describing the project is usually lacking. In the case of YouTube videos, sure.. we get so see the LEDs blink, but there is usually no circuit review, code provided, or schematic provided in PDF. John mentioned how a video of circuit explanation would be helpful for those who want a little more information in line with something like a blog entry that includes some code and description.  I whole heartily agree with him; I’ve also found myself wishing there was more information in an article countless times. So now I have a little guilt now over being a very sloppy blogger. I can do better, even though I’m not writing articles to generate content, nor am I suggesting readers might be interested in building whatever I am; regardless, I’m demanding of myself to do more do-diligence before posting… maybe comment my code better and certainly it’s easy to do some small uncut YouTube videos… even if it’s rocked out on the iPhone. Don’t get me wrong though, you won’t be getting schematic out of me much because I usually don’t build-by-schematic. I will offer you this though: If you’re looking for some content on older blog posts I’ll be happy to go revisit the project and offer an update. Most if not all my blog posts are of snippets of information that are generic enough that you can re-use what I’ve done in something you’re working on. I don’t think I’ve actually posted any “complete” work to date; I imagine that’ll be a rare day when I do.

So thanks for giving that interview John, it was definitely insightful. I look forward to seeing what your HackersBench.com site turns into.

ASM Electronics Hardware Hacking Microcontrollers PIC Programming Time

WWVB Time Signal Generator Test w/ HEX

[Edit: I’ve added the .asm code in the “Code” page in the menu above. Below you can find the .HEX file for easy programming]

A successful test on my WWVB signal generator. I’m going to shy away from calling it a transmitter because I don’t think there is any allowances for any broadcasting on 60KHz, so to stay legal I would imagine you’d need to conform to part 15, shield everything, use an attenuator and dump the signal into a shielded box with the clock? I somehow doubt the FCC checks up on sub-mW transmissions on 60KHz though.

The concept is simple, 1 baud rate transmission of a 60 frame packet. The amplitude shift keying (ASK) system WWVB transmits is recreated using a CMOS CD4066 switch. Dump a 60KHz sine wave (keeping in mind maximum input/output signal specifications) into one of the switch ports. Use the output on PORTB.0 of the PIC to control the switch and the other side of the switch goes to you device under test (I used a couple feet of wire as an antenna and just placed the wire in the neighborhood of the clock receiver). It’s a no brainer. Check out the NIST site on WWVB if you want more details. I’ll probably re-port the code to a 12F629 when I get my new PICKit3 in and I’ll likely build a board with a 60KHz generator.. maybe I’ll even sell it on Tindie if I’m feeling ambitious.

The Test! I was getting my ass kicked earlier this week as my circuit was not working and it seemed like everything was just right. It did force me to really tweak my timing to make it within my range of error on being able to measure the exact pulse widths, I don’t know how precise it has to be but I assume that’s up to the algorithm decoding the signal. Turns out it wasn’t my code or circuit.. My $15 Fred Meyer “black friday special” atomic clock doesn’t work. It won’t receive the real WWVB (set up aligned with Boulder, CO away from electronics, blah blah). I was getting the proper signals out of the module, so I yanked the module out of the clock and hooked it up to a receiver designed by N0QBH. I mirrored his project here. He has a website for the project here. I used his schematic, ditched the need for the LCD and just grabbed my data off the RS232. Done! You can see a before and after output screenshot in the photos below.

My WWVB signal generator code (HEX) for a 16F628A is found here . Is it lame of my just to provide the HEX? yeah…. but all you need to do is hook up PORTB.0 to switching input of a 4066 with a signal generator feeding a 60KHz sine wave and you’re in business. (And a resistor pulling /MCLR (PORTA.5) up as well if that wasn’t obvious? I’m using the internal oscillator; no xtal needed).  You are stuck with my fixed date of course.. which is why you want my assembly code right? No problem. Just ask… really (comment or e-mail). I don’t want to post it because I don’t really like comment trolls. This code is super BETA but at an acceptable starting point. Lots of opportunity for optimizing it as well.  Why didn’t I improve on this code? Because I don’t need to. I’m just using it to test receivers I’ve purchased from the UK and I’ll be working on a project with those in a little while.

My time/date is static here is a snippet of the main line code:

    CALL    MARKER                      ;MARKER FRAME REFERENCE BIT
    CALL    ONE                         ;40min
    CALL    ZERO                        ;20min
    CALL    ZERO                        ;10min
    CALL    ZERO                        ;Reserved
    CALL    ZERO                        ;8mins
    CALL    ZERO                        ;4mins
    CALL    ONE                         ;2mins
    CALL    ZERO                        ;1mins
    CALL    MARKER                      ;MARKER 1

… and so for some photos

signal from PIC before ASK modulation accomplished by switching a CMOS CD4066 with a 60KHz sine wave from a frequency generator.
signal from PIC before ASK modulation accomplished by switching a CMOS CD4066 with a 60KHz sine wave from a frequency generator.

 

WWVB receiver module removed from clock

The clock with the module removed, luckily they printed the pin diagram on the board. 5V, Gnd, PON, and TCO

WWVB Signal Generator and Receiver on Breadboard

Both the generator and receiver on the breadboard. The transistors form the RS-232 driver for the receiver.

Before and after on the RS232 output of the WWVB receiver
Before and after on the RS232 output of the WWVB receiver

 

Electronics Hardware Hacking

VFD Update: In Precharge / Configured

Slowly chiseling away. I got the terminals set up, all the motor set up, disabled most faults in advanced configuration and I now have the drive out of fault, temp sensor back working, and ready to drive waiting on the DC bus.

I think if I read the manual right with my configuration that should be about 370VDC, but I guess we will see? The VTAC9 Rockwell Automation manual is really detailed in some regards but lacking in regards to technical information. Not surprising after looking at the set up the VTAC controller has no idea it’s missing the AC input. The drive does start up right at about 196V on the DC bus … if you have to get one running just enough to configure it. I could/did configure the drive for a lower motor voltage but I won’t know if that effects the requirement for the DC bus; I doubt it.

Now.. I just need to suck it up and buy some batteries. I put in a big order with @Digikey but it’s all subsystems stuff. I’ve never worked with CAN before but the new Elektor has a article about a CAN tester and it interested me enough to try it out.

I also noticed @Sparkfun has a neat little bluetooth module out that I was considering picking up for $59 .. but then they also have a “Silver” one that’s $39 and has 3.3-6V input both Vcc and inputs. They’re small and are set up for TTL level RS-232. My current module is larger, has a lot of pins I don’t use (although I do like the handy link output).

With all this need for HV DC I’m seriously considering building a home-brew HV power supply. You have probably seen my bench I have some cheapo Elecnco 0-20/5/-12/12,  a B&K 1601, and some miscellaneous other fixed sources. I have my eyes on a B&K 9124 and a B&K 9110 (tear down: http://www.eevblog.com/forum/reviews/bk-precision-9110-60v5a-100w-psu-review-%28with-pix!teardown%29/ ).

VFD waiting 'In Precharge' after configuration.
VFD waiting ‘In Precharge’ after configuration.
Electronics Hardware Hacking

VFD Update: AC retrofit to DC, Drive Start Up on DC bus.

I said I was going to wait until I had enough batteries to start this drive up but I decided I couldn’t wait. I took a 110VAC to 42VAC power supply that was lying around and fed that into the secondary of the fan transformer (690VAC tap). Through an undersized bridge rectifier I need to change out if I’m going to use it for longer than a brief start-up (400V, yes technically big enough but..). The drive started on it way up to 220VAC as the capacitors charged. I didn’t allow it to stay on long because I have no fan and I got a over temp alarm though, I think it’s not right, 110 deg C. I must have wiggled a cable out? I’ll look around as I think I know where both sensors are found.

So there it is, started up. I have a lot of reconfiguration to do to the drive to get it to run on low DC bus voltage. I was reading the manual and I think I can cheat it down…. I certainly don’t want a 680V DC bus as that’s a lot more batteries than I was planning on.  I haven’t decided if I’ll be running it by potentiometer, 0-10VDC or 4-20mA control signal … I should probably figure out how I’m going to physically request/actuate a speed demand before I decide.

Next steps: 1. Attach DC fans for the heat sink, provide a more securely wired input, configure settings…

Note: 110V  42VAC transformer fed to 110V480V transformer, rectified to supply to 220VDC. The VFD powers up in the 200V neighborhood.
Note: 110V 42VAC transformer fed to 110V690V transformer, rectified to supply to 220VDC. The VFD powers up in the 200V neighborhood.
Below is the 80W power supply board and then above that is the IGBT board with capacitors to the right.
Below is the 80W power supply board and then above that is the IGBT board with capacitors to the right.
Electronics Hardware Hacking

VFD Update, Stripped the AC front end.

I removed the input AC components today. The drive had a lot of weight in components just to drive a 110V fan. I’ll obviously have to replace that AC fan with a DC fan. It won’t have the CFM output of the original but I won’t be generating the heat it had. This monster was in a building right next to I-405… you can tell is was breathing a lot of fallout it’s whole life. It’s amazing where the dirt and scum has found to hide and how much there is.

I was happy to see the only thing the AC provided power to was the cooling fan and then straight to rectifiers… that’s great news of course.

I know it was wishful thinking but I threw 160 VDC at it… didn’t even blink. I’m just going to have to wait until I can get my hands on more batteries. My 20Ah batteries are looking like they’re going to be garbage… they’re just too far gone I guess. All the recycling tricks are proving to be crap 🙂

Check out that toroid!
Check out that toroid!

Edit: that board up front is the variable voltage rectifier controller… It is also going to be removed

Hardware Hacking

Sometimes you get what you pay for! An attempt to bring back SLA batteries

If you’re reading this, perhaps you’ve run across the endless forums of magic battery revival modules, advice for adding acid, water, salts.. whatever? I spent a solid day reading/surfing.. maybe there are a few magic ways to save your batteries? I don’t know lets see… but before I start let me say one thing: Have a ten year old car battery you’re trying to make last another two? Well, sit down, this may sting… you’re cheap.. buy a new damn battery! 🙂 I scored four *free* 12V 20Ah SLA batteries.. they were installed 2 years ago.. only lasted in some biomed equipment for about 18 months… why? Who knows.. they aren’t used much.. probably a crappy charging system in a 20,000$ piece of equipment. Worse case I drive a mile down the road to drop off the batteries for recycling (also free).

I refuse to chuck these.. even though they are really in a bad way. Status of batteries: 4-6 Volts… DEAD. Below dead.. and they’ve been sitting that way for weeks. So lets see how these goes! All batteries are close to the same age, came out of the same equipment and are roughly the same voltage. Also of note, these aren’t gel cells.

Battery 1: I put battery 1 on a Powersonic SLA battery charger (12V 4A..) PSC-124000A for 24 hours. the battery charger sat in float the whole time.. didn’t get warm.. didn’t draw much more than 10mA — not looking great.

Battery 2. This battery went through the same 24 hour ineffective charge as above…. I popped off the top. The cells were lacking water, I don’t know what is normal but it looked considerably low. I put about 150mL of water into the six cells which brought it up to just under the vent ports. I also put in two drops of sulfuric acid into each cell (why not!?). I threw it on my current limited power supply 15VDC and I put the current trip at 250mA just in case something gets away while I don’t have my eyes on it. I’ll adjust this later on if needed. It started off at 10mA, but I’m in about 4 hours and i’m up to 50mA… lets see what a day or two does?! Many of these sites mention this process taking a week or two. I’ll put the battery on the powersonic charger once my current gets up to 100mA or so.

Battery 3 & 4… To be continued!

 

Electronics Hardware Hacking Robotics

Weekend stepper fun!

20131004-130715.jpg

I got got home to take delivery of this front end frame piece. Now I’ll be busy this weekend working on electronic steering. The PIC 16F1509 will be controlling all steering functions. I’ve written a remarkable amount of code for how long it’s been since I worked I a project with a F628A and 18F1330 motor control for the Roomba sumo bot. This project has gotten painfully expensive despite scoring some nice freebies. I spent way too much on wire because I want MTW or Teflon.