Show Posts
Pages: 1 2 3 [4] 5 6 ... 67
46  Using Arduino / Interfacing w/ Software on the Computer / Re: starting the Windows media player from the UNO? on: July 23, 2012, 07:05:56 am
Quote
I still don't quite believe this but the documentation for 1.0 sounds like the pullups are *not* active for pinMode(INPUT).
They are not active by default. They can be activated, using digitalWrite(). Or, the call to digitalWrite() is made for you if you use the type INPUT_PULLUP.

Whew, thanks.

I think that the "disabled" in that sentence refers to the fact that there is now a call to digitalWrite() in the pinMode() function. It is called with HIGH or LOW based on the use of INPUT_PULLUP vs. INPUT.

A peak at the code confirms this. The digitalWrite() function isn't actually called, but the equivalent register manipulations occur.
47  Using Arduino / Interfacing w/ Software on the Computer / Re: starting the Windows media player from the UNO? on: July 22, 2012, 10:49:33 am
Quote
Where can I find info about "Hardware features" like the internal resistor, i guess it is not the only hardware feature on the board?
Start here: http://arduino.cc/en/Main/Hardware
Pick whichever board you have, and read all the details, even if you don't think you will use them (yet).

I still don't quite believe this but the documentation for 1.0 sounds like the pullups are *not* active for pinMode(INPUT). This would break a lot of my http://arduino.cc/en/Reference/PinMode
.
48  Using Arduino / General Electronics / Re: diode isolation - is this ok? on: July 03, 2012, 08:29:27 pm
Actually, just a 1K or 2.2K series-R will probably work.
thanks - i bet it would, certainly my circuit is not much different from a 22k.
49  Using Arduino / General Electronics / diode isolation - is this ok? on: July 03, 2012, 07:22:49 pm


i'm using a parallax ping distance sensor which has a single signal pin.  You pulse it high for 5-15 us then turn and listen for IT to pulse the same line high for a length of time corresponding to the distance.  http://profesores.fi-b.unam.mx/m3615m/datasheet-sen136b5b.pdf

I'm using an mcu with dedicated input and output pins so i can't quite do that.  I'm planning to compensate with the circuit above, sending the pulse out on one pin and reading the response on another.  The trigger output from the MCU is sent high for 15 us then the MCU lowers it to 0.  The resistor pulls the pin down to 0 but the the ping sensor should be able to overcome it and the diode should stop the MCU's 0 from interfering.

This looked ok on the scope except the high pulse from the MCU was down to about 3.3v by the time it got to the sensor - the response pulse looked fine and fat at near 5v.

I thought all was fine til the sensor stopped working.  Trying a spare, it's fine so it looks like I borked the first one.

Does this circuit seem safe?
50  Topics / Product Design / Re: Eagle - My first attempt is ready to go - I hope! on: June 22, 2012, 01:30:48 pm

 Is that a RS232 chip for serial conversion?  If so, usually there are some capacitors involved for it to work properly.

The soic pattern in the bottom left is a spare spot for experimenting. 
51  Topics / Product Design / Re: Eagle - My first attempt is ready to go - I hope! on: June 22, 2012, 08:49:11 am
Add the top & bottom ground polygons. If you have to cut a trace and add a wire, the ground plane will not make a difference. You could lay the 7805 flat on the board than and use the ground planes to help cool it.
The design needs some more caps - on the VCC, AVCC, AREF, and 22 pf caps on the XTAL1 & XTAL2 pins.
I see an ICSP connector for downloading a bootloader, or a sketch that starts in place of a bootloader.
I see a serial interface if you want to download a sketch that way via the bootloader. The pinout used is not standard. You might want to revisit that so you plug on a standard part like an FTDI cable or an FTDI Basic. If you're planning on making your own adapter cable you're all set.
A Diode across the pullup resistor will make for more reliable downloads,

Thanks very much for looking.  I'll add the polygons.  
I thought I had a cap on vcc but i'll add it.  The resonator has the caps built in I thought.
Holy cow if that serial cable layout is wrong that's a big oops - it's meant to be the same as my RBBB - i'll get right on that!

Thanks again

whew: I'm pretty sure the serial connector is ok - it matches my prototype which works with the same cable as my RBBB.  I guess it's not well labelled though - I'll add some clues for when I forget>
from top to bottom goes ground, skip, 5v, PC TX - AVR RX, PC RX - AVR TX, and RTS/RESET.
52  Topics / Product Design / Eagle - My first attempt is ready to go - I hope! on: June 22, 2012, 07:54:41 am
I've been putzing at this thing forever and I think I'm ready to send it off to Seeed for fabrication.  It's an arduino clone with ttl serial interface along with a 4021 shift register and a 74c02 nor gate connected to a custom 30 pin interface to another microprocessor board.  The routing is a combination of auto-router and my efforts where I thought I could make a difference.  The ground and +V traces are 24 thou, the rest are 16. 

One specific question is whether I need ground polygons.  I'm tempted to leave them off because I figure I will have done *something* wrong and it will be easier to fix with just the working traces on the board.  Aside from the crystal there wouldn't be any very high frequencies on the board.  The  other processor is running at a few hundred khz.

The AVR is a dip but i used soic for the other chips because they're small and easy to solder.  The area at the left will be covered with a small chunk of proto board for connecting to the other micro at the 30 pin connector.  I stuck a small grid of pads and an extra soic pattern in there because there was room.

If anybody has any suggestions or observations I'd be grateful.  I'm going to print the gerber image off at actual size and lay out parts on it as another check before i commit.
53  Development / Other Software Development / Re: Using Screen instead of Arduino's built-in serial monitor on: June 09, 2012, 09:22:19 am
I think your problem is at the arduino end rather than the pc software. Try reading/printing your data as char's rather than byte or int.
54  Using Arduino / Motors, Mechanics, and Power / Re: Dynamic Braking on: May 08, 2012, 05:20:09 pm
Presumably there's a motor driver between the arduino and the motor. I believe mine has specific settings for braking although i've never used them.

Worst case, just reverse the current.
55  Development / Other Hardware Development / Re: Eagle Routing Tips Needed on: May 06, 2012, 07:16:02 pm
Thanks again.  Once I started hand-routing it turns out not to be that bad and I can see what I'm doing.  It makes me think twice about pin assignment and such.  i bet when i'm done i could turn it back to the autorouter and it would do a good job.
56  Development / Other Hardware Development / Re: Eagle Routing Tips Needed on: May 05, 2012, 08:45:05 pm
@jack: thanks.
"I put ground planes on both sides which helps a fair amount."
I know how to do the polygon/rats-nest thing after the routing - is that the same thing?
"Then I try to place the components as logically as possible." ok
"Then I try the autorouter, 10 mil grid." ok
"If it's a real mess, I reconsider my "logical" placement of components and move things around."
I guess that's where I am.  How would you pick what  to move where?
57  Development / Other Hardware Development / Eagle Routing Tips Needed on: May 05, 2012, 06:11:21 pm
I'm doing my first PCB using Eagle and I'm struggling with the routing.  I'm not good at layout type things so I'm relying on the auto-router.  To get 100% routed I have to go with 10 mil traces and separation  for signals and 16/10 for VCC and ground and set the routing grid at 4 or less.  Even then I end up with dozens of vias and a jagged looking board.  There's lots of room and I've moved a few things around but it's hard to see any improvement.

Are there any general approaches I could take to improving it?  I did try hand-routing VCC and ground first but it just took me a long time to do and the result didn't seem any better.

The board holds an smd atmega328 with a power supply and ttl serial connections.  There's a 74hc166 shift register and a 74hc02 glue chip connecting to a 30 pin connector which interfaces with an existing board.



In the board layout the power supply is top right, the atmega is below it, iscp beside it.  the top chip near the 30 pin connector is the 74166 shift register and the 7402 is below that.   I would like to leave the bottom part of the board clear although that's not critical except for the icsp and other connectors.


any pointers or tips gratefully accepted.  Maybe for my next stab I'll try printing off the board and hand routing a chip at a time.
58  Using Arduino / Programming Questions / Re: Polling for an external pulse - logic question on: April 29, 2012, 11:36:32 am
Thanks very much for the hard numbers and the revised int0 times. I'm writing a midterm today but i'll be retrying an interrupt tomorrow.
59  Using Arduino / Programming Questions / Re: Polling for an external pulse - logic question on: April 28, 2012, 12:04:15 pm
Oh, I should have said, the problem seems to be missing the positive going pulse about one time in 50 or so.  Also. this processor is only running at 8mhz.
Quote
run1802
Hello World!
Hello Word!
Hello World!
Hello World!
Hello World!
Hello World
Hello World!
Hello World!
Hello World!
Hello orld!
Hell World!
Hello World!
Hello World!
Hello World!

apropos of the polling logic, I realized that given my timing, it wasn't necessary to check for the low condition so I pulled that out completely.  I'm now only missing one in 500 or so pulses/characters.  The target processor will be 16mhz so the problem may go away completely if the millis update routine completes in <my pulse duration.
60  Using Arduino / Programming Questions / Polling for an external pulse - logic question on: April 28, 2012, 11:37:09 am
I'm using a polling loop to wait for a pulse from an external system that lasts 1-2 us. There's a good 5000us between pulses.

I'm polling rather than interrupting because I need to get the data in very quickly.

The following logic woks if I disable interrupts:
Code:
  noInterrupts();
  while(true){ //loop for 1802 program output
    while (PINB & 0x10); //make sure 1802 signal is low
    while ((PINB&0x10)==0); //wait for it to come high
    char1802=busin(); //grab the character **this will take several us**
    Serial.print(char1802); //running at 19200 - maybe as much as 1ms
  }

I don't think the delays in grabbing or forwarding the character are the problem.  It's something like the millis() service routine happening during or over the pulse. 

I don't really want to disable interrupts - anybody got a better idea?  I keep thinking maybe the polling logic is wrong.
Pages: 1 2 3 [4] 5 6 ... 67