Go Down

Topic: Need help with board design (Read 2860 times) previous topic - next topic

Endevor

Alright, I'm beginning to reach my last straw and last dollar on this project...

I'm designing a shield and getting it fabricated through OSHPark and I've gone through 5 "versions" so far and still can't get things to work so I want someone else to take a look and see what I'm doing wrong if anything as far as my schematic goes.

I'm designing a Arduino Mega Shield (I'd love for it to be Due compatible as well, but one thing at a time)
There are three main circuits:

A buzzer
A DS3234
and Xbee support (Wifi or Bluetooth)

Running along the top of the board are Molex Microfit connectors for I/O to other devices and a RJ-45 jack for a more specific I/O. RJ-45 Jack splits and connects to one of these: http://www.adafruit.com/product/815 to control some LED drivers and a couple relays. The rest plug into either a switch, LEDs, or sensors.

On top of this I'm adding a touchscreen: http://www.robotshop.com/en/3-2-tft-lcd-touch-shield-arduino.html
I've been able to get this to work as well and reserved those pins in the shield. They're marked in the schematic.

The buzzer seems to work fine... almost too well, but I still can't get the DS3234 RTC or the xbee to work. My main worry is that I'm not putting something in the board in general that stabilizes everything so it can all function. Everything I know about designing circuitry is from researching on the internet, so I haven't had any formal training. I'm looking for help. I don't want to move something just to feel like I changed it and buy another set to hang on my wall of shame. Attached are pictures of the schematic and board. If you have any questions, please, let me know what you need to know to better help me.

Thanks!

Hackscribble

Hi Endevor

Looking at the RTC, are you planning to use standard hardware SPI to talk to it, or are you using software SPI?  

You have the RTC SPI pins connected to Mega pins different from the Mega's hardware SPI ones.

Also, I can see a 22pF capacitor from 3.3V to GND near the RTC.  I would expect a bigger capacitor(s) for decoupling.

Regards

Ray
Hackscribble.  Writing about making things
hackscribble@outlook.com

Endevor

I was getting a little confused reading up about that one. I think I was trying to use hardware configurations earlier, but just found on Arduino the software library for it. (http://playground.arduino.cc/Main/DS3234SoftwareLibrary) I plan on retesting it when I get home from work. Is there a benefit to using hardware over software? The only reason I moved it from the suggested pins on Sparkfun was because those pins were already occupied by something else.

Hackscribble

Looks like the library does software SPI, so the pin allocation should be OK.

Make sure your program specifies the correct pin number when invoking the library.  You are using A8 as MOSI, so will need to specify pin 62, and so on.

Port         Pin     Function
PF 0       54       A0
PF 1       55       A1
PF 2       56       A2
PF 3       57       A3
PF 4       58       A4
PF 5       59       A5
PF 6       60       A6
PF 7       61       A7
PK 0       62       A8
PK 1       63       A9
PK 2       64       A10
PK 3       65       A11
PK 4       66       A12
PK 5       67       A13
PK 6       68       A14
PK 7       69       A15
Hackscribble.  Writing about making things
hackscribble@outlook.com

Hackscribble

You have the Xbee module connected to the Serial port (as in hardware Serial0).  This will be shared with the serial monitor port via the Mega's USB.  Was that intentional? Looks like hardware Serial1 port is unused. 
Hackscribble.  Writing about making things
hackscribble@outlook.com

Endevor


Looks like the library does software SPI, so the pin allocation should be OK.


Thanks! That should probably remedy that situation


You have the Xbee module connected to the Serial port (as in hardware Serial0).  This will be shared with the serial monitor port via the Mega's USB.  Was that intentional? Looks like hardware Serial1 port is unused. 


This is the part that's really getting frustrating. I have a generic xbee shield that communicates through serial0 and thus using XCTU can find the wifi xbee module. I had originally moved it over to serial1 because of the reason you stated, interference with the serial monitor and programming port, but XCTU seems to not be able to find anything on other ports. It may be that I'm doing something wrong in XCTU, but I can't find anything in settings about which serial port to hunt down. That's why I had moved it back to Serial0.

Hackscribble

Not used Xbee or XCTU, so can't help with those, I'm afraid.

You are supplying the Xbee and RTC from 3.3V but interfacing them with 5V logic levels from the Mega.  Have you checked if the devices will tolerate the higher voltage on inputs?
Hackscribble.  Writing about making things
hackscribble@outlook.com

Hackscribble

Looking at the images of the PCB, I can see a red track between Xbee pin 1 and RTC pin 4.  This track also connects to some other components, but I can't see where it connects to 3.3V.
Hackscribble.  Writing about making things
hackscribble@outlook.com

Endevor

According to the RTC datasheet, it can take up to 5.5V, but preferably 3.3. The xbee wifi module requires 3.3


You are supplying the Xbee and RTC from 3.3V but interfacing them with 5V logic levels from the Mega.  Have you checked if the devices will tolerate the higher voltage on inputs?


And now I'm starting to feel like an idiot... Apparently those two pins require the 3.3V signal, but never actually connect to the 3.3 pin... Doesn't help that the wire was labelled 3.3, but for some reason didn't connect in the auto router.

CrossRoads

Check your parts on the schematic - give each one a wiggle and see if the wire actually connected to the pin.
If you run the ERC on the schematic, that kind of thing should show up also as an unconnected pin.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

MarkT

The RTC _must_ be powered with 5V if using 5V logic signals.  You'll see the
signals are rated for operation only between -0.3V and Vcc+0.3V.  If you set
Vcc = 3.3V for the RTC you'll have to level convert to talk to it.
[ I will NOT respond to personal messages, I WILL delete them, use the forum please ]

CrossRoads

Also,
DS3234: VoutH with Vcc @ 3.3V = 0.85 x Vcc = 2.8V.
'2560 running at Vcc of 5V needs 0.6 x Vcc = 3V.
So that'd be another reason to run DS3234 at 5V, or use level converter.

Similar for Xbee - it's expecting 3.3V signals on Rx/Tx, not 5V.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

Endevor


Also,
DS3234: VoutH with Vcc @ 3.3V = 0.85 x Vcc = 2.8V.
'2560 running at Vcc of 5V needs 0.6 x Vcc = 3V.
So that'd be another reason to run DS3234 at 5V, or use level converter.

Similar for Xbee - it's expecting 3.3V signals on Rx/Tx, not 5V.



So if I wanted to keep things closer to 3.3v, I should map if for a Due? Especially since it's pins run off 3.3v. The xbee's data sheet for sure claims that it requires 3.3v so it would definitely need a converter. The RTC however can handle 5v and therefore shouldn't need a converter depending on which Arduino I use. Might as well make it for the Due, especially since with a touch screen it runs so much faster.


Also, I can see a 22pF capacitor from 3.3V to GND near the RTC.  I would expect a bigger capacitor(s) for decoupling.

I missed this before, so I'll ask about it now. The RTC circuit I embedded is based off the RTC circuit on Sparkfun hence why it's 22pF. I'm not as familiar with decoupling capacitors, just more or less a general idea of what they do for a circuit. As far as how big they should be for said circuit, I have no clue. What would you suggest?

TomGeorge

Hi, have you tried all this out on a proto board first, stage by stage?
It sounds like you are designing a circuit, getting a pcbs etched, then debugging.

I would  suggest you get a protoboard, get each feature of your project working, then on the protoboard combine them, each time debugging any problems  that arise.

With everything on the board and I understand untested it makes it difficult for anyone to help, as you have not told us if they work separately.

Tom...... :)
PS have you had previous experience with Xbee or RTC.
Everything runs on smoke, let the smoke out, it stops running....

Endevor


Hi, have you tried all this out on a proto board first, stage by stage?
It sounds like you are designing a circuit, getting a pcbs etched, then debugging.

I would  suggest you get a protoboard, get each feature of your project working, then on the protoboard combine them, each time debugging any problems  that arise.

With everything on the board and I understand untested it makes it difficult for anyone to help, as you have not told us if they work separately.

Tom...... :)
PS have you had previous experience with Xbee or RTC.


I have done that for the most part. The Xbee is the only thing I haven't fully implemented on a breadboard. I had a shield to take the Xbee then copied over the schematic. The RTC is driving me nuts since I can get that to work exactly the way I have it laid out, but not when I put it on a PCB. I went from the DS1307 to the DS3234 and I can get the embedded versions to work fine. Little harder on a breadboard for the Raw DS3234, but the schematic for the breakout board seemed simple enough.

I have experience working with RTCs and the Radio Xbee. The wifi module is a tad bit newer to me.

Go Up