PSoC 5LP - Signal Generator

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

I am making a signal generator for a school summative project, due in January, but I need it done by the 21st of December as I will be away with family on vacation for 3 weeks.

   

My plan for this is to have a menu system on a 16x4 HD44780 display, and digital control of external wave-dacs to generate either a sine wave, triangle wave, sawtooth wave, ramp wave, or possibly a custom waveform from an external storage device. There will also be a separate terminal for the square wave that has variables tied to the other waves, but also will have a duty cycle, and pulse setting.

   

In the menu you will be able to change the frequency, amplitude, voltage offset, duty cycle, table steps, pulse, and be able to reset the settings to default. It will save values on power down. Also in the menu, you can change how much you change values by, in powers of 10: 1, 10, 100, 1K, 10K, 100K, and 1M. There will also be a power on/off switch, and it will likely be a soft power-on button of sorts.

   

On screen, it will always display the current settings position at the bottom of the display, and will always display frequency as F###, amplitude as A###, offset as V+-#.#, and table step as TS###. Frequency and amplitude will have either nothing, a K, or an M depending on if it is 1000 or above, or 1000000 or above.

   

The table will have maximum either 256 or 512 steps to still attain a high enough frequency, and I will likely be using a 10mhz wave-dac, as the internal wave-dacs can only reach 1Mhz and no more.

   

If you have any suggestions, feel free to say. I will try to keep this thread updated as much as I can, whenever I do something on this project.

   

 

   

Dec 12 EDIT:

   

So the project took some turns away from the original project guidelines I set, but it is ready for operation through two 0.5V from rail opamps (quite a pretty penny for them).

   

It has it's own case from an old machine that fits it perfectly, and it's powered by a $300 +5V, +24V, +-12V power supply that was lying around for a few years. The unit will have about 8 or 9 BNC jacks on the from panel and can adjust the amplitude of the wave terminals along with the frequency, wave type, and voltage offset. It can also switch the output mode of it's power supply from constant voltage to constant current with a variable feedback resistor on the regulators.

   

It seems to have gotten very complex, but my dad is an excellent teacher who knows all there is to know for a near expert about electrical components. He built the power supply circuitry without me, but explained it in detail, and did it alone to make it up to CSA standards. The first thing to go is a 2 amp primary input fuse in an inline screw package in the back of the case if anything were to go wrong. It has two low speed fans and a filter, and the PSoC is isolated from the PSU. It also has electrical isolation between the power supply outputs.

   

All around it looks nice, and will likely be a good instrument in the lab, and will likely fetch a nice score for my final project.

   

Off topic a bit, the unit has character with a brushed aluminium finish, and stained copper coated aluminium interior, visible through the fans. The front will be a raw wood panel, and will likely be finished over and polished to look nice. I will post a picture when it is complete.

   

 

   

Dec 19 EDIT:

   

Here is the link to the project page on hackster.io https://www.hackster.io/sam-chamberlain/psoc-5lp-function-generator-school-project-f05047

0 Likes
9 Replies
odissey1
Level 9
Level 9
First comment on KBA 1000 replies posted 750 replies posted
0 Likes
Anonymous
Not applicable

I would like to do that, but I need to balance the work on it with two other classes that have finals as well. One is a computer game, the other is a house design with wiring specs 😕

   

Thanks for the help though odissey, I will take a look at these ASAP 🙂

0 Likes
odissey1
Level 9
Level 9
First comment on KBA 1000 replies posted 750 replies posted
        Limitation is not DAC update rate, but rather DMA transfer rate. With 256 points/waveform max attainable wave frequency is about 17kHz. Also, VDAC8 gets distorted at update frequencies >400kHz. I had better experience with self-made R2R DAC. I believe that since it is a 'school project', it should look impressive and be inexpensive, while the specs are not important. You should plan ahead and manage your time to be able finish it by the due date. Get realistic and triage your specs.   
0 Likes
Anonymous
Not applicable

Thanks for the advice 🙂 I feel as if you did this before 😉

0 Likes

you feeling is right, we all did it. From my experience you only have time to slap it together in a  'quicky' way, nothing else. Basically: 4 line LCD (frequency, amplitude, phase, wave type), 1 rotary encoder to change settings, and re-use any project of your choice for output generation.

0 Likes
Anonymous
Not applicable

Thanks for the help. You likely saved me a whole week 😄

   

I do pretty well in code when I'm happy about it, but the hardware and ideas bog me down 😕

0 Likes
odissey1
Level 9
Level 9
First comment on KBA 1000 replies posted 750 replies posted
        Thank you for update, please post the pictures when completed. A good place to share your project is hackster.io and YouTube. Consider those options. P.S. it took me some effort to find your last post, as it was appended to the very first post above.   
0 Likes
Anonymous
Not applicable

Yeah, sorry about that. I wanted to have the updates right there for anyone that might stumble across it 😕

   

Thanks for the help too, again. I'll check out hackster.io as soon as I can.

0 Likes
Anonymous
Not applicable

I made a project page on hackster.io. Here's the link: https://www.hackster.io/sam-chamberlain/psoc-5lp-function-generator-school-project-f05047?ref=user&r...

   

I think I'll mention my absence for the next three weeks there too. I also found out I have until January 26th to finish this and my other school projects, rather than tomorrow. I should be back in Canada (eh?) by the 14th.

0 Likes