My crank makes a bang when I pedal hard or up hill and don't know what makes the noise
To check the bearings related to the crankset, specifically, the bottom bracket bearings, one can use a few techniques. As part of my regular drive train maintenance, I check the crankset for excess lateral play by holding a crank arm while the bike is held secure and pull and push the arm several times in the sideways, perpendicular to the length of the bike, direction. I take note of any movement or sounds generated by my efforts. If excess play is noted here, it calls for tightening the crankarm fixing bolts in a system that has the spindle incorporated with the bottom bracket bearings ie: square taper or splined cartridge BB's. If the play remains after proper torque of the fixing bolts is achieved, this is an indication that the bottom bracket itself is worn and needs replacing as a cartridge BB is not serviceable. Prior to it's removal is check that the left, adjustable cup is properly torqued and that the movement I'm sensing isn't the wiggle of the entire BB. This movement would be more up and down as opposed to lateral when a left cup is loose. Lateral play in cartridge BB's infers significant internal wear of bearings and spindle within the cartridge body.
For a system featuring external BB bearings like Shimano's Hollowtech2 or SRAM GXP, where the crank spindle is attached to the right crankam, when lateral play is detected by trying to force the crankarm in a lateral direction as above, it may be a situation where the bearing preload is too loose and needs to be adjusted properly. Depending on the system, either a left sided crankarm "fixing bolt" is used to load the bearings (ala' Shimano. I use quotations around the bolt because it doesn't "fix" or secure anything, it's a bearing preloader and the actual fixing is done with pinch bolts on the left crankarm that squeeze the splined spindle an hold it in place). SRAM utilizes wave washers to adjust preload. So at any rate lateral play of these systems may infer incorrect preload as opposed to excess bearing wear and needs to be addressed first. Excess play in these systems where the preload is correct and any shims if present are in proper position is evidence of excess wear in the bottom bracket.
Another technique to assess the BB bearings is to spin the crank with chain and it's associated noise and vibration is removed from the equation. One can simply derail the chain and get it onto the BB shell of the bike. This will allow you to turn the crankarm's while you look, listen and feel for abnormalities like grinding, excess resistance--especially when it's irregular, happens in one spot of the rotation and not the others--or the knocking or similar sound or feel associated with crank arm rotation. If you place your hand on the seat tube or down tube as close to the BB as possible without interfering with the crank rotation, one can feel the grinding or vibrations emanating from the contaminated and compromised bearings of a worn bottom bracket. Normal findings will be silent, vibration and grinding -free, smooth rotation if the crank. The chain ring(s) should track true without lateral run out. You may be surprised, as I first was, that the spin of the crank isn't as free as, say, a wheel. Packing with grease and preload on the bearings contribute to the lack of a comparable amount of free spin in a crankset. Obviously this doesn't apply when there is irregular or excessive resistance to rotation, but I wanted to make note that you won't spin a chain free crankset and watch it go round and round for dozens of rotations before it pendulums to a stop.
With external bottom brackets, it's relatively easy to remove the crankset with it's attached spindle and stick a couple of fingers in the bottom bracket and turn the bearing housing back and forth. Detecting grittiness or rough rotation infers contaminated or worn bearings requiring service or replacement of the bottom bracket as most are not made to service, only replace.
While Jeff has already answered very detailed about the bottom bracket, I'd like to add that often the pedal bearings break long before the BB and can cause the noises you describe. Cheap pedals have cheap bearings and they also tend to get more abuse (dirt, water, hits...) and bad forces applied to them. So if you can try another set of pedals or at least also check their bearings.
You need to do more diagnosis before throwing money at new parts.
Try isolating the cause, like:
- does it bang on both sides of the bike?
- Is the bang at the same relative crank angle? (implies a potential looseness that is being taken up as the power part of the stroke begins)
- Is it periodic with just-over 2 complete crank revolutions (ie, at the same point in the chain)
- Does the bang continue if you coast (ie the cause is further back in the transmission, often in the wheel or freehub)
Check the BB in the frame by standing over the rear wheel, put a hand on the base of each crank, and feel for play. Do this with the chain unshipped, and either resting on the BB housing or competely off. The cranks rotate of course, but can you feel up/down or fore/aft play? Can you feel "crunchiness" during rotation.
You need to eliminate pedals from the possible causes too. Make sure they're not wobbly in the crank's eye, and the pedal body is free'spinning on the axle, but without significant play. Ideally just fit another pair from your spares pile for a short test.
Check chainring mountings too - its possible for the chainring to slide around subtly, or for the entire spider to develop play.
Another exploratory trick is while standing beside the bike, to apply both brakes hard and lock the wheels, then press on the forward-most pedal with a foot. The BB may subtly flex away from that side of the bike, and you can explore more - look for things that are wrong.
If you have a friend who can lend an eyeball and look closely at the rear of your bike while you ride, that can lead to ideas. Excellent way to spot derailleurs bouncing on sticky chain links. You can try fiddling with a gopro camera too, but these never work for problem diagnosis for me.
Lastly, you say the bang noise appears when you are pushing hard. So try pedalling in smooth circles and see if that changes the problem description.
Essentially you're in the exploration/diagnosis phase, and jumping straight to the spending/shopping step may be premature. Or you can replace the bearings and be disheartened by the problem not changing at all, where you throw more problem at the money, and its always the last thing you change which resolves the issue.