Show Posts
Pages: [1] 2 3 4
1  Using Arduino / General Electronics / Re: TRIAC AC switch , need some info on: July 21, 2014, 11:58:51 am
See figure 10 in the MOC3061M datasheet (http://www.fairchildsemi.com/ds/MO/MOC3061M.pdf) for a typical 220V AC circuit.
2  Using Arduino / Sensors / Re: frequency measurment on: July 20, 2014, 12:38:32 pm
If you want to measure speed but not direction of the encoder then you could use LM2907/LM2917 frequency to voltage converter IC and use an analog pin to read the output.
3  Using Arduino / Sensors / Re: Barometric Presure sensor BMP180 on: July 20, 2014, 12:19:40 pm
The absolute pressure reading seems OK to me (if this is actually the sensor pressure reading), normal atmospheric pressure at sea level is 1013.25 millibar or about 29.9 inch Hg.  The sea-level pressure seems high, which could explain the wrong calculated elevation.
4  Using Arduino / LEDs and Multiplexing / Re: MOSFETs driving me crazy! on: July 20, 2014, 12:05:59 pm
But I found a problem: the LED strip did not turn off completely, even being the MOSFET turned fully off!
So I googled and found that I had to use a MOSFET whose Vgs would be 5.0V (so that Arduino can fully turn it on and off, am I right?)
The thing is, how do I know this!?
For example, lets check the datasheet of a MOSFET that lots of people recommend, the IRF540N...
Does the MOSFET switch on/off properly when you connect the gate to 5V and 0V respectively?

If you look at figure 1 of the IRF540N datasheet you will see the performance of the FET at different Vgs.  The bottom curve shows the current vs. voltage drop Vds at Vgs = 4.5V.  From the linear part of the Vgs = 4.5V curve the effective resistance of this FET is 66 mOhm.  As you increase Vgs the effective resistance of the FET drop to the stated 44 mOhm.  You can also see from figure 1 that the maximum current you can get through the FET is lower at Vgs=4.5V (about 10A) than at say Vgs=5V (about 23A).  You ideally want to use logic level FETs with Arduino output voltages, see e.g. http://forum.arduino.cc/index.php?topic=227550.msg1644523#msg1644523
5  Using Arduino / General Electronics / Re: Will this voltage doubler works with DC input? on: April 18, 2014, 03:10:40 am
These links (1, 2 ) show a very basic implementation of a switched mode voltage controller using the microcontroller it powers to also drive the circuit.  The 2nd link also implements voltage regulation using an ADC pin to control the PWM pin driving the circuit.
6  Using Arduino / Displays / Re: 16x2 LCD nearly works - but has a few strange characters. Why??? on: April 04, 2014, 02:44:28 pm
The ASCII data structure contains a start byte (0x02) followed by 10 bytes of data, followed by a 2 byte check sum, followed by carriage return and line feed characters, finally terminated by an end byte (0x03) (from datasheet: http://www.hobbytronics.co.uk/datasheets/sensors/ID-12LA-ID-20LA.pdf). You will need to handle the extra information surrounding the data you are interested in.  This code (http://playground.arduino.cc/Code/ID12#.Uz8M6FdWXaQ) will probably do what you want.
7  Using Arduino / Displays / Re: ILI9325 TFT LCD Touch 2.8" on: April 04, 2014, 02:11:04 pm
If you have a link or manual/schematic for your LCD board please share it. The information may be useful in identifying possible next steps.
8  Using Arduino / Displays / Re: ILI9325 TFT LCD Touch 2.8" on: April 03, 2014, 02:49:37 pm
My questions to you:
- Is there other way besides soldering to connect the wires to the LCD?
- Do you think the REST pin is the same as the RSET pin?
- Do you think the WR pin is the same as the RW pin?
- Which pin do I connect the backlight pin to?

Thanks for your help!
Joost

You can use an IDC connector which crimps onto a ribbon cable to connect wires/ribbon cable to the LCD (see http://www.mantech.co.za/ProductInfo.aspx?Item=83M0013 for example). If you only need to connect to the LCD data and control pins you don't need that many connections and you could use SIL sockets (www.mantech.co.za/Stock.aspx?Query=SOCK+SIL+STR+HOUSED+2.54and) but then you'll need to solder wires to the socket pins. You can also use SIL housing (http://www.mantech.co.za/Stock.aspx?Query=housing+SIL+2.54and) but this requires that you crimp wires on terminals, not all that easy without a proper crimping tool.  Perhaps the easiest would be to get hold of an old IDE hard drive ribbon connector (http://www.computerhope.com/jargon/i/ide.htm), I think it should fit.

I'm fairly sure you can assume that REST = RSET and WR = RW.
Backlight pin is probably LED_A.

I suggest you try and find a tutorial/code/description for your specific LCD board, because the LCD controller chip is only rated to work with input voltages up to 3.3V.  Some boards put in voltage shift IC's which makes them compatible with the Arduino 5V output.  There are also different data transfer settings (8 bit, 16 bit, SPI).  If you only push 8 bit data but the controller is configured for 16 bit data you will have an obvious problem.  If it is configured for 8 bit transfer, you need to know whether you must connect to DB0-DB7 or DB8-DB15.  I have an LCD board which is configured for 8 bit transfer, but have to use pins DB8-DB15.

Good luck1
9  Using Arduino / Motors, Mechanics, and Power / Re: Logic-Level Power FETs you'd like to see/use?? on: March 23, 2014, 07:18:45 am
Any other comments, nominations appreciated...
I've also recently started looking into this.  Here are some others one could consider:
IRLZ44N - the automotive versions seem to have even lower Rds (AUIRLZ44N)
STP22NF03L
IRLB8748PbF

10  Using Arduino / Programming Questions / Re: Problems with LCDs and SPI on: March 16, 2014, 02:31:06 am
The LiquidCrystal library in my Arduino 1.0.5 libraries folder doesn't have a member function called initSPI.  Are you using a newer version of Arduino, or is this a non-standard (as in it was not installed by Arduino installer) LiquidCrystal library?
11  Using Arduino / Programming Questions / Re: PS2 Mouse Library on: March 15, 2014, 03:33:17 pm
In answer to your question, reread the paragraph Movement Data Packet in the link you provided.  As I understand the description the the sign bits for the movement bytes are stuffed into the first byte (bits 4 & 5).

Further, the protocol is byte oriented, so the for loop should only read 8 bits.  Not sure why mvmnt is added to the for loop check.  If you are trying to read a movement data packet it seems as if you have to read in 3 bytes. Not sure if the 3 bytes are transmitted as 1 packet or 3 separate packets of data.

The delayMicroseconds statement don't make much sense since the actual clock transitions are checked by while loops anyway.  Perhaps a 1 microsecond or so delay is needed when the clock & data lines are pulled hi at the start to allow the line voltages to settle before reading.

Hope this helps a bit.
12  Using Arduino / Displays / Re: Touch LCD clone looks weird unless resetting on: February 11, 2014, 12:25:29 pm
Anyway, the screen has weird contrast and seems sort of dim until I hit the reset button. Then it looks great until it restarts and it goes back to looking weird.

Not sure, but perhaps adjusting the gamma settings for the display may improve the display quality.  The gamma control settings are set in the Adafruit_TFTLCD.cpp file in this section of code (I assume the LCD driver chips is an ILI932X ?):
Code:
  ILI932X_GAMMA_CTRL1      , 0x0000,
  ILI932X_GAMMA_CTRL2      , 0x0000,
  ILI932X_GAMMA_CTRL3      , 0x0000,
  ILI932X_GAMMA_CTRL4      , 0x0206,
  ILI932X_GAMMA_CTRL5      , 0x0808,
  ILI932X_GAMMA_CTRL6      , 0x0007,
  ILI932X_GAMMA_CTRL7      , 0x0201,
  ILI932X_GAMMA_CTRL8      , 0x0000,
  ILI932X_GAMMA_CTRL9      , 0x0000,
  ILI932X_GAMMA_CTRL10     , 0x0000,

I've seen alternative values in different drivers, but don't know how to interpret them.  At least you can change these values and see if it makes a difference, although I suspect randomly changing values may not give predictable results.
13  Using Arduino / Sensors / Re: Which optical mouse sensor is this? on: October 14, 2013, 11:09:49 am
It could also be an Avago ADNS-2610, which appears to be pin compatible with the PAN3101 (the pattern also looks similar, perhaps it is a clone).  The two chips may even be protocol compatible, so try Martijn's tutorial anyway.
14  Using Arduino / Sensors / Re: Resistivity meter for measurement of solid concentration (would this way work ?) on: October 12, 2013, 03:07:06 am
To get signals 180 degrees out of phase you simple invert them, so a H-bridge circuit will give you the AC you need.

An alternative is to use two PWM  pins 180 deg out of phase.  You could use Timer2 for this, if you don't have another library that use it.  The following code is for the 328P controller (used in e.g. the UNO), the code will probably have to be tweaked for other controller types.

Code:
// Generate simple 180 degree out of phase square waves on pins 3 & 11
void StartTimer2(void){
  pinMode(3, OUTPUT);
  pinMode(11, OUTPUT);
  TCCR2A =   _BV(COM2A1)                       // Clear A up, set down
           | _BV(COM2B1) | _BV(COM2B0)         // Set B up, clear down
           | _BV(WGM20);                       // Mode 2, phase correct PWM
  TCCR2B = _BV(CS22) | _BV(CS21) | _BV(CS20);  // prescaler 1024
  // Frequency = F_CPU / 1024 / 256 / 2
  // For a 16MHz board this will be 16000000/1024/256/2 = 30.52 Hz

  OCR2A = 127;       // 50% duty
  OCR2B = 127;       // 50% duty
}

void setup(){
  InitTimer2();
}

void loop(){}

If you want to run at higher frequencies change this line:
Code:
  TCCR2B = _BV(CS22) | _BV(CS21) | _BV(CS20);
The prescaler options are listed in the manual www.atmel.com/Images/doc8161.pdf‎ in table 17-9.
15  Using Arduino / Displays / Re: Seven Segments 2 digits with 2 digital pins + 595, etc..., how to wire-control?? on: July 28, 2013, 08:47:58 am
I need 2 795 to control 1 display??
There are 8 outputs per per 74HC595. A 2x (7 segments + DP) display requires 16 inputs, thus you either need 2x 74HC595 chips (see Nick's http://www.gammon.com.au/forum/?id=11518 example) or you need to switch repeatedly between the digits as shown in reply #3 by CrossRoads.
Pages: [1] 2 3 4