Show Posts
Pages: [1]
1  Using Arduino / General Electronics / Can you recommend a multiplexer that works with 3.3V ? on: April 07, 2011, 04:11:13 am
Hello,
I'm building a small project for the Arduino Pro Mini 3.3V.
I need to be able to read from two different devices using the only serial port on my Arduino (I need to read from these two devices sequentially, not simultaneously).
Can anyone recommend an IC that would work for this application and that can be powered with 3.3V?
I only need to be able to multiplex two inputs to one output.

If you know more than one IC that could be used for this task, can you name any advantage of one over another?

Thank you very much in advance.
2  Topics / Device Hacking / Re: Debugging an application that uses the serial port on: March 24, 2011, 03:20:09 am
I checked that without the amplifier first. The truth is that the iPad signals through the serial port switching between 0 V and 3 V (well, at least closer to 3.0 V than to 3.3 V). Most of the time it was not working without amplifying to 5 V.
On the other hand, I have decided to switch from Arduino Uno/Mega to the Arduino Mini Pro 3.3V, it works perfectly (no need to amplify or divide the voltage)  together with iPhone 3GS, iPad and iPhone 4G, which are the devices I have been able to test. I am drawing the power from the iPad itself, no need for any external power supply.
Thought this might be useful to somebody. True, I have just one serial port in the Pro Mini, but after the initial phase of debugging/reverse engineering,  just one serial port is ok for my application.
3  Using Arduino / Installation & Troubleshooting / Arduino mega2560 times out while uploading sketch in Linux on: February 28, 2011, 05:29:17 am
Hello,
I have a new Arduino Mega2560 which I am trying to program it via the usb port.
I am using Linux Fedora 14 and arduino version 0021.
A couple of times I have managed to successfully program it, but most of the times I get the following error:
Code:
avrdude: stk500_2_ReceiveMessage(): timeout
Does anybody know what this means and how it can be avoided?
If I press shift while uploading this is the complete message I get:
Code:
Binary sketch size: 3794 bytes (of a 258048 byte maximum)
/usr/bin/avrdude -C/etc/avrdude/avrdude.conf -v -v -v -v -patmega2560 -cstk500v2 -P/dev/ttyACM0 -b115200 -D -Uflash:w:/tmp/build503225717737270483.tmp/read_apple_serial.cpp.hex:i

avrdude: Version 5.10, compiled on Feb 19 2010 at 10:20:42
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2009 Joerg Wunsch

System wide configuration file is “/etc/avrdude/avrdude.conf”
User configuration file is “/home/user/.avrduderc”
User configuration file does not exist or is not a regular file, skipping

Using Port : /dev/ttyACM0
Using Programmer : stk500v2
Overriding Baud Rate : 115200
avrdude: Send: . [1b] . [01] . [00] . [01] . [0e] . [01] . [14]
avrdude: stk500_2_ReceiveMessage(): timeout
avrdude: ser_recv(): programmer is not responding
avrdude: stk500_2_ReceiveMessage(): timeout
avrdude: Send: . [1b] . [01] . [00] . [01] . [0e] . [01] . [14]
avrdude: stk500_2_ReceiveMessage(): timeout
avrdude: stk500_2_ReceiveMessage(): timeout
avrdude: stk500_2_ReceiveMessage(): timeout
avrdude: stk500_2_ReceiveMessage(): timeout

I have already gone through the process to update the 8u2 firmware as described in
http://arduino.cc/blog/2011/02/15/fix-to-uno-and-mega-2560-linux-serial-problems/ and
http://www.wayneandlayne.com/blog/2011/02/16/fixing-linux-firmware-issues-on-arduino-mega-2560/, and I verified that
sudo lusb -v -d 2341|grep bcdDevice
correctly reports the new version 0.01.

In my system the serial port shows up as /dev/ttyACM0 (sometimes /dev/ttyACM1), and I this is recognized by the Arduino environment, i.e., I can select it correctly in the "Tools|Serial Port" menu.

I have had a look at boards.txt and this is the relevant part for Arduino Mega2560:
Code:
##############################################################

mega2560.name=Arduino Mega 2560

mega2560.upload.protocol=stk500v2
mega2560.upload.maximum_size=258048
mega2560.upload.speed=115200

mega2560.bootloader.low_fuses=0xFF
mega2560.bootloader.high_fuses=0xD8
mega2560.bootloader.extended_fuses=0xFD
mega2560.bootloader.path=stk500v2
mega2560.bootloader.file=stk500boot_v2_mega2560.hex
mega2560.bootloader.unlock_bits=0x3F
mega2560.bootloader.lock_bits=0x0F

mega2560.build.mcu=atmega2560
mega2560.build.f_cpu=16000000L
mega2560.build.core=arduino

##############################################################
Maybe the baudrate is wrong? Too high? I have no clue.

P.S.: I also have an avrispmkii hardware programmer and it seems to be working correctly (doing the necessary changes in boards.txt, of course). But I would like to understand what's going on and be able to do without the hardware programmer.

Thanks for your help.
4  Topics / Device Hacking / Re: Debugging an application that uses the serial port on: February 19, 2011, 03:29:54 am
Thanks, I also thought it might work, so I tried first without the amplifier; it didn't work, at least at this data rate (57600).
I don't know however if Arduino's serial port would work  correctly receiving only 0-3.3V for lower data rates (most iPad/iPod/iPhone accesories that use the serial port communicate at 19200 bps).
5  Topics / Device Hacking / Re: Debugging an application that uses the serial port on: February 18, 2011, 07:31:24 pm
Well, thank you all for your quick and insightful replies.
I think I will order an Arduino Mega for development, even if the final application will use the Arduino nano.
While it arrives, I will try to use the NewSoftware serial port just for transmission to the iPad and see if it works.

By the way, Crossroads, just for information, iPad's serial port works at 3.3V, so I am using a voltage divider to talk to it and an op amp to boost it signals for the Arduino.
Thanks again.
6  Topics / Device Hacking / Debugging an application that uses the serial port on: February 18, 2011, 01:09:55 pm
Hello everybody,
I am new to Arduino. I am working with Arduino nano under Linux Fedora 14.

In my application I need to talk to a device (an iPad, if you are interested) through the serial port, receiving commands from the device, analyzing them and replying to them from Arduino.

The problem is that this is quite hard to debug, because, if I have understood correctly, when I issue a Serial.write (or Serial.print, Serial.println) command, this has a double effect: it sends the bytes both to my device, attached to port 0, but also to the Serial Monitor (internal USB-serial port), is this correct?
So if I send a command to the Ipad, and I listen for its reply ...but if I do a Serial.print to have a look at this reply, I am also sending some garbage to the iPad (that of course is not what it is expecting to receive next). So how can I analyze (see/print/save in a file, anything!) what I have received in the serial port without sending unwanted commands back to the iPad?
I hope I have made myself clear.

I have tried using the NewSoftSerial library to do the Arduino-Ipad serial communication, and keep Arduino's true serial port only for debugging ... unfortunately NewSoftSerial does not seem to be able to properl handle the baudrate of 57600 bps that I need.

So what other alternatives do I have to debug the serial communication?
Thank you very much for any help.
A newbie.
Pages: [1]