You do not have to have formed a solid opinion about whether your contributions merit coauthorship in order to ask the question of your advisor. In fact I think that every young person doing work which is being used in any way in a published academic paper would do well to ask this question. If you like, you can frame it not as your trying to suss out whether you have been unfairly denied coauthorship but that you are looking to learn more about the research process itself and inquiring into what sort of research contributions merit coauthorship. (Even if you are seeking to do such a sussing out, framing it as a teachable moment is probably a better way to get a helpful, unguarded response.)
In my experience, things go smoothly if the issue of coauthorship is raised earlier in the collaborative process rather than later. It is hard for me to think of a situation in which it is "too soon" to ask this question, although if you ask it early enough the answer may not be definitive. It is not good to be working on something and wondering whether one will wind up as a coauthor or not. That's needlessly stressful.
Also in my experience, undergraduates often have unrealistic expectations about what sort of work merits publication and/or coauthorship. It seems, especially on this site, that a lot of undergraduates are hoping that their undergraduate research can be published. In some cases it can, and how feasible this is must be highly field-dependent, but here is an inherent feature of undergraduate research: it is research done by someone who has much less subject-area knowledge and insight than she will herself have later on, assuming she continues in the discipline.
(If you don't continue in the discipline then you should ask yourself seriously why you want to be published in it. Getting anything published anywhere sounds neat to any suitably bookish young person -- and it sounds neat to me too, and I am a published author -- but the reality of it is that academic publication takes a lot of time and work over and beyond the work that was done to write the paper. If you are a 20-year old who has written an electrical engineering paper and then decided to go on to some other career, please think seriously about just putting that paper on your webpage and spending the time that it would take to get your paper published learning to play the guitar, or watching Lars von Trier films, or finding a cute boyfriend/girlfriend, or...almost anything else, really. If you don't continue on in the discipline, then having a published academic paper is worth essentially nothing beyond the neat feeling you get by being published. It does not convey the real life advantages that, say, being able to talk knowledgeably about Dogme95 would.)
Note well: I am not saying that undergraduates cannot do good research. They can: in rare but extant circumstances, undergraduates have done research which is better than what most other people in the field can do. What I am saying is that almost every undergraduate who does research will do significantly better research a little later on, to the extent that I cannot think of a situation in which someone's undergraduate research became a big part of their professional profile.
Added: I did not mean to create the impression that I feel that in this particular case the OP's contributions do not merit coauthorship. I can't know without knowing the details of the situation, and I wouldn't be a good judge anyway because I work in a field -- mathematics -- where the standards for what constitutes coauthorship are very different from in EE. Let me reiterate the points that I did make:
(i) The advisor is much better equipped to understand whether the student's work merits coauthorship than the student. So statistically speaking, if a student is unsure about this, asks the advisor, and the advisor says the student has not done enough for coauthorship, the advisor is probably right. Of course this unequal expertise and authority sets things up perfectly for a predatory advisor to exploit his undergraduate workers. My answer is mostly directed towards the higher probability event that the advisor is acting honorably. The main thing I advised the OP to do was to talk to his advisor about the standards for coauthorship. I feel very strongly that this is the correct first step (and should have been taken before, in fact, since the OP has some anxiety about the situation). If what the OP hears in this conversation is very unsatisfactory to him, then we can further discuss the situation. I don't want to assume that will happen.
(ii) The line between getting acknowledged and getting coauthorship is certainly a gray area, even among adult academics. For example, in the last few months alone I was invited to be a coauthor on two different papers. I had to think about each one. In the end, I turned down one request -- which came from two graduate students in my own department, including one of my own advisees -- and accepted the other after doing more work so that I felt like my coauthorship was justified. Both of these could have gone either way. When I think about whether to include myself or someone else as a coauthor, first I weight intellectual contributions (in a way which may not generalize so well outside of mathematics, which is something I have recently learned by discussion with other members of the site) and second I think in terms of the professional implications of putting on or leaving off a certain person's name. The paper that I left my name off of was the third paper coming out of a graduate research seminar organized and led by me [I was a coauthor on the first two], and the results obtained were ones that I specifically asked for. Nevertheless the work done on this paper was by the students and not by me* -- my own direct contribution to this work was positive but indubitably of a smaller order than theirs -- and the advantage to each of these students of having a paper which does not have a faculty coauthor is considerable. For me, having one more publication of a similar sort as the other two is not a big advantage to me. In fact, by not putting my name on the paper I am in fact claiming a sort of academic seniority: I'm showing that I've reached a certain point in my career where I can successfully inspire and direct projects that I am not directly involved with. So my answers come from the perspective of a faculty advisor who thinks carefully about which names to put on or leave off a paper...including his own. This behavior does not make me an unusually virtuous member of my academic community: it seems like business as usual. So I would like to extend the benefit of the doubt to the OP's academic advisor and assume that he is acting honorably until specific information comes up to the contrary.
*: In fact this third work involved computations that were so substantial that although I am, I suppose, capable of having done them, in practice I would not have been willing to devote the time and enthusiasm that my students did, and it would certainly have taken me longer to write a much kludgier version of the code than what my student came up with fairly quickly.