This question already has an answer here:
I'm trying to create a circuit that uses 3.3 and 5v.
I'm thinking about use a 9v battery, a 7805 to get 5v and a LM3940 connected to the 7805 to get 3.3v. But I can use the LD1117 connected direct to battery to get 3.3v. Some sites says that if I do this (9v to 3.3v) the LD1117 can get too hot.
Some sensors that I'm using I can connect directly to the battery.
What is best in terms of consumption?