Date: 201308
Local time of day: 0001-0600
Location: ZZZ.ARTCC, US
Flight conditions: VMC
Light: Daylight
Aircraft: EMB ERJ 145 ER/LR
Operator: Air Carrier
Operating under: Part 121
Flight plan: IFR
Mission: Passenger
Flight phase: Climb
Airspace: Class A ZZZ
ATC / advisory: Center ZZZ
Reporter organization: Air Carrier
Reporter function: Pilot Flying; First Officer
Reporter qualification: Flight Crew Air Transport Pilot (ATP)
Human factors: Workload; Training / Qualification; Physiological - Other; Communication Breakdown; Confusion; Distraction
Second reporter function: Pilot Not Flying; Captain
Anomaly: Aircraft Equipment Problem Critical; Deviation / Discrepancy - Procedural Maintenance; Flight Deck / Cabin / Aircraft Event Smoke / Fire / Fumes / Odor
Detector: Person Flight Crew
When detected: In-flight
Result: Flight Crew Landed in Emergency Condition; Flight Crew FLC complied w / Automation / Advisory; Flight Crew Diverted; General Declared Emergency
Contributing factors: Aircraft; Procedure
Primary problem: Aircraft

Narrative: Flight was scheduled for flight in late afternoon; but due to late inbound flight it left a few minutes late. My crew and I had brought this plane in and had no issues with the aircraft. It was parked at gate X and boarded for the next flight. I did the walk around and found nothing wrong with the aircraft. The aircraft was on APU power as the external air was not hooked up to provide cooling. The GPU was also hooked up; but not selected on. Just after main cabin door closure we heard a loud bang in the front of the aircraft (around the battery compartment) and the screens went into an alternate mode (some black; some red x; EICAS had a ton of messages). It wasn't electrical emergency or SG1 out mode; it was a random configuration of abnormal screen indications; and was reminiscent of what happens when the GPU is selected in and externally pulled; though it was not selected in; nor was it pulled. My Captain shut the aircraft completely down; including the batteries and APU and the aircraft went into electrical emergency mode and stayed there. It was not until the bus ties were closed that everything went blank. We then called Maintenance out to the plane to trouble shoot. The Mechanic came out and spent about 15 minutes on the plane; resetting everything and then said it is fine; Ops check good. I told him that there was a loud bang from the fore avionics/battery compartment area and he went down to look at that and said it all checks good. From there we briefed the departure to include a possible return to field if anything abnormal occurred and we departed. About 15 minutes into the flight; we were given a climb to FL230 and passing thorough about FL190 we heard the loud bang again from the front of the aircraft and then began smelling electrical smoke. Both the Captain and I immediately donned our O2 masks and declared an emergency with Center and asked for a descent to the closest airport due to smoke in cockpit and possible fire. We were told the closest and we began an emergency descent to the field. The Captain took the aircraft and the radios; while I set us up for the approach; ran the EPC; the QRH and normal checklists. We briefed the Flight Attendant of the situation and told him that we were landing and to prepare the cabin; though there was no need to brace and we would let him know further if we need to evacuate. We landed and had fire trucks meet us at the aircraft to determine if there was indeed a fire; which they did a heat test and stated there was no sign of. Upon landing the Captain told the people that we made a precautionary landing and we did not expect a need for evacuation; but that we would tell them if that changed and if that was the case; it would be out the main and service doors. Once we were sure there was no threat of fire we had customer service agents meet us at the aircraft with stairs and I made an announcement to the passengers that we had made a precautionary landing due to smoke and that there was no threat of fire at this point so we would deplane them at this time and bring them into the terminal for further information. Threats included the precursor situation at the gate; though it Ops checked good; it was a very unusual situation. The O2 masks had poor audio and it was difficult for us to hear one another as well as for ATC to understand our transmissions. In addition; the divert airport is no longer in our approach plates (it's in the brick); so it took longer than I would have liked to have set up the approach. Everything happened so quickly; though you do go back to your training. I think it is very important for the company to continue practicing abnormal situations like this in recurrent simulator events to get your mind thinking outside the box should something like this occur again in real life. In hindsight; I probably would not take an aircraft displaying this sort of abnormal situation again at the gate and instead request another aircraft.


Second narrative: Sometime before reaching 10;000 FT the Captain asked the First Officer to change roles from pilot flying to pilot not flying. The reason for the change is that the Captain felt that under the circumstances the pressure on both crew members to perform up to this point was very high and that changing roles would benefit any areas that may have been overlooked or forgotten. All checklists were completed and landing on the runway was accomplished. After landing Captain taxied the aircraft onto the ramp started the APU and shut down the engines. The Fire Department then secured the aircraft and made checks for any hot spots or areas that may have been damaged. None were found. After deplaning the passengers from the aircraft the First Officer made visual inspections of all panels and skin to see if any damage had occurred. None was found. After about 10 minutes of run time on the APU the aircraft again went into essential power and started to duplicate the same sequence of events that we experienced at the departure airport. Threats: Discovering just what the problem really was. Smoke inside the cockpit; loud bang like and explosion somewhere inside the aircraft; shaking of the entire aircraft when we heard the sound. Is the situation greater than the capacity of the crew to handle the emergency? Approach plates [were] not in our Commercial Charts subscription; having to locate information.Errors: Having difficulty in programming the FMS for the approach to the airport loose-leaf approach plates in the brick. Our 'hands' were full trying to organize the cockpit; get information in a timely manor to troubleshoot; communicate; and fly the aircraft.We were suspicious of the 'reset' done by Maintenance. Its not that I didn't trust what they did but with our experience flying these airplanes the sound of the relays kicking in was defiantly louder than normal. After we started the engines and proceeded to takeoff I briefed the First Officer that we may have an emergency because the problem may not have fixed. So we were on notice that we may encounter something down the road.


Synopsis: A low bang emanated from an EMB-145 nose area electrical compartment with the loss of electrical power as the aircraft prepared for departure. The aircraft was shut down; Maintenance reset systems and the flight departed; but the crew declared an emergency and diverted after the same event occurred during climbout.