element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Internet of Things
  • Technologies
  • More
Internet of Things
Blog Building a Battery Simulator - Part 2
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Polls
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Internet of Things to participate - click to join for free!
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: shabaz
  • Date Created: 21 Dec 2014 2:05 AM Date Created
  • Views 5130 views
  • Likes 4 likes
  • Comments 24 comments
  • eagle
  • eaglecad
  • ioe
  • internet_of_everything
  • eagle_cad
  • pcb
  • internet_of_things
  • iot
  • features_of_iot
  • battery_simulator
  • cadsoft_eagle
Related
Recommended

Building a Battery Simulator - Part 2

shabaz
shabaz
21 Dec 2014

Introduction

This Battery Simulator project is intended to provide a way of testing small devices such as wireless sensor nodes that usually require a battery power source. For more details, check out part 1 by clicking here. After you've finished reading, click here for part 3.

image

 

This part 2 discusses some of the PCB layout (more details once the board has arrived and been tested!). Note: The board was not designed for production, and PCB layout engineers will take many different decisions compared to the design here. However the general layout is described here for those interested in following the project (layout and schematics will be published so others can build it too).

image

 

PCB Layout Decisions

The approximate functional areas are shown below, and the paths (and returns for power planes). The highest frequency signals will be around the ADC, and it was kept furthest away from the remainder circuitry.

 

The path for the high current portion of the design is on the left side. There are multiple power and ground planes, all returning to a common point, which is not always feasible (and not always necessary) but was possible in this case. The aim is to always follow the high current signals and avoid supplying or referencing off them from different points, because whenever high current is flowing, there will be a voltage drop across different points on the same path (since V=IR and all traces have a certain resistance) which may affect any circuitry sensitive to voltage.

image

 

Often there are many other objectives too, such as avoiding capacitive or inductive coupling or RF pickup or thermal effects from having a significant influence, depending on the types of circuits on the board. Some things can be solved at the component level (e.g. matched transistors, or shielded inductors) whereas others need board-level or entire assembly-level support (e.g. through distance between components or traces or planes, and shielding of circuitry).

 

Bypass capacitors are essential to provide low impedance to AC signals. A good general rule is to always follow the datasheet, otherwise if not specified, use a 100nF ceramic capacitor for circuits operating at frequencies up to a few tens of MHz. Any higher, and a 1nF capacitor should be used. In the several hundred MHz range, a 100pF capacitor should be used. The reason for these values is that capacitor inductive component becomes significant and limits the range that capacitors can be used at. The values above are rules of thumb. For higher frequencies, the datasheets should be consulted.

 

Zero-ohm resistors in line with signals are a great way of isolating circuitry, especially for a first PCB where you may want to isolate bits of circuitry.

 

To start the layout, the first step was to approximately sketch the sub-circuits, so that they could be moved around to plan it (like planning the layout of a room):

image

The final layout (shown earlier) looks different from the one above, but some parts of the circuit can be seen to be in similar positions to this initial thought.

 

Copper areas were created using ‘polygon’ elements in EAGLE. It is worth spending time learning how to use them because they are essential for power planes.

 

Via holes were kept large to allow low-cost PCB manufacturers to be used, which meant that in a few places they could not be avoided in the pad area, and were placed as far out from the center of pads as possible. This is not usually an issue for hand-soldered boards.

 

Regarding trace width, if current is expected to be high or resistance will have an effect on a particular signal then thick or short traces are needed; for digital signals often thinner traces are better to reduce capacitive coupling (I avoid the absolute minimum that the manufacturer supports, and choose a width perhaps 1/3 higher), and route them away from analog portions.

 

Another consideration is how the board will be cased; for flexibility there are holes with different spacings so that the board should hopefully fit several different enclosures. I chose 50, 85 and 90mm spacings, and also cut off all corners. Lots of space is needed around screw holes, so it is good to dedicate this space early before spending time routing signals.

 

For text on the PCB, a good size is 1.27mm height; this is very readable from a distance yet small enough to fit in most places. If this size is not possible then I reduce to 0.9mm height which is still readable but small. Smaller that this is possible too, but I avoid going further than that.

 

Space may be needed for labels, and 30mm or more is not unusual. Logos were created by using EAGLE’s import-bmp program (also known as a user language program or ULP in EAGLE terminology).

 

EAGLE’s ‘Smash’ option is used to separate labels from the component packages, so that text can be moved around. I chose to only have the component references on the silkscreen, and not the component values.

 

Since there may be multiple copies of this project floating around the lab, it was decided to electronically label each one, either with an electronic serial number or programmable memory. This makes it possible to retain history for each board such as calibration data or board revision numbering so that the same software can be used with multiple boards. I used serial EEPROM.

image

Post 3 will follow hopefully early in the new year!

Attachments:
imagemain.pdf
  • Sign in to reply

Top Comments

  • michaelkellett
    michaelkellett over 10 years ago in reply to shabaz +2
    For what it's worth here's my take on an all analogue version. All parts from Linear Technology just because it's easier to model them in LT Spice than any other way. Key things are that R5=R4 and the…
  • mcb1
    mcb1 over 10 years ago +1
    Sounds like a very useful item. The electronic tag is a great idea, and as you point out can be used for calibration reference checks. Thanks Mark
  • jw0752
    jw0752 over 10 years ago +1
    Hi Shabaz, You have time to do all this beautiful work and still have time left over to help a friend get his little oscillator going. I will continue to follow your project as it is very interesting.…
  • Robert Peter Oakes
    Robert Peter Oakes over 10 years ago in reply to shabaz

    I have not tried the digital pots either but I think they may be a good choice in order to keep complexity low

     

    I will when the time comes investigate the option of using 3 term control (PID) for this but either way I would prefer a micro controller based version, I am trying to have minimal desecrate components for the SPU (WOW, too mch RUM eggnog image ) PSU as I have seen so many projects that have way too much complexity for a digital system and would like to see if it can be done all in software or atleast most of it.

     

    I continue to watch with extreme interest

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • Robert Peter Oakes
    Robert Peter Oakes over 10 years ago in reply to shabaz

    Ah, the love of breadboarding image

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • shabaz
    shabaz over 10 years ago in reply to Robert Peter Oakes

    Hi Peter!

     

    I think a battery simulation mode would be awesome, to suit all the portable projects people want to create. Often one specifically tests with a battery, just because the PSU behavior will be different from how the project will be actually used.

    The simulator here only simulates single-cell LiPo projects (or single or dual AA cell for example), whereas a fully-fledged PSU could potentially support loads more scenarios. I suspect many existing PSUs cannot be retro-fitted or modified with this capability,but a new design such as the one you're creating could do this. You will need more accurate current monitoring than for a usual PSU, but the cost is low overall compared to the cost of making an entire PSU anyway.

    Also, with the higher voltage, you could simulate solar panels too, i.e. a 'solar panel mode' : ) That would become a really advanced test tool : )

     

    The project here has a BoM of close to $100 I expect, but your PSU will already (presumably) have most of the bits, but a slight uprating (so very little incremental cost) of the ADC and DACs may be required, although presumably not much (the project that Michael linked to used 10-bit devices, although I had personally thought I'd need far higher resolution, so I had gone with 18-bit for the ADC).

     

    Although I'm familiar with what they are, I've actually never used a digipot before - that would have been an interesting thing to try too. The first iteration PCB is being manufactured, but the design is complex enough I probably will need a few more iterations to try out the ideas mentioned so far in the posts.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • michaelkellett
    michaelkellett over 10 years ago in reply to shabaz

    I'm planning to devote my mince pie energy to eating more mince pies (aided by wife, children and dog) for the next four days so I'll be away from computers.

     

    Happy studying.

     

    MK

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • michaelkellett
    michaelkellett over 10 years ago in reply to Robert Peter Oakes

    I always think of digital pots as a special case of multiplying DACs but a quick check shows that something like the AD8400 in 1k has some virtues - easy to model and good bandwidth (-3dB at 5MHz) so it wouldn't mess up the loop response. The 10k part is more linear but has a much worse frequency response. I was a bit worried that the DACs I was looking at were not that good for dynamic performance but you do get 16 bits rather than 8 (at  a price of course). AD's 1024 step pot has a rather poor frequency response.

    The fancy 16 bit ADC (LTC1595) costs a lot more but look at the graph on page 6 which shows how its frequency response as a multiplier is all over the place as the code changes. I think the (much cheaper) pot might actually work better.

    http://www.linear.com/docs/1334

     

    MK

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
>
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube