CIRCUIT CELLAR PDF

adminComment(0)

Advertising Contact: Warren Kaufman | [email protected] | By Engineers . vector-based format, printer-ready PDF. Circuit Cellar is the premier media resource providing critical information on embedded electronics be submitted in a vector-based format, printer-ready PDF. Issue # October MCU-based Security. 6: Making a Chess-Playing: Robot: Using Python and Raspberry Pi, By Christopher Martin-Rebneris.


Circuit Cellar Pdf

Author:MERTIE KUSSMAUL
Language:English, Arabic, Hindi
Country:Iraq
Genre:Environment
Pages:594
Published (Last):01.04.2016
ISBN:876-2-68123-211-9
ePub File Size:19.52 MB
PDF File Size:20.87 MB
Distribution:Free* [*Registration needed]
Downloads:40619
Uploaded by: GENNY

Circuit Cellar - Full Year Collection Circuit Cellar magazine features engineering Circuit Cellar magazine features engineering tutorials, detailed pdf. Related news. Free Astronomy Full Year Collection. Circuit Cellar magazine. You can download Circuit Cellar magazine (issues of ) free. Registration not required. Good quality. File format: pdf. You can download the archive of Circuit Cellar mazagine free. Free package of programs to work with pdf and djvu files can be downloaded here.

Unlike static PDF Ciarcis's Circuit Cellar solution manuals or printed answer keys, our experts show you how to solve each problem step-by-step. No need to wait for office hours or assignments to be graded to find out where you took a wrong turn.

You can check your reasoning as you tackle a problem using our interactive solutions viewer. Plus, we regularly update and improve textbook solutions based on student ratings and feedback, so you can be sure you're getting the latest information available. How is Chegg Study better than a printed Ciarcis's Circuit Cellar student solution manual from the bookstore? Our interactive player makes it easy to find solutions to Ciarcis's Circuit Cellar problems you're working on - just go to the chapter for your book.

Hit a particularly tricky question? Bookmark it to easily review again before an exam. The best part? As a Chegg Study subscriber, you can view available interactive solutions manuals for each of your classes for one low monthly price. I assume all window glass is sufficiently transparent to UV. Have the board cut into four pieces; two should be The last pieces of wood you need to download are for mounting the glass into the table. The box measures The plywood is the bottom of the UV table and the pine boards are its sides.

Position them on the outside edge of the frame to create a recess for holding the glass. This recess also keeps the sharp edges of the glass hidden from fingers that may brush against them.

A hole that large would leak UV and may be a hazard to eyes. Give the box and the remaining piece of plywood a thick coat of white paint. I assume the white paint will reflect UV the best. Finish by nailing feet onto the bottom of the box. Align the lid on top of the box. While securely holding it in place, screw in the hinges on the long side of the box.

Be careful and make sure the box will open after you screw on the hinges. Open the box and mount the fluorescent lamp fixtures inside the table, centered on the bottom. Mount the power strip on the outside of the table. You want the power strip on the side with the notch for the power cords. Use a few of the drywall screws to hold the power strip to the side of the UV table.

To keep the power strip from sliding off its mounting screws, make a stop with the mending brace. Screw the brace to a corner of the table on the side that the power strip wants to slide off. Bolt the brace flush against the power strip. Plug the lamp cords into the power strip.

At this point, turn on the lamps and the power strip. Next, remove the lamp covers and fluorescent tubes. Mount the pull handle to the center of the lid using the screws that came with the handle. Be sure to screw the handle tightly to the lid.

Before proceeding, thoroughly clean the glass, getting rid of any dirt or fingerprints. Place the glass into the recess at the top of the box and use a little silicone glue in the corners to hold it down. Finish the inside of the lid by gluing the 0.

The plastic sheet and foam rubber create even pressure on the copper clad board and resist mask. After the glass is in place, use silicone glue and attach a steel ruler or square to the top of the glass. The ruler will align the copper clad with the transparency. A metal square can be used to align doubled-sided boards. Your UV table is now complete. This made me realize that I had better things to do with my time than to shake trays for 30 min.

So, I downloadd a foot massager on sale that could agitate boards for me. At first, I tried placing the etchant and board into a sealed plastic freezer bag and dropping it into the foot massager filled with warm water.

This resulted in unevenly etched boards. Currently, I use a thin plywood platform built on top of the foot massager to shake a photographic tray filled with warm water, a freezer bag 22 Issue January containing etchant, and an exposed copper clad board see Photo 2. Eventually I want to find a thin box that I can set inside the massager when filled with warm water. Inside the box would be etchant and the board s standing vertically on edge.

The water surrounding the thin box would keep the etchant warm, speeding up the etching process. I glued a basswood strip to the bottom of one side of the plywood to keep it level when it is placed on top of the foot massager. I recommend using small metal screws to attach the wooden table to the top rim of the massager, although I use a set of dowels. This allows you to set the etching tray on the table without permanently attaching the tray to the table.

This barrier is high enough to stop the tray from bouncing all over the place. Use a bug light to see what you are doing while the sensitized boards are outside their lightproof bag. A photographic supply store may have a portable light fixture that you can use instead of the bug light.

Also, download a cellulose sponge to finish your boards. download your PCB supplies from Kepro. Each board has a layer of sensitized resist and is covered with a clear plastic sheet.

This sheet is transparent to UV and protects the resist from being scratched while handling. Kepro also sells epoxy composite and glass epoxy-based boards.

Polyester boards work well for my projects, but I would use a glass epoxy board for a PCB that I planned to sell. There is an 11step process for fabricating a PCB. First, design the board in software, double-checking your design. Second, print an inverted-color copy of the artwork onto a transparency sheet with a laser printer.

Then, trim and tape the transparency to the glass in the UV table. Fourth, place the board copper side down on the transparency and expose it to UV for 60 s. After that, develop the board for 60 s. Seventh, place the developed board into a freezer bag filled with etchant and seal the bag.

The next step is to agitate the board for about 30 min. Ninth, clean the board and let it dry. Next, drill holes in the board. And finally, the eleventh step is trimming the PCB. This inexpensive Windows 95 program is easy to use.

It has related software that does schematic captures and circuit emulations just like PSpice. But, I have been able to design my board without schematic capture, autorouting, or testing. Ares Lite comes with a large number of component pinouts. You can develop any that are missing from the database. A background grid exists in the workspace allowing you to snap down components at mils intervals.

The program lays down copper traces with widths from 5 to mils. After www. In most circuit board designs, ground planes are recommended. I use ground planes to reduce the amount of copper that needs to be etched from the board. You can see red and the bottom copper is blue.

UV lamps beneath the glass. The software allows you to desigworkspace without deleting them. At or bottom copper , and then the width anytime during board development, of the trace. On the workspace, make a you can load additional components. And then to end the trace, right ponents by rotating or flipping them. After properly oriented, drag the comWhile laying out components or the ponent to the workspace and place it traces, you can change pad sizes if anywhere. At anytime while laying out necessary.

After components and the board, you can duplicate or drag traces are in place, create ground components to a new location. You planes by filling open spaces with copcan even rotate components in the www.

The software allows you to create polygonal-shaped ground planes. Before finishing, add hardware mounting holes to the board.

There is a text feature in Ares Lite that enables you to draw rectangles, polygons, circles, and write text. When finished designing your product, print the resist mask and any notes regarding component placement.

To print the resist mask, select Output, then select Print. Be sure to select the option to invert the colors. Usually I print a paper copy review. Next, print a copy of the component layer and your notes on paper.

Also remember and shoot the next board on to deselect the box for the UV table. If the making a PCB are to keep the toner side is up, the face of cost of consumable products the transparency will be low and keep the process dull over the black areas.

If clean. Use masking tape to While the exposed resist hold the transparency on hardens, get the developer Photo 2—The developed PCB is in a freezer bag filled with etchant. The bag is the glass. Use as little mask- in a tray of warm water. The foot massager will be turned on next. The ing tape as possible, because Kepro developer is just washit will act as a mask increasing the Place the board so that no traces on ing soda. It comes as a dry amount of copper that gets etched. To and mask.

After positioning the board over the board, pour 1 tsp 5 ml of dry develWhen taping down the transparency mask, close the lid of the UV table. Do not mask, avoid touching the glass, because The lid protects your eyes from the add water yet.

I like to place a etchant into a Glad freezer bag. I use little pressure on the lid to make sure sodium persulfate SP as my etchant. When you using the power strip switch. After the second board, use fresh chemicals for take out a board from the copper clad lamps start, wait 60 s for the proper each board.

Do not play with the After exposing the board to UV, let ing soda. Still with the lights off and plastic covering on the copper side of the resist harden for 15 min.

If you need to exposed board from the UV table. After developing, the image will have much more contrast. Peel off the plastic protective cover Photo 3— At from the copper side and drop the Nampa High board into the photographic tray filled School, Idaho, my with developer keep the board face electronics students design a up. Spend 1 min. Here, neath the bug light go K-State! After Adam Rainwater 1 min. Gently wipe the copper Josh Roach, surface with a small sponge dipped in Bennett Yankey, developer.

The copper to be etched and Steve Hyer. Once, the resist completely dissolved off the board. I imagine this happened because I left the board in the developer too long. It will be obvious when the copper traces are clear of resist, but you may lose a board learning this.

The critical part of making a PCB is the development process; every other step has a little slop built into it. After developing the board, rinse it in warm water to stop the developing.

If you find any defects in the resist, let the board dry before repairing it. The boards usually come out of the developer fine. Lightly tap the pen onto the trace and leave a spot of permanent ink. You should do this several times, but let the ink dry between markings.

Being a cautious fellow, I still leave the lights off while beginning this process. The etchant is a clear liquid that turns an attractive blue when etching copper. Kepro sells the etchant in a powder, which will store longer than when in solution. Two and a half pounds the smallest amount Kepro sells of dry etchant powder makes 1 gal of etchant. One gallon is enough for dozens of boards. I transfer the dry etchant into a Tupperware container and store it in a location safe from my house rabbits.

You should do the same. Knead the powder in the bag to dissolve it. After dissolving the etchant, place the developed board into the freezer bag and seal it. Doublecheck the seal. Then, set the freezer bag aside and pour hot water into the etching tray. Place the freezer bag in the tray with the copper side of the board facing down.

Wrap most of the excess bag around the board, leaving the excess bag on top. After placing the tray on top of the etcher, turn on the foot massager see Photo 3. I like to set the www. It takes less than 30 min. About halfway through the etching, change the water in the tray, replacing it with hot water. You can etch two boards simultaneously.

Place each board in its own bag filled with etchant and drop one on top of the other in the tray. Midway through etching, when you change the water, switch the position of the bags.

After you start etching, you can turn on the room lights. After etching the board, remove it from the freezer bag and thoroughly rinse it. Place the etched board back into the developer tray the developer will be cold and let it sit for a few minutes. One minute later, you can use a sponge to finish wiping off the resist. You now have a clean and etched PCB see Photo 4. Rinse the board and prop it up on its side to dry.

You may want to tape a piece of paper over the base of the Dremel drill stand so that the PCB surface stays clean. I typically use a no. I experimented with miniature steel drill bits downloadd from the local hardware store and discovered that they leave a pile of melted dust.

I also discovered that carbide drill bits in surplus magazines do well. The problem with carbide drill bits is that they are brittle. Although they remain sharp for a long time, they cannot tolerate sideways force; a jiggle while drilling is enough to snap them.

Ciarcia’s Circuit Cellar Complete Series

With care, you will be able to drill hundreds possibly thousands of holes with carbides, but always keep extra bits on hand. The next step is to cut and trim your PCB. Use a razor cutter mounted to a handle to trim the PCB. Using a straight edge, score the PCB by cutting it several times with the razor.

After scoring the board, carefully snap the board along the score. Use sandpaper to smooth and round the edge. I lay sandpaper on a flat surface and run the board edge across it. Tinning compounds are available in a dry powder. To use them, mix the tinning powder with water and soak the board.

Some of the tin in the solution will replace some of the copper on the board. After the tinning process, remove the board from the solution and let it dry. Solder two diagonal pins of an IC sockets first.

Then, press on the socket as you reheat the two soldered pins. This allows you to seat the socket completely before soldering the remaining pins. The only thing lacking is plated-through holes. Steve introduced me to Kepro and how to design and make top-notch PCBs. Now, use your printout of the component layer and notes. I cannot stress enough the importance of complete documentation. It also pays to get a good solder station and tools. Your boards will be excellent quality and deserve clean and trim solder joints.

Always wipe the solder tip on a damp sponge and immediately tin it. I use a set of sharp cutters to clean up my solder joints and exposed wires. Be careful, I have managed to cut a copper trace off a board with these cutters.

And, get a lead bender and use it regularly. It will bend resistor leads to the correct length the first time, saving strain on the leads.

His interests include astronomy, meteorology, digital electronics, and outer space. To facilitate his hobbies, Paul designs his own PCBs. Recent PCB designs include a Lego robot controller, a digital display for a hat, and a controller for nearcraft a high altitude, model satellite. Digging Deeper Having covered the consequences of not making your design safe and reliable, George is ready to get up to his neck in the details of the hot tub controller application.

Relax, turn up the jets, and get ready to toast the success of your next design. You calculated its predicted reliability and discovered that it satisfies the MTBF design criteria.

This is not as easy as it seems. More effort is expended to make the design safe. This leads to design review and possibly changes to eliminate weaknesses. In most systems, it is not necessary to examine every component. You can rearrange the design into functional blocks and, when needed, consider individual component failures within functional blocks that may be critical. Take a look at Figure 1.

The work sheet shown in Table 1 is a standard format that engineers often tailor to fit their specific requirements. This matrix is simplified, limited only to issues you need to consider. The first column identifies the failure. For a more complicated system, you would have a separate database of the failures with reference pointers to the work sheet.

The letter identifies the functional block, the number, and the individual failure of the block. The next three columns are selfexplanatory. The method of detection includes built-in test capability and status reporting.

There are only two criticality levels, high and low. The probability column will assign a probability number to the fault taken from the reliability prediction in Table 2.

Observation is the only detection method of malfunction. They indicate that satisfying the 10—5 system availability will not be a www. The reliability prediction has already shown that. Failure of the power supply, just a cold joint of the grounding pin of U1, will likely damage the controller and could cause critical water overheating.

A3 means the power supply puts out less VDC than expected. It could be a half wave rectified AC. You have no idea how the controller will react to this. You could perform more analyses, going from block to component level, analyzing failure modes and effects of every component, and then try to improve the reliability of the components potentially responsible for critical failures.

However, as the probability number shows, you are almost three orders of magnitude away from satisfying the critical performance 10—9 is required for water overheating. B1 and B2 show that there is a two orders of magnitude deficit in satisfying the critical requirement. Software is a potential culprit.

Assume the software has been properly verified and validated and its reliability is not an issue. It is a bottom-up review of the design. Consider functional failures and examine how they propagate to the system level. Generally, functional blocks give sufficient detail, but check out individual components only if there is a critical failure. Two checks can be performed here: Your system will be fail passive, meaning that if the microcontroller detects invalid data, heating will shut down.

The mechanical design must make sure thermistor R3 is exposed to the water temperature at all times. Block D is monitored for the solenoid valve SV current through R6. This allows detection and protection from short and open circuits. However, Q1 is a critical component. If it fails by shorting SV to ground, a critical fault will result. D5 is not stressed unless there is a transient, and there—7 —7 —7 —10 —6 6. This is a top-down view advantageous to of the system.

You identify critical failures and consider which causes will contribhave an indicaute to them. By adding known failure probabilities, the same used when creating the FMECA, you arrive at the probability of the event of interest. As with the FMECA, the analysis can be performed on the functional block as well as at the component level.

Using Boolean logic, probabilities fed into an OR gate will be mathematically added, while the ones fed into an AND gate will be multiplied: Maybe loss of or continuous heating Observation High 6. Observation High 2. This means the Microcontroller block is not working. Its output could be stuck in either state.

Resistor network is designed such that a short or open of any device takes the signal out of plausible range. C2 Observation Mechanical design issue D1 Microcontroller monitors Q1current; observation D1 Microcontroller monitors Q1current; observation Can be detected but not remedied by the system Table 1—The analysis data is organized in the FMECA work sheet, which makes it easy to review assumptions and conclusions.

This would give even odds for the uncommanded heating after 79, years. But, what if you could feed the top event in Figure 2 into an AND gate?

ANDing it with another signal of merely 2. This is how high safety and reliability is achieved in systems by redundancy. You have to sacrifice the overall MTBF as you add components, but critical functions will perform better.

Adding a function that may or may not be available does not solve the problem. As long as the electronic controller works properly, the thermostat could be defective yet you would never know. Conversely, the thermostat could be controlling the hot tub while the electronic controller is dead. The most common solution is to double the processing channels and revert to a safe state, in this case the www.

But if a fail operative system is needed, at least three processing channels with a majority vote will do the job. When designing a redundant system, it is often advantageous sometimes required to design the channels differently to avoid common mode failures in channels.

Figure 4 is the simplified diagram of the hypothetical controller, now improved so that it meets the safety requirements. Modifications included adding transzorb D3 5 V and fuse F1 to the power supply. If the power supply output exceeds 5 V, the transzorb will conduct and the excessive current will blow the fuse.

GP2 and GP4 were switched to make the internal counter available for the monitor. And, a second SV driver, Q2, was added for a totem pole driver www. A hardware monitor that uses a single quad comparator, such as LM, was added too. How does the circuit work? The PIC controller reads the thermistor output and by driving Q1, turns on and off the SV to maintain set temperature.

It also performs a sanity check on the thermistor input. A short or open fault of any component within the thermistor bridge would cause the output voltage to move out of the plausible range.

Similarly, an abrupt change in temperature, inconsistent with the rating of the heater and water mass, would indicate a fault condition. Parallel with the microcontroller, the sensor voltage is fed into comparators A, B, and C of U3, forming the front end of the monitor circuit.

Thermistor R3 with R1 and R4 represent a single point failure. But, because that failure is detectable by both the processor and monitor, a single sensor will satisfy the safety needs. Resistors R4 and R17 isolate a fault in either the processor or monitor to stop it from propagating to the other channel. The probability of such an occurrence has decreased significantly.

Failure to disconnect heater 0. Similarly, voltage comparators B and C form a window for plausibility testing of the temperature sensor. If it goes outside the predetermined limits, Q2 will be turned off regardless of the microcontroller action. As I said, there must be no dormant failure in the system. How do you make sure the comparators work properly and that Q2 can disconnect the SV? While heating, the microcontroller injects short pulses through diode D6 into the comparators.

The voltage levels need to be adjusted accordingly through a resistor Issue January 33 divider network. This injects a fault into the monitor. At the same time, the microcontroller looks at the SV drive current as seen across R6.

It must drop to zero for the duration of the test pulse. The microcontroller does the same, driving Q1 directly to verify it can turn off the SV. Because the mechanical parts of solenoid valves have to ms reaction time, this test pulse has no effect on the heater. If the microcontroller discovers the system response is not as expected, it will shut down the system.

Now that you know the monitor works, how do you know the microcontroller works, too? Comparator D does the job for you. Through D7, capacitor C5 is being continuously recharged every time the fault pulse is injected into the monitor, similar to a watchdog timer. But how do you prove the circuit is working? Every few seconds during the heating cycle, the microcontroller allows C5 to discharge.

At this point, it must detect a drop in SV current across R6. But, what if the microcontroller is stuck high, keeping C5 charged? Then the test pulse into devices A, B, and C will stay high and Q2 will be off.

Close examination of the circuit shows that there still are several potential dormant failures. For example, transzorb D3 protecting the voltage regulator and D5 across the SV driver. To monitor D3, you may include a power-up diagnostic procedure to inject fault into the system. Careful circuit analysis may reveal that the transzorb is insufficient for the overvoltage protection and that a crowbar circuit would be more appropriate.

Either way, you may consider detecting the power supply failure by a different method. Because the analog comparators can handle 30 VCC, they can be designed to detect the power supply as well as the microcontroller failure. The fuse is a different story—there is no nondestructive way to test it. The potential D5 failure can be corrected by using transzorbs D5 and D8, as shown in Figure 5. A short circuit failure of either one will have the same effect as Q1 or Q2 failure and Figure 4—A fail-safe water heater controller requires additional monitoring of circuits.

This is my first attempt. It still does not satisfy the requirements. A double failure is needed for this condition, but dormancy exists. Reset is forced if the voltage is outside limits. Mechanical disconnect of the thermistor is prevented by design. Faults are detected and the system shuts down. An open circuit failure remains inconsequential until the corresponding MOSFET is damaged by a transient, at which time the condition will be detected.

There also could be a far-fetched failure of the microcontroller whereby it is stuck in a loop driving the SV continuously while periodically recharging C5. As you see, even a simple design can quickly snowball into a major project when safety becomes an issue.

In this www.

A timing window comparator is one way and a voltage comparator to track the two gate drive signals is another way of detection. Although there is always room for safety improvement, you confront the law of diminishing returns quickly. In more complex systems, you need to use tools such as testability analysis to achieve necessary fault coverage without going overboard. In simple, commercial systems such as this one, a lot can be accomplished by simply having an audible alarm to sound when system control is lost.

Issue January 35 Figure 5—This is the final design and it satisfies the specification. Failure monitoring added significant complexity to the original design.

They are useful, but have limitations and by themselves do not guarantee product safety. The watchdogs integral within the microcontroller are no more reliable than the micro. Although they may be useful to restart the program if it skips the rail because of a software bug or external transient, if there is a bona fide fault on the substrate, watchdogs are most likely toast.

But, in order to rely on them alone for safety, you would have to prove that the software is structured in such a way that every conceivable fault of the microcontroller as well as any software bug will prevent the watchdog from being toggled and, consequently, will lead to reset. This is next to impossible.

As you now understand, performance monitoring can add complexity to an otherwise simple design. Making sure it fails it always fails in a safe, predictable manner takes the rest of the effort.

Circuit Cellar - Full Year 2017 Collection

Ensuring that BIT covers all faults of com36 Issue January plicated systems requires a testability analysis, which is outside the scope of this article. The circuit would have been easier to implement and with deeper test coverage by using two microcontrollers, each checking the other. The problem is software. Years ago, software was viewed as the proverbial pot of gold that would cut the cost of hardware to next to nothing.

This expectation has not materialized, partly because of the lack of discipline and corner cutting prevalent among commercial software developers. Recently, I watched some unfortunate person being psychoanalyzed on a TV show.

The psychiatrist would say a word and the guy stretched on a couch replied the first thing that came to his mind. Today, developing software and certifying it for a safety-critical application is expensive. Even sloppy, buggy software may satisfy safety requirements if monitored by hardware, albeit at a loss of versatility, which is the selling point for software usage see Figure 3. Where there is a critical application performed and also monitored exclusively by software, level A is the only acceptable alternative.

To write, document, and certify to level A, the code for this hypothetical controller would require several thousand engineering hours. A simple, single line of code mod is not unusual to take several months to document and recertify.

In addition, level A requires separation between design and test, that is, testing must not be performed by the people who designed the software. The simplest would be a like processor, like software design. Identical hardware channels running identical software are used, comparing each other.

This is not a preferred method because you must show that no common mode failure is possible; there is no condition, be it wrong data, external interference, or fault, that can bring both channels down simultaneously. You would waste more time trying to prove this than if you pursued an alternative. A more common method is a like processor, different software design. There are two similar hardware platforms, but the software for each is designed by a different engineer.

Sometimes there are additional differences, such as the control channel performing calculations in 16 bits, and the monitor does it in 8 bits and uses the free time for communications. Often, to satisfy level A separation requirements, team A writes the controller and tests the monitor software and team B writes the monitor and tests the controller. For the most critical applications where paranoia is the rule of the day, the different hardware, different softwww.

It is put voltage to exceed 5 SV1 SV2 Pressure 1 Pressure 2 Pressure 3 assumed that a fault may V and cause continuous exist in the microcode, and heater operation, muloff off 1 0 0 therefore, different proceson off 1 1 0 tiple faults would be on on 1 1 1 sors are used. This may required. It is faced with a multimillionusually sufficiently reliable for shutting off the fuel supply. If you need to include it in the prepared on the basis of system, you may have to use two and perform diagnostics as shown in this table.

Logic AND hanging up during the first gates exist for fault orbit, going through the extra developpropagation, and the probability of such as decrease of the junction temment effort is justified. For triple and more redundant sysof 10— Because the power supply With the failure rate values calcutems, these approaches are equally lated, you can proceed to perform block can contain several dormant applicable.

Fortunately, tions, as long as two out of three agree. Figure 6. But, there remains one other to obtain failure probability per 1 h. The first potential problem, the external valve. Where two failures are needed for the step is to look at the effect of the addiIts connection to the driver can short top event, the inputs are logicially tional components on reliability preto the ground and cause continued ANDed multiplied.

Table 2 shows the updated energization of the valve. Or, the valve I should mention power supply design and includes improvements can be stuck in the open position. For the out- www.

The analysis provides can be addressed by careful wiring or, useful information for business planin a critical application, by using a high ners and design engineers. For example, side driver or a dual high-low side interface. The mechanical failure of the you may discover that a simple design change may eliminate uncommon solenoid valve is solved in many systools otherwise necessary for the techtems by using a high-quality valve nician to carry.

Or you may discover with a filter on the input line to prethat the 5 min. In controller may have to be preceded by critical applications, two valves are a 2-h system disassembly and followed used. But this approach is expensive. Both of the solenoid valves must Again, the most important aspect of have a totem pole driver. To monitor the design is testability. The power-up BIT routine Pdisplays it on the controller cabinet or BIT energizes the valves as shown in transmits the data by a communicathe truth table see Table 4 and reads tions link.

This reduces the MTTR. You also want to a simple controller design from the keep the cost of service calls low.

The system is comprised of to an electronics designer. None of these is field retures in terms of warranty, repairs, pairable, so they are called line maintenance, and cost of ownership. These subjects need separate articles for a full discussion. For now, I want to reiterate that formal testability analysis is not only instrumental for BIT activity, but should be kept in mind while designing, even when there is no BITE present.

This applies equally to hardware and software. This requirement adds complexity to a simple design, but the alternative would be to prove the performance by analysis. Proofs by analysis can be tedious, time-consuming, and quickly reach a dead end if conflicting engineering opinions come into play. I George Novacek has 30 years of experience in circuit design and embedded controllers.

You may reach him at gnovacek nexicom. Tobias and D. ISBN Government Printing Office, June You can create and manage threads in much the same way as in other languages. To create a thread, make a thread object and implement a run method. This is the method that will be called when the thread is started.

Each thread in Java is an instance of the thread or inherited Thread class see Listing 1. Upon startup, the method main is called, just like in the examples from last month. The main thread then creates three new instances of your thread1 class, which extends from the Thread class. This means that it inherits the start method. This method does all of the startup and then calls the run method, which is the method you want to run when your thread is created.

In this example, you simply create three threads that run the same method. There are points to consider. In thread1, there are the count has static scope and number fields. Static things in Java exist before an object has been instantiated. So, the main method and the count field in your class exist before any objects have been created.

A fresh instance of the number is created every time a thread1 object is created, just like you do to start the threads. Also, there are some advantages to using Java in the embedded space e. Java byte code is compact and uses a small amount of memory. Another advantage is that the language is easy and safe. It's X X being taught in most schools now as the primary programming 1 1 language. The lack of traditional pointers 1 1 and garbage collection makes Java safe. In Java, pointers can only 1 0 point to objects that have been allocated by the system.

It's not possible to assign X X values to pointers that are not pointers to Figure 1—In reference counting garbage collection, each object has a objects. Also, Java counter associated with it. When the counter reaches zero, the object is free and can be reclaimed.

They are created and run in parallel to the main thread. After all of the threads have finished running, the program exits. So, when a thread is running in the run method, it sees its instance of the number field, and can then identify itself with a unique number. The thread running in the main method will not be able to access a default number field. Your program always starts with three threads, which print their field numbers and then sleep for ms before terminating.

The main thread simply terminates and the run-time system waits until all of the threads have finished before terminating. To compile and run the program, use the commands stated in Listing 2. Threads can have different priorities, which are read with the getPriority method and modified with the setPriority method. Also, there are ways to wait and notify waiting threads wait and notify.

In fact, each object has a thread wait queue and threads are added to an object's queue using the object's wait method. Because object data can be shared among threads, there is a way to guarantee exclusive access to object data see Listing 3.

Here, you can create three threads and an array object map. The threads have to swap the two elements in the array. However, this is intended to be done atomically. The two elements add to five and each swap has to be completed before the next thread can Listing 2—Sharing data among threads can be a problem. But, because the operations are not atomic, the data will get corrupted.

The main thread prints an error message when the total is not preserved see Listing 4. Also, the main thread only gets a snapshot of the object and can produce varied results. Of course, this is bad multi-threaded programming in any language. And, other thread systems have various ways of providing data locking. Because Java was designed with multi-threading support from the onset, it supports the synchronize primitive.

There are two ways to use this. You can mark methods that belong to an object as synchronized. Then, only one thread is allowed to run a synchronized method.

Another way is to surround the critical section in the code with a synchronize block. Check out the example in Listing 5. This is essentially the same program as in Listing 3, except that the map object is protected with a critical section when the elements are being swapped and checked for consistency. Of course, this program never has a data crash like Listing 3.

The synchronize primitive in the Java language is implemented as a monitor in the JVM. There are two instructions, monitorenter and monitorexit, that take an object reference and expect to lock the object atomically. If a thread tries to gain access to an object by using the monitorenter instruction that has already been locked, it has to wait until the thread that holds the lock executes a monitorexit.

Otherwise, the count is simply incremented and decremented each time the same thread enters and leaves the object. The JVM specification explains the semantics of the requests for locked memory references. Having thread support would seemingly make Java a natural for realtime applications. This is generally true, but most JVM implementations are geared to run on network clients and servers and are expected to implement GUIs or access databases.

Thus, Java run-time implementations tend to be optimized for the GUI- and server-based accelerations, and not deterministic real-time applications. This is evident when you look at how multi-threading is implemented. Listing 3—To protect the data, you can synchronize access to an object using the synchronize block. You can also mark a method belonging to an object or class with the synchronize keyword.

This protects access to an object using a monitor.

Only one thread is allowed to execute at a time. One way is to map Java threads to underlying thread constructs of the OS. All threads are managed in the same way. If this is done in an RTOS, you make some threads real time and assign fixed priorities to them. Java threading can be implemented in the JVM also. A JVM instance then looks like a single process or thread to the OS and other threads and processes in the system, and the threads in the JVM are just simulated.

One nice feature of this approach is that you can keep the JVM in sort of a sandbox and allocate a fixed amount of run-time resources to it. Worse, some Java implementations can also implement a dynamic priority scheme. The priority of a thread will age the longer it runs. This allows threads that deal with interactive events like keyboard input to have higher priorities than background threads that run when there isn't interactive activity happening.

circuit cellar 2015 pdf 1099

So, what are the issues? Some of these schemes i. There are also refinements to the language that need to be considered, like how critical sections are implemented and defining different classes of threads. These are all features available in many RTOSs, and would be required to make Java run in real-time environments.

Let's take a look at what GC is, and then how it's typically implemented and the real-time and embedded systems issues involved. As I mentioned, Java uses a heapbased storage system where the data for objects is stored. Java uses GC to do this automatically. Objects in Java are stored on the heap as blocks of memory and referenced using an object reference. An object reference is much like a pointer, except you can only assign them and de-reference the fields and methods inside an object.

After being allocated, an object is live in memory as long as there is reference to it. If there is no reference, then you can't access it. When an object is not live, it continues to sit on Listing 4—Here you see the program compiling and running. It is expensive to copy the data in 2 1 the object from the old to the new heap. Also, the GC needs to be able to tell the reference pointers from other data words on the stack and in the object's 1 1 field data.

In addition, you need enough memory to contain almost two heap's worth of data during the copying. In systems that support virtual memory, the 1 1 last two issues don't have as large an effect because copying can be accomplished by simply changing the mapping of virtual memory pages, and the data is not physically copied. In this case, the GC will go through the stack and field data, marking each object it finds. When reclaiming Figure 2—Circular references are a problem in reference countmemory, the GC can go through ing memory garbage collectors.

For example, when a list is dethe heap and find the objects that allocated, the head of the list decrements to 1, but each element are not marked as being used. Of in the list is still referred to by its predecessor. Even though the list is freed, the RCM will not detect it and waste the memory. It then copies that it does not need to rewrite object the object to a new heap and adjusts It sounds easy, but there are a references on the stack and field data the reference on the stack to match the couple of drawbacks with RCM.

One because the objects do not move. It also has problem is that it is possible to have This covers the three big to follow any references that are in the loops of objects that reference each algorithms. Usually, software JVMs use field data of any objects it copies to other, but are not referenced by the either the stop-and-copy or mark-andmake sure it moves all of the objects. If program. Consider a circular list of sweep algorithm.

There are some highobjects. After the reference to the list is the GC encounters another reference performance GCs that adapt to an object that has already moved released, only the counter of the object themselves and switch between the from the old to the new heap, it simply that the list reference pointed to is updates the decremented.

However, because this reference to the object is still referenced by the end of New heap Stack Heap Stack after dereference Old heap new location. You can adjacent and too small to be reused, check out this they are lost. This frees the unused objects on the heap and GC sweeps through the program's compacts and de-fragments the heap.

Usually, the GC is a background thread that wakes up when free memory is low and memory needs to be freed for new objects. So, how does the GC figure out what objects on the heap are dead? After all, a dead object is not referenced anymore.

One way is to use reference counting memory RCM. With RCM, a counter associated with each memory block corresponding to an object. Whenever the object referenced is assigned to an object reference, the counter is incremented. Whenever an object reference is lost, the counter is decremented.

When the counter reaches zero, the memory block is not used anymore. All the GC has to do is sweep through the heap and look at the reference counter to see if this memory is free and can be recycled the next time memory needs to be allocated see Figure 1.

Ciarcis's Circuit Cellar Solutions Manual

For real-time systems, this sort of memory management system is a nightmare. For instance, when the GC is running and modifying object references with stop-and-copy, the whole Java system has to stop.

This, of course, adds unpredictable latency to Java programs because you can't predict when this will happen. It is amplified in embedded systems that have less memory than their workstation or server counterparts and are likely to require GC more often.

There are a couple of techniques that can be used to make real-time performance more predictable. You can make your GC incremental.For notification. I then attached the sensor to the Later in the evening, I noticed the circuit board with flexible wire and display was being magnified by the inserted the assembly into the pipe. To get around this cost, many people use a photocopier to make transferable toner resist masks.

Having thread support would seemingly make Java a natural for realtime applications. But, because that failure is detectable by both the processor and monitor, a single sensor will satisfy the safety needs. The processor examines the bitstream from each sensor to determine if there has been a change since the last sample. How is Chegg Study better than a printed Ciarcis's Circuit Cellar student solution manual from the bookstore? Kepro sells the etchant in a powder, which will store longer than when in solution.

DAVID from Buffalo
I do relish exploring ePub and PDF books joyfully. See my other posts. I take pleasure in butterfly stroke.
>