Thursday, August 28, 2025

CV Generator Part II--"Seems Working"

Readers: If you'd like to build the CV Generator featured in this post, please go to PCBWAY's Community pages--gerber file; KiCAD 9 project/pcb/schematic/library files, B.O.M.'s, and more, are here.  

You can also help out this blog immensely by checking out PCBWAY using the link here. Thanks!

==============

Just got back from a long and much needed vacation with the psychiatrist wife--back home and back to it. 

This time I improved the ATTINY 1624 based CV generator from this previous post--good news: hey, it works.


Synch issues with my camera made the OLED appear to drop lines of text but in real life the super cheap OLED display looks good.


Reviewing its features: 

  • Three -10 to +10 DC CV outputs, independently controlled from potentiometers (not rotary encoders). I like the way pots feel for this application; in general I dislike membrane switches and rotary encoders.
  • A 5V momentary switch for creating triggers with a dedicated output and LED.
  • Practical use of the ATTINY1624's super affordable high resolution mux'd AD conversion (details here towards the bottom of the post)--to see if I could get >12 bit oversampling using the analogReadEnh function in sketch (it works!)....This is killer feature that's surprisingly under-documented.
  • Eurorack footprint--this is going to go into my bench rack.
  • Test Points. TP1 can be used to test the MCU via a blink subroutine, or maybe some future expansion. TP2 should be adjusted to 2VDC using the 20K trimmer for bias offset for the final buffer stages.
  • A TX/GND serial port. For future expansion? Who knows. But I figured why not.
  • A port for UPDI programming. See previous post here (halfway down the post) and IMSAI guy video here.  
For firmware I used Arduino Sketch and IDE and the Greiman SSD1306ASCii library (here).  Firmware creation for the generator was pretty easy. By bringing analog data from the pots in at 16 bits, I could ditch a bunch of LSB's and get reasonable readings on the OLED that didn't jump around a lot. 

Some simple math converted the right shifted 16-bit value into a x = -10 to10 value for the OLED:

float scaleToPlusMinus10(unsigned int x2){
  x2 = x2 >> 8;
  return -10 + (float)x2 * 20.0 / 256  ;
}

The module consisted of 2 PCB's provided by this blog's patient and helpful sponsor PCBWAY: a main board with hardware on the front and the SMD components (1206 and SOIC--not too tiny) on the back, and an 8HP Eurorack front panel.  

I did a lot of the heavy lifting for the design during the initial build (post here). So this "rev 2" is a prettier version with a few improvements.

And--thankfully my measurements this time around were correct; everything fit.


USELESS BUILD PHOTOS


Always happy to get new PCB's from my sponsor, PCBWAY.  Even with the tariffs these guys are still way cheaper and faster than anything I can find in North America. Go A's!

I used an SMD stencil, solder paste, and a hotplate. This has become my go-to assembly process for most of what I do these days--it's fast....with some practice SMD hand assembly has become easier for fab, mods and troubleshooting vs. through-hole.  



I gloofed on a bit too much paste but fortunately it's a pretty forgiving process.


For the hotplate, I heated it up to 210C and it sat there for a couple of minutes, then cooled it to 150C.  This was all done manually from the plate's front panel. There appears to be way to automate this--there is some sort of temperature curve firmware in the hotplate--but I can't find any instructions for this in English. Sorry.

The hot plate process is surprisingly forgiving but I ended up with a few solder blobs on the SOIC IC's. Fortunately these can be quickly fixed with solder wick. 


Firmware test....

For the OLED I de-soldered its edge pins and used longer pins instead. This allowed the display to stand off from the PCB an appropriate distance. After putting items into place I tacked soldered the edge connector pins, removed the front panel PCB, and finished soldering.



As far as accuracy--the completed module is pretty good but not perfect. For what I do--cranking CV into whatever module I am messing around with on the bench it is definitely good enough. For better accuracy I'd probably need to use a rotary encoder and a 16-bit DAC. Maybe a future project?


Overall, fun times; I might build a few more of these. 

Until next time, don't breathe the fumes.


CV Generator Part II--"Seems Working"

Readers: If you'd like to build the CV Generator featured in this post, please go to  PCBWAY's Community pages --gerber file; KiCAD ...