Show Posts
Pages: [1] 2
1  Using Arduino / Displays / Re: Arduino is writing to LCD, I can find no errors, but no LCD-text. What is wrong? on: January 31, 2013, 06:05:25 pm
Actually, Floresta, this is a funny coincidence because I had never seen the Setcursor sketch example before.  The way that it is written in the original includes a delay(200).  My recommendation, although i didn't know it at the time, put it back the way it was originally written. 

Kingoslo, I'm glad I could help.
2  Using Arduino / Displays / Re: Arduino is writing to LCD, I can find no errors, but no LCD-text. What is wrong? on: January 31, 2013, 10:19:54 am
Kingoslo, I think you're sending too many commands to the LCD each second.  You might try a delay(200) in your loop, and count up using a variable instead of trying to display milliseconds.
3  Using Arduino / Displays / Re: How to use this PCF8574 board from "emall-4u" on: January 31, 2013, 10:10:58 am
It is fm's library.  https://bitbucket.org/fmalpartida/new-liquidcrystal/downloads/LiquidCrystal_V1.2.1.zip
4  Using Arduino / Displays / How to use this PCF8574 board from "emall-4u" on: January 28, 2013, 02:12:01 am
This is labeled LCM1602-IIC.

The address and the sample code are, not surprisingly, wrong.  The address of the one that I am using is 0x20, not 0x27, and you do have to set up the pins in order.  My Arduino Serial board has its SCL on A0, and its SDA on A1.

I traced the connections using an ohmmeter, and here is the correct line of code.  First I track all the relevant pins to the chip, then I use the chip's documentation to find out which of the P0 to P7 chips it is.  It is not nearly as easy to trace the pin that controls the backlight, but there are eight possibilities, seven already traced, so it's the one that is left.  I have it working and properly backlit:

LiquidCrystal_I2C lcd(lcdAddr, 2,1,0,4,5,6,7,3, POSITIVE); // addr, EN, RW, RS, D4, D5, D6, D7, Backlight, POLARITY for mall4 adapter

Just in case anyone might need the information. 

This is the adapter:  http://www.ebay.com/itm/390527380190?ssPageName=STRK:MEWNX:IT&_trksid=p3984.m1439.l2649
5  Using Arduino / Displays / Re: SOLVED: How to wire an mjkdz I2C board to a 20 x 4 LCD on: January 21, 2013, 12:57:43 am
Well, in my case I finally realized that I needed to be sure that the signals were actually getting there.  In the process I made a custom boards.txt entry so that I would get the fuses and the wiring variant right.  I'm using an Arduino Serial Mark II board I got from Mouser.
6  Using Arduino / Displays / Re: ATMEGA 1284p and I2C LCD Woes on: January 20, 2013, 12:23:11 pm
I'm using the ATMEGA 328 and its documentation says that SDA and SCL are at PC4 and PC5, but I found the signals at PC0 (Analog 0) and PC1(Analog 1).  Your documentation has them at PC0 and PC1.  I was able to find my signals by attaching LEDs and resistors to those pins.  The sketch "i2c_scanner" sends out a continuous signal. 

http://playground.arduino.cc/Main/I2cScanner

7  Using Arduino / Displays / Re: ATMEGA 1284p and I2C LCD Woes on: January 20, 2013, 04:22:09 am
My setup works when I use A0 for SCL and A1 for SDA.  The documentation for the ship says A4 and A5.  Could that be your problem?

Also, my backpack works at address 0x20. 
8  Using Arduino / Displays / Re: SOLVED: How to wire an mjkdz I2C board to a 20 x 4 LCD on: January 20, 2013, 04:19:39 am
The documentation for the Atmega chips said that SDA was at A4 and SCL was at A5.  I used the i2c_scanner and a couple of LEDS and traced the signals to A0 and A1.  A0 is SCL and A1 is SDA.

If you have a PCF8574 without the A on it, the physical address is set by connecting pins 1,2,3 to either VSS or VDD.  They are A0,A1, and A2, in that order.  Add that to 0x20 and you know the address.  On my board I can see where they are connected, which is to VSS.  If they are all connected to VDD you get an address of 0x27.  Mine works at 0x20.

I got my adapter almost the same day that Farkuino got his, and I just got mine working about ten minutes ago.  I started on Monday. 

Thank you, everyone who helped, and I like that graphic that Tack wrote.  I have a nice blue 16 by 2 display. 

I also learned that you do have to initialize with lcd.begin(columns, rows).  I had a lot of fun figuring out that there was a mistake that I could make that set my MPUs to their factory defaults, so they were running at 1MHz instead of 16, and I got to learn how to edit boards.txt.
9  General Category / General Discussion / Re: Low current Optocoupler on: May 22, 2011, 10:33:53 pm
Mouser (www.mouser.com) has a good search function for the characteristics of optoisolators.  I have no idea what the cameras require for remote focusing.  Obviously you have to have their specs.  If you can provide a power supply at the camera you can amplify the output of the optocouplers.  I have a project right now where I'm using optocouplers and MOSFETs, both for isolation and level shifting.  I run a resistor from the positive power supply to the optocoupler, ground the other side, and control the MOSFET from that.  This needs no current amplification on the optocoupler. 

You can treat a MOSFET by itself like relay contacts by connecting the drain and source to the device that you are controlling.  You can feed the signal from the controller to the MOSFET through two resistors.  The source is connected to signal ground through one resistor and the gate is connected to the signal through the other.  Those can provide an arbitrarily high degree of isolation, so any currents that might cross-couple would be very small.  The resistors can add up to ten megohms or more if you want.  A little bit less makes the circuit less sensitive to interfering signals.
10  General Category / General Discussion / Re: Low current Optocoupler on: May 16, 2011, 12:56:18 am
I'm guessing that you have a two wire connection to each camera.  You should measure voltage and current on those two wires and you're going to need to know the polarity.  The camera supplies a loop current and you supply the switch.

You might want to consider using power MOSFETs that are designed to be switched at five volts.  A fifty amp transistor with an on-state resistance of about .03 ohms can be had for around fifty cents each.  It takes next to no current to switch them on and as long as you respect polarity and current you can treat them like a relay.  The on-state resistance of an optocoupler might be too high to trigger the camera. 

11  General Category / General Discussion / Re: Starting my first project on: March 13, 2011, 10:20:24 pm
The hardware store has devices that help with the water hammer situation, like a little reservoir of air that you attach to the system to act as a shock absorber.

I think you're going to find out that the water flows through the radiators in series.  The water recirculates from the tank, through the radiators, and back through the tank, right?  You would then have to bypass any particular radiator instead of cutting off water flow.

What about controlling the flow of air through the radiators?  You may want to use fans anyway. 
12  General Category / General Discussion / Re: arduino mega got 12v in 5v output pin on: March 13, 2011, 05:45:36 pm
The power from the USB goes directly to the +5 volts on the board, so you will always be able to power the board even if communications isn't working. 

It's up to you of course, Hugo.  If you buy or build a programmer that will work with the six pin connector you will probably have a usable board.  I have an Arduino serial that I bought a board for and I didn't even hook up the serial port.  Adafruit has the programmer built right into a USB cable for $20.  There are inexpensive kits and plans all over the net.  So if you ever feel like using it, that's how to do it. 
13  General Category / General Discussion / Re: arduino mega got 12v in 5v output pin on: March 13, 2011, 06:37:48 am
I would say that there is some chance.  Can you see if you are actually getting five volts out of the regulator now?  It might have been damaged and if it's wrong then one processing unit might work while the other one won't.  It's not good for either one to run it like that.

Probably the only thing that you can do is change the five volt regulator, if it needs it.  If you try to replace the ATMEGA8U2-MU chip, while it can be done, you will also have to get the firmware for it and program it before installing it.  That's probably more trouble than it's worth.  You should be able to program the 2650 chip through the ICSP connector but you won't get the USB back unless you either change the ATMEGA8U2-MU or finagle a USB connection.  You could emulate it on the 2650 or connect an adapter.  



14  General Category / General Discussion / Re: arduino mega got 12v in 5v output pin on: March 13, 2011, 12:33:50 am
Exactly which board is it? 
15  General Category / General Discussion / Re: How Arduino caught me on: March 08, 2011, 10:42:32 pm
I have a very nice Arduino serial board from Mouser for a very good price.  The components that I used for the board brought the cost of a stuffed board to around $12.  It's very powerful, a lot of MIPS for the dollars, and going up the ladder a little bit in capabilities didn't cost any extra.  It was easy to find things to plug into, thanks to this forum and Sparkfun.  It would be a good idea to be more explicit about where to get the six pin IDC connectors for the programming header.
Pages: [1] 2