just wanderings ? regarding a new theremin!

Posted: 8/27/2014 6:34:17 PM
FredM

From: Eastleigh, Hampshire, U.K. ................................... Fred Mundell. ................................... Electronics Engineer. (Primarily Analogue) .. CV Synths 1974-1980 .. Theremin developer 2007 to present .. soon to be Developing / Trading as WaveCrafter.com . ...................................

Joined: 12/7/2007

Hey Dani -

Im sitting here with the new PSoC 42xx board  (Many thanks to Dewster for bringing this board to my attention - I havent been reading Cypress ypdate emails! ;-) and buzzing - Ok, even with years of development experience on PSoC (I am a certified Cypros - consultant on PSoC 1) this new (42xx) IC will take some study and mastering - but its so configurable and fast! - have played with it before, but missed its potential because it had loads of other crap on the development board - having it just as a chip one can play with allows experimentation, and removes the fear of destroying a £28 board (this one costs £3 and can be treated like an IC rather than a DK) (I spent more time on the PSoC 5 on that board messing with digital filters - a waste of time as I didn't know what I was doing ;-)

I have seen one 'theremin' project already using this part - but its a toy.. They are using the on-chip CapSense .. I am playing with constructing LC oscillators and configuring the IC to drive these, implementing PLL's in the chip, and 'turning' it into a dedicated theremin IC..

Already I can get CV output for 'pitch' and 'volume' antennas (these antennas have a healthy 60V P-P swing on them) - haven't used the Arm Cortex MCU yet, just some PLD blocks (to implement phase comparators and inverters) and PWM blocks, and have off-chip LC oscillators (much of the active stuff for these oscillators being implemented in the PSoC) to the antennas with these oscillators having voltage control nodes and being locked to internal references, so running in closed loop at fixed frequency..

Oh - theres a LONG way to go - its just been proof of concept, no linearity correction yet (my plan/hope is to use the PLL error signal and shape this with analogue, to allow the linearity to be shaped), and I have no idea about stability or phase noise or owt like that - it may come to nothing.. I really just wanted to see if I could implement the oscillators using the on-chip stuff... One lovely thing this part allows is one can gang pins together to increase drive current - so I can have a single pin with low capacitance as an input for the oscillator, and drive a hefty current into the inductor, and break this loop with another active I/O to allow inserting of the VC components! - The PLL gives a phase error signal used to lock the oscillators, but which can be taken and shaped in analogue, or accumulated and processed by the Arm - everything needed is there I think!

And the same stuff with a little modification makes a "normal" theremin, or a voltage controlled theremin.. I loved the PSoC 1, but this chip with its fast MCU and PLD's is a giant step forward.. Just wish they had better DAC's! (and I wish it had the switched capacitor block - the analogue on this chip is a little sparse).. But thats ok - a few analogue IC's, transistors and passives off-chip is no big deal - All the difficult-to-lay-out complex logic stuff for register switching and wave-shaping etc can easily go in the PSoC4 - dont even need external 4046 PLLs to get the type2 phase comparators, as I can implement these (and better) in the PSoC PLD's.

Fred.

I should just say that I am not using the board in its 'intended' way - I am not using the USB or bootloader - I have a separate PSoC programmer / debugger (an extra $70 if you dont have one), and am going direct to the PSoC 4 - I therefore cannot comment on how it behaves under bootloader... Personally I hate working via DK bootloaders, they just clutter available memory and one is dependent on them being right - I much prefer to be in complete control ;-)

Posted: 8/27/2014 10:10:10 PM
xtheremin8

From: züriCH

Joined: 3/15/2014

rofllmao..when i went to the cypress site to watch some learning videos, the same strange feeling showed up, like back then, when my mama showed me how to tie shoelaces for the first time.

this is also still all so new for me and such a abstract world see my struggle here: struggelino (i hope i finish the case soonly. it looks so twisted so far! but glue needs time...)

and that's "just atmegaXXX". i understand what it is for, the analog circuits will be somehow connected to that, wow is this small!!  also all knobs and switches. even maybe a lcd or a touchscreen.via usb to the computer. but that was it with my knowledge so far. :-(  

so i probably would be just a real pain in the kazoo to you right now. frankly, i don't understand many words or terms. pure lack of knowledge. in any programming language. i ordered recently a ginsing shield for arduino, maybe to get more confused but  the phonetics attracted me. it comes with a tiny simple surface for the computer wich allows me silly one to see and hear. fumble and humble. but i didn't go deeper yet. and my struggelino is still on ones own hook. (chapter one "blink"..) no a bit further already.

thierry always compares theremins with cars,and the etherwave is his beetle and  since i sold my real volvo 240 classic, sbniff, i think it's time to have a fucking TESLA. 

 

 

 

Posted: 8/27/2014 11:34:16 PM
FredM

From: Eastleigh, Hampshire, U.K. ................................... Fred Mundell. ................................... Electronics Engineer. (Primarily Analogue) .. CV Synths 1974-1980 .. Theremin developer 2007 to present .. soon to be Developing / Trading as WaveCrafter.com . ...................................

Joined: 12/7/2007

Hey Dani,

Dont be frightened by the PSoC concept!

What it is, at bottom line, is a system-on-chip .. Rather than having a board containing logic IC's and analogue and microcontroller etc, it puts a load of these things into one chip and gives you the tools to connect them together and to the chips pins..

So you start by dealing with the hardware you want to implement.. Lets be silly and say you need a XOR gate to mix two high frequencies, and you want to get a difference frequency from these - So you put an XOR in the chip (using the schematic editor) and assign 3 pins on the IC to bring the connections out (two inputs one output - every pin can be assigned as digital in or out) .. So you connect your two oscillators to the input pins, and take the output pin to an RC filter... You got a mixer (and a simple pitch only theremin toy if one oscillator has an antenna)..

But we have some analogue in the IC - we can make a better filter and buffer by using these (two opamps) or we can use an opamp for a active filter, take its output to another set of filter components, and feed the output from this back to a comparator configured as zero crossing detector..

Now we can take the output from this comparator internally to strobe a timer (there are a number of dedicated timer / counter / PWMs in the chip so we dont need to construct one using internal logic) .. This timer can generate interrupts or whatever, and the captured counts can be read by the processor in the chip.. No need for any external wiring or hardware.. The processor can do what it wants with this data (the software side).

So, if you want to implement a simple digital theremin, you can easily do so... If you want to ignore the processor and just use the logic and analogue, you can do so - If you just want to use the processor, you can do so -  The thing is that the chip is so cheap you really dont need to fret about underusing it.. Ok, on the board it clocks in at about £3.. But buying the ICs they would clock in at about 60p in quantity - at that kind of price there's no point in buying logic IC's - Even at £3, the cost of PCB area makes it more economic to use the PSoC - And it can mop up a lot of analogue and digital, even if you ignore the ADC and MCU.

But to me, the final clincher (and always has been with PSoC) is that unlike a hard design, you can change the 'hardware' without needing to change the board! - Made a cuck-up on the logic .. oh shit, I needed an OR there not an XOR and ive got to bodge it now with a couple of diodes and a resistor, cause ive no space to put another CMOS IC... Those problems are gone!

The PSoC 4 is quite limited in terms of PLD capacity and analogue resources - I was really sad to see that I couldnt get an analogue multiplier in it - need a PSoC 3 or 5 for that (I had planned to use the analogue multiplier for linearity correction, and its absence was a real blow) so I am looking at whether I can implement some sort of OTA using an Idac and external transistors (but as soon as you do things like that on the pitch correction side, thermal issues raise their ugly head.. The PSoC Chip has a temperature sensor, and I was planning to use that to correct analogue multiplier errors).. I am also finding it quite difficult to squeeze everything I want/need into one chip (I am a bit ambitious - hoping to get an analogue theremin with adjustable linearity and span for pitch and volume on one chip - Ive given up on register switching for now - fairly sure I will need 2 chips for that)

But right now I am just testing the water - I have not got any idea regarding stability or noise or any of the real important stuff which could smash the whole idea.. To me, its really only worth going this direction if I can get substantial simplification of my designs without losing quality.. If I can pack enough in, and it looks promising, then (and only then) will it be worth doing the hard stuff and honing the design/s.

Whatever - its real fun to play with!

Fred.

" all so new for me and such a abstract world see my struggle here: struggelino " - Dani

Yeah.. I think I would be struggling with that project (or any truly digital project)..  I haven't touched the processor in the PSoC (yet) - in fact, replace the processor with more analogue and a few more PLD's and keep the price the same, and I would have the ideal component for almost everything I ever design!

Posted: 8/28/2014 2:11:21 AM
xtheremin8

From: züriCH

Joined: 3/15/2014

just changed the modular picture in my album a bit and took that "for the greater good" nonsense out. instead of that, i clarified the technical idea behind it a bit more. i thought it might be possible to use that psoc  for solving the old pitch antenna linearity problem or even could improve it, like on my sketch maybe. with such a incredible device. incredible? for me? absolutely.

theremins important guts went from, cruedly speaking: tubes to transistors, many transistors into one chip and now many chips into even a smaller chip?????  no wonder that the "sound" has gone, says my silly instinct. 

these old, out of reach, theremins where like one organism something! if i imagine like: how electrons etc. flow through the switch into the first transformer coil waking up the boys in the second coil, rushing through diodes, uups one way, got hindered by resistors and have a short rest in a capacitor,(anybody for a kit-kat?), sometimes right into a tube, heated up, flashed through a mesh, vibrating and oscillating, got heterodyned or heterodenied, waveshaped, mixed by some others, same but different ones...i could go on for hours like this.  it's like a bloody roller coaster. so I would  have fun, finally to cut a fine  good wave. but that's past and now it's like rushhour in japan for these li'l elektrik emanations of power .not so funny really. i'm so pasteurized...

my visions, and yes i'll see my doc tomorrow.

fred: Whatever - its real fun to play with!  and thats important. 



Posted: 8/28/2014 2:43:55 AM
FredM

From: Eastleigh, Hampshire, U.K. ................................... Fred Mundell. ................................... Electronics Engineer. (Primarily Analogue) .. CV Synths 1974-1980 .. Theremin developer 2007 to present .. soon to be Developing / Trading as WaveCrafter.com . ...................................

Joined: 12/7/2007

"theremins important guts went from, cruedly speaking: tubes to transistors, many transistors into one chip and now many chips into even a smaller chip?????  no wonder that the "sound" has gone, says my silly instinct. " - Dani

I dont think the compaction makes a lot (if any) difference to the sound - The only likely influence IMO is physical factors such as charge 'round hot cathodes in tubes, transformer 'imperfections' and capacitor imperfections and imperfections in early transistors - its imperfections and 'accidental' anomalies in components which give a lot of the character to vintage instruments I think -

Once we got 'good' components, and particularly when we got to IC's, I think we moved into the zone where further compaction makes little difference.. I am still using off-chip analogue - would coils, transistors etc.. Let the teeny near quantum scale bits do their job.. as long IMO as the audio processing is "old school" I am not too worried.

If I was doing the audio in the Arm processor, I would be worried! - But this is because I am a mathematical and DSP idiot! ... I have absolutely no doubt that its possible to replicate the "analogue sound" with clever digital processing - or at least it will be - one day. Has that day arrived? Well, I haven't heard anything that convinces me that it has - but it is getting damn close! (I am not talking about digital theremins here - I am talking about synths and reverbs and the like.. Havent yet heard a convincing digital theremin - But I expect that if I do, it will come from a TW member ;-)

Fred.

You must be logged in to post a reply. Please log in or register for a new account.