Show Posts
Pages: 1 ... 5 6 [7]
91  Forum 2005-2010 (read only) / Interfacing / Re: Tacho signal 12v to 5v ? on: May 06, 2008, 04:24:16 pm
Check your transistor circuit operation first. Ground the input and observe 5V on the output, then put +12V on the input and you should see 0V on the output (as this circuit is inverting).
92  Forum 2005-2010 (read only) / Interfacing / Re: Tacho signal 12v to 5v ? on: May 04, 2008, 07:56:51 pm
With a 200 ohm Rc, Ic (collector current) will be 20 mA. BC337 beta is min 100, so you need at least 200 uA drive into the base to switch this device on. Usually use 2x to 10x base drive to ensure the transistor goes into saturation, ie. 400uA to 2 mA. With 12V input, 100k ohm on the base will only give you 110 uA (assuming Vbe of 0.7V).

ie. you don't have enough base drive to switch the transistor on. You will need to either increase Rc (and reduce the collector current requirements), or decrease the base resistor. To get 2 mA of base drive, use around 5.6k ohm on the base resistor. This may load your tach too much though.

Or alternatively, use 22k ohm on the base resistor (for 500 uA drive), and 820 ohms for Rc (gives 5 mA Ic).
93  Forum 2005-2010 (read only) / Interfacing / Re: 4 bit LCD library little diffs on: April 22, 2008, 08:11:37 pm
So do your changes work?
94  Forum 2005-2010 (read only) / Exhibition / Re: Kalman Filtered Nunchuck & Wii Motion Plus on: September 06, 2009, 06:16:20 pm
@earl:

I have a knock-off Classic Controller, and the standard initialisation routine wouldn't work. I used the updated "New" init routine from wiibrew.org and got it to work. It should also work for NCs.

Code:
           // init controller
            delay(1);
            Wire.beginTransmission(0x52);      // device address
            Wire.send(0xF0);                    // 1st initialisation register
            Wire.send(0x55);                    // 1st initialisation value
            Wire.endTransmission();
            delay(1);
            Wire.beginTransmission(0x52);
            Wire.send(0xFB);                    // 2nd initialisation register
            Wire.send(0x00);                    // 2nd initialisation value
            Wire.endTransmission();
            delay(1);
            
            // read the extension type from the register block        
            Wire.beginTransmission(0x52);
            Wire.send(0xFA);                    // extension type register
            Wire.endTransmission();
            Wire.beginTransmission(0x52);
            Wire.requestFrom(0x52, 6);               // request data from controller
            for (cnt = 0; cnt < 6; cnt++) {
              if (Wire.available()) {
                ctrlr_type[cnt] = Wire.receive(); // Should be 0x0000 A420 0101 for Classic Controller
              }
            }
            Wire.endTransmission();
            delay(1);
            
            // send the crypto key (zeros), in 3 blocks of 6, 6 & 4.
            Wire.beginTransmission(0x52);
            Wire.send(0xF0);                    // crypto key command register
            Wire.send(0xAA);                    // sends crypto enable notice
            Wire.endTransmission();
            delay(1);
            Wire.beginTransmission(0x52);
            Wire.send(0x40);                    // crypto key data address
            for (cnt = 0; cnt < 6; cnt++) {
              Wire.send(0x00);                    // sends 1st key block (zeros)
            }
            Wire.endTransmission();
            Wire.beginTransmission(0x52);
            Wire.send(0x40);                    // sends memory address
            for (cnt = 6; cnt < 12; cnt++) {
              Wire.send(0x00);                    // sends 2nd key block (zeros)
            }
            Wire.endTransmission();
            Wire.beginTransmission(0x52);
            Wire.send(0x40);                    // sends memory address
            for (cnt = 12; cnt < 16; cnt++) {
              Wire.send(0x00);                    // sends 3rd key block (zeros)
            }
            Wire.endTransmission();
            delay(1);
            // end device init

variables used are:

Code:
       byte cnt;
        uint8_t ctrlr_type[6];          // Extension controller type

Controller type returned will be 0x0000 A420 0000 for the NC.

You may need to decrypt the data (with the x^0x17+0x17 algorithm)
95  Forum 2005-2010 (read only) / Exhibition / Re: My rover on: September 14, 2008, 08:02:44 pm
The best thing to use for rotations are Quarternions, as they allow you to avoid the problem of Gimbal Lock. This article explains how to use them for rotations.
96  Forum 2005-2010 (read only) / Exhibition / Re: Arduino Espresso Machine Mod on: April 16, 2008, 10:47:29 pm
I like your work. If I ever manage to get myself a decent espresso machine, I'm going to try a PID controller mod on it.

One thing that interests me is whether you could "autotune" your PID controller using a step input (ie. turn the heater full-on), measuring the response (the lag Td and maximum slope of the resulting S-curve) and applying the method as per part D at the end of this.

Regards,

Sam.
97  Forum 2005-2010 (read only) / News / Re: Arduino PID Library on: January 27, 2009, 06:51:49 pm
I don't mean to nag, but that SetCalcFrequency() really needs to be changed to SetCalcPeriod(). Likewise GetCalcFreq().

IMO it's important to avoid misleading function names, particularly early in the library lifecycle, before the installed base is too large, and there's too much traction.

Apart from that it's a great library.
98  Forum 2005-2010 (read only) / News / Re: Arduino PID Library on: November 11, 2008, 06:14:15 pm
Haven't tested it, but it looks good.

A couple of comments -

The description of SetCalcFrequency() indicates the parameter is actually a period, not a frequency. If this is the case then the function would be better named SetCalcPeriod().

The description of Reset() is overly brief. Perhaps it is due to my unfamiliarity with PID controllers, but does this function only reset the current calculated values of measured error and any accumulated integration value? Is the value of Output affected? What about the IOLimits and Tuning parameters?
99  Forum 2005-2010 (read only) / Bar Sport / Re: Littlebird Electronics. on: May 11, 2008, 09:26:28 pm
Quote
hei...i juz bought a arduino and motorshield from littlebird electronics ..i found out that the motorshield is only a pcb board.
hav anyone bought the motorshield from them? where can i get the other components like h-bridge ic n stuffs

Altronics have the H-bridge IC (if it's the L293D one).

Altronics have dealers all over AU. If you're in NZ, they dist. through Global PC in Christchurch, Papanui and Riccarton.
Pages: 1 ... 5 6 [7]