Show Posts
Pages: 1 2 3 [4] 5 6 ... 67
46  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.

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?
47  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. 
48  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.
49  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.
50  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.
51  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.
52  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.
53  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?
54  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.
55  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.
56  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.
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.
57  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:
  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.
58  Using Arduino / Programming Questions / Re: Timing and speed issues with pin change interrupt based routines - Arduino slow? on: April 26, 2012, 08:10:25 pm
could you just have a tight loop that reads all 12 bits and does a table lookup or hash function to get the 4 output bits?  Don't worry about changes - just translate 12 bits to 4.
59  Using Arduino / Project Guidance / Re: Make a RC car run a whole race track pre-programmed on: April 13, 2012, 07:31:02 am
Easiest approach to rc from arduino to car might be to get a cheap car and take apart the transmitter box to hook the arduino in. I did this with an rc plane and was able to control it easily. I'm sure a car would be too.

I was actually trying to fly the plane on a programmed path with feedback via a webcam watching for it - very little luck with that.
60  Using Arduino / Interfacing w/ Software on the Computer / Re: Plug 'n Play Webfirmata: Control your Arduino without any programming on: April 08, 2012, 09:50:39 pm
It all runs on one windows box with chrome - right? I just add the labscript package?

I can see it being useful for some hardware poking - i'll try it out.
Pages: 1 2 3 [4] 5 6 ... 67