Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
HATE TROLL TIM
Dec 14, 2006
Well, that Kickstarter is cheaper than the Papilio. Though having a soft AVR is pretty cool.

Adbot
ADBOT LOVES YOU

Slanderer
May 6, 2007

HATE TROLL TIM posted:

Well, that Kickstarter is cheaper than the Papilio. Though having a soft AVR is pretty cool.

Eh, only sorta. It's useful if you have enough leftover hardware (and the ability to have a sufficiently high clock for the micro) to actually do useful FPGA stuff as well. Also useful if you're trying to learn about processor architecture and stuff.

As far as I know, it's practical utility is often hugely limited by the fact that it's much cheaper to just put a physical microcontroller next to your FPGA and running all of the necessary I/O to it.

JawnV6
Jul 4, 2004

So hot ...
It has 8 LEDs and a Reset button in terms of I/O. To do anything remotely interesting you need extra kit, even Arduino has a serial console out.

Also

The Tutorial posted:

Always blocks can kinda be thought of as functions that run under certain conditions
Yup, see, it's just another programming language :suicide:

movax
Aug 30, 2008

JawnV6 posted:

I don't understand what problem that's solving. Digilent already sells starter FPGA boards in a similar price range, the cheapest Spartan 6 being $120 student price Nexys3. It's still using ISE. I guess there's a web tutorial, but statements like "If you really want to you can even create your very own processor and write software to run on it!" are pretty optimistic.

Arduino's advantage isn't in the hardware. It's in the software stack that simplifies pin control to write(1) and lets people without coding experience get going quickly. Mojo looks like it's trying to be Arduino for hardware without a comparable effort on the software side.

There's also been some FPGA discussion in the Verilog thread.

IMO it's greatest use will be a $55 breakout board for a Spartan-6 for people who already know what they're doing to use. Microcontrollers are one thing, with Arduino being the largest community with the most code samples / libraries around (quality aside), and even that's fragmenting quickly; building a board to hold and power a MCU is not difficult, but finding the time to invest in writing solid libraries and then release them for free is. As you said, it feels like they're just assuming the "community will fill in the gaps" and they're not putting in much effort on the software side.

Based on the bio, I appreciate the enthusiasm of the guy who's like "hey, FPGAs are cool, I want to share them with people!", but at the same time, he's neglecting all the other boards out there and this one doesn't bring anything new to the table. I wonder if they'll even have basic guides/tutorials written on how to use ISE and/or Vivado, FPGA toolsuites are a different ballgame entirely from some repackaged Eclipse IDE.

Still though, $70k raised v0v

e: Soft AVR is cool though, how many LEs does it eat/what's performance like?

ANIME AKBAR
Jan 25, 2007

afu~
Having an arduino run at >100MHz would be awesome in a way...

But I'm having a lot of trouble imagining what most "hobbyists" could do with an FPGA. I can't think of anything fun that doesn't involve actually knowing a good bit of math or being very good at HDL.

some kinda jackal
Feb 25, 2003

 
 

ANIME AKBAR posted:

Having an arduino run at >100MHz would be awesome in a way...

There are already ports of the Arduino language to ARM Cortex boards and those have cracked 100mhz, though I think a bunch are still chugging along at 70-something MHz. http://leaflabs.com/ has a complete solution including their Arduino-like IDE.

e: Oh pff, Arduino Due already runs at 84mhz on a Cortex M3. I'm pretty behind the times.

movax
Aug 30, 2008

ANIME AKBAR posted:

Having an arduino run at >100MHz would be awesome in a way...

But I'm having a lot of trouble imagining what most "hobbyists" could do with an FPGA. I can't think of anything fun that doesn't involve actually knowing a good bit of math or being very good at HDL.

It's certainly interesting for glue logic applications or say needing an IC that can generate a large amount of PWM signals or something, but even bus interfacing can get kind of complex pretty quick (especially when it comes to licensing IP cores).

That said, I was thinking about doing a demo workshop at a con this year about doing your own PCIe device with a FPGA and being able to do MMIO to a register to control some LEDs, but I feel a little "bad" perhaps showing how simple that can really be and ruining some of the hardware engineering mystique :(

Shame Boy
Mar 2, 2010

movax posted:

That said, I was thinking about doing a demo workshop at a con this year about doing your own PCIe device with a FPGA and being able to do MMIO to a register to control some LEDs, but I feel a little "bad" perhaps showing how simple that can really be and ruining some of the hardware engineering mystique :(

I would find this absolutely fascinating, if you do it get someone to film it or something please :)

JawnV6
Jul 4, 2004

So hot ...
I've only ever used USB FPGA's, which really limit the host side sw interactivity you can do. I've never used a card-based FPGA, are there standard libraries to interface with it? What I'm trying to ask (terribly) is are you having to write your own PL/DL/TL or is there a free IP that's handwaving all that away and giving you "MWr address 0x2000" without a hint of 8b/10b or FC?

movax
Aug 30, 2008

JawnV6 posted:

I've only ever used USB FPGA's, which really limit the host side sw interactivity you can do. I've never used a card-based FPGA, are there standard libraries to interface with it? What I'm trying to ask (terribly) is are you having to write your own PL/DL/TL or is there a free IP that's handwaving all that away and giving you "MWr address 0x2000" without a hint of 8b/10b or FC?

With something like the Cyclone IV GX, it has PCIe hard IP that you can connect to via Avalon-ST or Avalon-MM, so you can just write some basic logic to interface to Avalon, and then yeah you essentially get fed the decoded TLP and you can choose how to handle MRd/MWr/etc. In this case I could just be really lazy and handle 3DW only and write to a single 8-bit register hooked up to 8 LEDs or something. So yeah, it abstracts away data-layer/transaction-layer details and feeds it over a series of Avalon transactions. There are some side channels that would let you reconfigure the FPGA over PCIe as well.

The MegaWizard will generate a core for you that has BARs and stuff setup as you desire, so really all you have to do at that point is instantiate the PCIe core and hook up to it via whatever interface.

I think right now I have dead simple stuff like
code:
						IF (s_lAvST_Rx_Sop ='1') THEN	-- Start of Packet, ID Packet Type for State Machine
							
							CASE	s_lvAvST_Rx_Data(30 DOWNTO 24)	IS
								WHEN	c_lvTLP_MRd32	=>
									s_eDecodeState	<=	MRD32;
								WHEN	c_lvTLP_MRd64	=>
									s_eDecodeState	<=	MRD64;
								WHEN	c_lvTLP_MWr32	=>
									s_eDecodeState	<=	MWR32;
								WHEN	c_lvTLP_MWr64	=>
									s_eDecodeState	<=	MWR64;
								WHEN	c_lvTLP_Cpl		=>
									s_eDecodeState	<=	CPL;
								WHEN	c_lvTLP_CplD	=>
									s_eDecodeState	<=	CPLD;
								WHEN	OTHERS			=>
									s_eDecodeState	<=	IDLE;
							END CASE;							
						END IF;	-- End IF SOP
which parses the Avalon SOP and then handles the transaction type as appropriate. I think in the newer chips like Cyclone V SXs, they give you a native AXI interface (or they've written Avalon <-> AXI wrappers for all their existing stuff). All the other code to handle the writes/reads is fairly simple as well, mostly just handling byte enables and steering data to the right address.

e: and if you use QSys / SOPC Builder, its (mostly) plug-and-play as they say and you can drop down a PCIe I/F, and choose what memory ranges get decoded to what other peripherals, etc.

movax fucked around with this message at 20:51 on Mar 19, 2013

makomk
Jul 16, 2011

Martytoof posted:

e: Oh pff, Arduino Due already runs at 84mhz on a Cortex M3. I'm pretty behind the times.
To be fair, the Arduino Due was a relative latecomer in terms of ARM hardware and was vaporware for over a year. I'm not sure how reliable or complete the library support is for it either; officially it's still beta and may be missing features.

Rescue Toaster
Mar 13, 2003
As far as introductory FPGAs go, we've had really good luck with some of the Altera stuff. We equipped the lab at my old tech school with Terasic DE1's http://www.terasic.com.tw/cgi-bin/page/archive.pl?Language=English&CategoryNo=39&No=83 and they use them for both teaching the introductory digital courses (where they learn some VHDL) and I created a NIOS II processor bitstream that they can use for teaching introductory assembly/C programming, that has worked out well. They have a little credit-card sized one the DE0-nano, which is pretty similar to that kickstarter one except that it has a 32MB SDRAM on there making it great for soft processors. If you're doing all your own hardware interfacing anyway and don't need switches/buttons/lights, that one is like $86 on digikey.

Just hearsay, but I've heard the Xilinx pico/microblaze are not as easy to setup and get running as NIOS is. I found SOPC builder at least really easy to use, Qsys I haven't messed with too much yet.

However, all that said... the soft processors from xilinx/altera aren't usually free for the higher performance pipelined w/ cache versions. So if you're using processor cores you get off opencores or something, you should probably go for whatever chip/family they tested it on. If you aren't looking for like a high performance 32bit processor (in which case why not just buy an STM32 or something?) and just want to experiment with VHDL/Verlog then really anything will work I suppose.

Rescue Toaster fucked around with this message at 04:06 on Mar 20, 2013

Cockmaster
Feb 24, 2002

Slanderer posted:

As far as I know, it's practical utility is often hugely limited by the fact that it's much cheaper to just put a physical microcontroller next to your FPGA and running all of the necessary I/O to it.

There was a failed Kickstarter for a FPGA Arduino shield (by the Papillo team, no less) some time ago:

http://www.kickstarter.com/projects/13588168/papilio-fpga-shield-for-arduino?ref=live

Perhaps they'd have done better if they had had a working prototype to show off.

What would really be nice is one of those for the Beaglebone. I could definitely see the pair being incredibly powerful for robotics - you have a processor capable of sophisticated vision/AI/navigation algorithms, plus the FPGA for real-time functions (counting encoder pulses, handling sensor data, possibly handling PD feedback loops for motor speed control, etc.). I've seen a number of people talking about working on such a thing, but no meaningful results.

priznat
Jul 7, 2009

Let's get drunk and kiss each other all night.
I hope the Zynq stuff drops in price soon because they're really cool devices. The Zedboard is pretty expensive for a board to mess around on ($320 edu pricing). Also the current Xilinx tool flow for it is ridiculously clunky. Hopefully it'll get better when it gets merged into Vivado, but I doubt it. My current nightmare is trying to adapt our makefile flow to work with all the Zynq stuff.

Still, could be worse. Xilinx is charging $18,000 per device (for the first 5) for their new Virtex-7 2000Ts :D

movax
Aug 30, 2008

priznat posted:

I hope the Zynq stuff drops in price soon because they're really cool devices. The Zedboard is pretty expensive for a board to mess around on ($320 edu pricing). Also the current Xilinx tool flow for it is ridiculously clunky. Hopefully it'll get better when it gets merged into Vivado, but I doubt it. My current nightmare is trying to adapt our makefile flow to work with all the Zynq stuff.

Still, could be worse. Xilinx is charging $18,000 per device (for the first 5) for their new Virtex-7 2000Ts :D

We just switched over an upcoming design to the Zynq from the Cyclone V S series; Altera is really far behind and nowhere near as mature as the Zynq ecosystem is right now. Zynq prices dropped but the disadvantage is that to get transceivers, you have to jump to Kintex fabric, meaning more $$$. The Zynq toolflow is actually pretty good I'd argue right now, the Zynq-specific parts are way ahead of what Xilinx usually puts out. They're pretty active contributors to the Linux kernel as well, which is nice.

Kire
Aug 25, 2006
For a class project I'm hoping to use a Peltier cooler and a thermistor to create a control system to maintain a steady temperature for a volume of fluid (inside a carboy, which is a small glass fermenter, 1 or 2 gallons).

As a requirement of the project we need to use a gumstix board, which is a linux minicomputer. This will be hooked up to the thermistor and do the controlling & processing, but its GPIO pins are limited to 4-6mA I believe. Thus I need to use some kind of power transistor to provide the Peltier with the 12V, ~5A that it will want.

I've found some interesting tips online for using Peltiers, specifically don't use PWM at a low rate that causes heavy thermal cycling because that will mechanically damage it ( http://electronics.stackexchange.com/questions/28634/how-to-drive-a-peltier-element ) but am I understanding this correctly that I can use really fast PWM to keep the Peltier at a "medium" temperature instead of having it swing between maximum and off?

Here's a picture of the overall system I'm planning:

poeticoddity
Jan 14, 2007
"How nice - to feel nothing and still get full credit for being alive." - Kurt Vonnegut Jr. - Slaughterhouse Five

Kire posted:

For a class project I'm hoping to use a Peltier cooler and a thermistor to create a control system to maintain a steady temperature for a volume of fluid (inside a carboy, which is a small glass fermenter, 1 or 2 gallons).

As a requirement of the project we need to use a gumstix board, which is a linux minicomputer. This will be hooked up to the thermistor and do the controlling & processing, but its GPIO pins are limited to 4-6mA I believe. Thus I need to use some kind of power transistor to provide the Peltier with the 12V, ~5A that it will want.

I've found some interesting tips online for using Peltiers, specifically don't use PWM at a low rate that causes heavy thermal cycling because that will mechanically damage it ( http://electronics.stackexchange.com/questions/28634/how-to-drive-a-peltier-element ) but am I understanding this correctly that I can use really fast PWM to keep the Peltier at a "medium" temperature instead of having it swing between maximum and off?

Here's a picture of the overall system I'm planning:


I don't know a ton about Peltier cooling systems, but I do know if you want to use one, you'll need to have a fan on the unit somewhere (and I don't see one in your diagram), especially if it's running at 60 watts while it's on. (Can Peltier units be run at lower amperages? If you can reduce output that way, you might not need to really cycle it very often.)

Also, is there a reason you're putting it on the bottom? On one of the sides (ideally, near the top) seems like it would cause the liquid inside to be more uniform in temperature (from convection) and remedy the issue of creating hot air directly underneath the thing you're trying to cool.

sixide
Oct 25, 2004
I have seen thermostat control on heating/cooling peltiers in off-the-shelf stuff, so the bit about cycling surprises me. I suppose cheap peltiers might not be made to withstand temperature cycling. Roughly filtered or very fast PWM might be best.

If you need heating and cooling capability, an H-bridge or similar would be necessary, possibly using relays for 5A. Even if you only intend to maintain a cold temperature, heat will allow better control.

You will certainly need a way to extract heat from the element, preferably away from the load. A heatsink/fan combo is basically standard, although you could go nuts with liquid cooling if that's your thing. You probably want to duct the hot air away.

priznat
Jul 7, 2009

Let's get drunk and kiss each other all night.

movax posted:

We just switched over an upcoming design to the Zynq from the Cyclone V S series; Altera is really far behind and nowhere near as mature as the Zynq ecosystem is right now. Zynq prices dropped but the disadvantage is that to get transceivers, you have to jump to Kintex fabric, meaning more $$$. The Zynq toolflow is actually pretty good I'd argue right now, the Zynq-specific parts are way ahead of what Xilinx usually puts out. They're pretty active contributors to the Linux kernel as well, which is nice.

The toolflow is ~ok~ but trying to hammer it into shape with our build system is becoming a bit of a futile effort I think. Unless I want to get into pulling apart the whole XPS mish-mash (mhs files etc, ugh). How do you do it, PlanAhead with XPS?

Mostly I'm trying to figure out the best way to implement revision control on individual components. I'm going to be looking into if I can skip XPS altogether and stitch together the AXI devices by hand but I suspect that'll be a lot more trouble than it's worth.

Apparently they are announcing smaller/cheaper zynq devices with transceivers soon too, I heard this from the Xilinx rep a couple weeks back. They'll slot in around the 7020 in price.

PDP-1
Oct 12, 2004

It's a beautiful day in the neighborhood.
Back when I used to work with laser diodes a lot, a slow switching speed of one second on / one second off was considered the perfect hell condition for the devices because the small semiconductor parts could nearly totally heat up and cool down on each cycle, producing maximum thermal stresses. I'd imagine that for a Peltier cooler with lots of tiny semiconductor elements in an array the situation would be similar. All of the Peltier cooler drivers I've used use a DC current that gets modulated up or down to regulate the temperature of the active side (hot or cold).

I suppose for this case you could either (a) just cycle the cooler digitally on/off because it's a school project and device lifetime may not be a big issue, or (b) do like sixide said and take a PWM signal through a diode into an RC filter, then have and op-amp monitor that filtered voltage and send it's output to the base/gate of some transistor that would regulate the current through the Peltier device.

Also - 1 or 2 gallons of water is a pretty big thermal mass for a Peltier device to move around. Switching the Peltier on/off may not be a big issue here because you'd have to turn it on for several minutes at a time to get any noticeable temperature change. Just design your control algorithm to allow for a bit of thermal hysteresis and it shouldn't really toggle on/off much at all.

evensevenone
May 12, 2001
Glass is a solid.
Some kids in my senior design class tried to make a Peltier-based beer-cooler, with a shitton of Peltiers arranged in a hexagon around the beer can. The end result had so much waste heat that it actually warmed the beer up slightly.

This was after their design reviews where they went from "cool a six pack in seconds" to "cool a single beer in several minutes" and their pages of heat transfer calcs.

On their final presentation, our professor told them to turn it around and rebrand it as a soup warmer.

Zuph
Jul 24, 2003
Zupht0r 6000 Turbo Type-R
These guys sell the devices you're looking for: https://www.tetech.com/

Moisture will destroy the junctions in a hurry, so get the potted versions. TE Tech has really good datasheets for all the parts, and a slew of really good app notes. Read up, and you should be able design something that works, and is reliable.

Aurium
Oct 10, 2010
Temperature controlling peltiers presents a few interesting complications. You don't really want to thermally cycle it for longevity reasons. This pretty much excludes bang bang control with some hysteresis.

Instead you pretty much want to leave it proportionally on to your load and target temperature. So you have the traditional choice of linear or PWM. Not gonna talk about linear anything.

Now, the way I understand it, PWM presents some unusual extra challenges with peltiers. Naturally, peltiers just move heat when you apply power to them. So they don't move the heat very far though the junction with each PWM cycle. Since you haven't moved it very far, when the PWM cycle turns off the heat can flow back very quickly. The net result is that you end up with cooling not working near as well as it should. What you really want is a constant flow.

So yea, putting a low pass filter on it is pretty much what you want.

Aurium fucked around with this message at 17:36 on Mar 21, 2013

Bad Munki
Nov 4, 2008

We're all mad here.


So I came across this sweet strobe unit tonight. The bulb on it is disturbingly bright and awesome, and the strobe speed is controlled by a big ol' pot of some sort. The whole thing plugs directly into 120VAC. I'd like to control the speed or, even better, the pulse itself from 5V control logic (a la arduino et al.) This all appears to be analog, though, so I'm not really even sure what to poke at first.

Here's a picture of the top of the device:


And here's a picture of the bottom, mirrored so that the circuit actually corresponds directly to the pic above:


And here's the best I could do at capturing how bright it is, doesn't do it justice:


But yeah, it'd be really great if I could control this thing from a microcontroller so I could more accurately time the flashes, for neat things. Yes, I could do the same with a nice big LED, but I have this and it's cool.

e: You can't see in the pic, but that pot says 1A/120VAC on it, if that matters.

Bad Munki fucked around with this message at 03:48 on Mar 21, 2013

Shame Boy
Mar 2, 2010

Bad Munki posted:

So I came across this sweet strobe unit tonight. The bulb on it is disturbingly bright and awesome, and the strobe speed is controlled by a big ol' pot of some sort. The whole thing plugs directly into 120VAC. I'd like to control the speed or, even better, the pulse itself from 5V control logic (a la arduino et al.) This all appears to be analog, though, so I'm not really even sure what to poke at first.

Here's a picture of the top of the device:


And here's a picture of the bottom, mirrored so that the circuit actually corresponds directly to the pic above:


And here's the best I could do at capturing how bright it is, doesn't do it justice:


But yeah, it'd be really great if I could control this thing from a microcontroller so I could more accurately time the flashes, for neat things. Yes, I could do the same with a nice big LED, but I have this and it's cool.

e: You can't see in the pic, but that pot says 1A/120VAC on it, if that matters.

If you could get a read on the voltage of the capacitor or just get the timing down, you could rewire the triggering circuit so that the arduino triggers it instead of it being triggered automatically when the voltage hits the right amount. No idea how you'd do this in this particular circuit, but I did the exact opposite to a disposable camera once, taking the manual trigger and replacing it with a diode that broke down when the capacitor reached the right voltage.

Bad Munki
Nov 4, 2008

We're all mad here.


Well, if it helps at all, the cap is 160V 47µF.

Kire
Aug 25, 2006

Aurium posted:

Temperature controlling peltiers presents a few interesting complications. You don't really want to thermally cycle it for longevity reasons. This pretty much excludes bang bang control with some hysteresis.

Instead you pretty much want to leave it proportionally on to your load and target temperature. So you have the traditional choice of linear or PWM. Not gonna talk about linear.

Now, the way I understand it, PWM presents some unusual extra challenges with peltiers. Naturally, peltiers just move heat when you apply power to them. So they don't move the heat very far though the junction with each PWM cycle. Since you haven't moved it very far, when the PWM cycle turns off the heat can flow back very quickly. The net result is that you end up with cooling not working near as well as it should. What you really want is a constant flow.

So yea, putting a low pass filter on it is pretty much what you want.

With filtering the PWM output, would it be taking the PWM from the GPIO, sending that to the gate of a transistor with a small cap to ground along the way, and that transistor controls either the power OR the ground of the Peltier?

And this only needs to work for a couple weeks, so I may just go for blunt on/off functionality if I need to. I hope the stress this will cause only damages the thing after a period longer than one month of continuous use.

Kire fucked around with this message at 05:17 on Mar 21, 2013

Slanderer
May 6, 2007

Bad Munki posted:

So I came across this sweet strobe unit tonight. The bulb on it is disturbingly bright and awesome, and the strobe speed is controlled by a big ol' pot of some sort. The whole thing plugs directly into 120VAC. I'd like to control the speed or, even better, the pulse itself from 5V control logic (a la arduino et al.) This all appears to be analog, though, so I'm not really even sure what to poke at first.

Here's a picture of the top of the device:


And here's a picture of the bottom, mirrored so that the circuit actually corresponds directly to the pic above:


And here's the best I could do at capturing how bright it is, doesn't do it justice:


But yeah, it'd be really great if I could control this thing from a microcontroller so I could more accurately time the flashes, for neat things. Yes, I could do the same with a nice big LED, but I have this and it's cool.

e: You can't see in the pic, but that pot says 1A/120VAC on it, if that matters.
If you want to drive it from a micro, the first you need to do is draw up a schematic and see what's going on. Figure out what the source of the trigger pulse on the 3rd (middle) lead of the strobe is, and see if you can trigger using that. I'm curious what the transistor is, too. Or is it like an SCR or something.

However, you might be better off taking the strobe and the socket for it as well as the main capacitor and make a new low-voltage powered circuit. All you really need is a small transformer, and something to trigger the strobe. I think the one circuit I built from a schematic used a 3-9V (I forget what it was "supposed" to be) along with a transistor, a few passives, and the transformer to make an oscillator to drive the transformer and create something between 100 and 400V. Then a small neon lamp (with an ~100V breakdown, maybe) triggered an SCR or something with drove a 3 lead pulse transformer connected to the trigger lead.

Yeah, kinda convoluted, but interfacing with live AC stuff is annoying to do correctly.

HATE TROLL TIM
Dec 14, 2006
I pulled my old electronics and robotics stuff out of storage today. It's like a time capsule from 15 years ago. Cartons of Archer resistors, 555 timers and every one of those awful Forrest Mimms project books that Rat Shack used to sell. Interestingly I found a CMUcam1 brand new in the bag *and* an OOPic II.

You think it would be worth it to build the CMUcam? It's old tech, but still might fun to play with. Looks like the makers of the OOPic have gone 404. Anything interesting I could do with it?

Edit: Looks like the actual OOPic chip is a PIC16F77.

HATE TROLL TIM fucked around with this message at 06:16 on Mar 21, 2013

Delta-Wye
Sep 29, 2005

HATE TROLL TIM posted:

I pulled my old electronics and robotics stuff out of storage today. It's like a time capsule from 15 years ago. Cartons of Archer resistors, 555 timers and every one of those awful Forrest Mimms project books that Rat Shack used to sell. Interestingly I found a CMUcam1 brand new in the bag *and* an OOPic II.

You think it would be worth it to build the CMUcam? It's old tech, but still might fun to play with. Looks like the makers of the OOPic have gone 404. Anything interesting I could do with it?

Edit: Looks like the actual OOPic chip is a PIC16F77.

It's actually funny, I ran into the guy that made the OOPic a few months ago. He's still out there making things http://babblebot.net/

longview
Dec 25, 2006

heh.
The green thing might be a spark gap? Then the TO-92 is a thyristor and the circuit sort of looks like this:


That circuit has a transformer but I'm almost positive I have a similar non-adjustable board that works without a transformer on the same principle.
Ignoring the first part with the transformer which is for 3V powered, it works by RC-charging a cap up to a trigger voltage at which point the tube conducts and triggers the thyristor, that sends a pulse to the tube to light it up. The tube then discharges the capacitor in a flash and the circuit recharges.

Fake-e: or this circuit is using the pot directly to limit the charging rate (and thus the strobe rate).
To drive this from a micro you'd definitely need an optocoupler or some similar isolation system since it's not isolated from the mains. Replacing the whole circuit with a battery powered one is far safer as well.

Zuph
Jul 24, 2003
Zupht0r 6000 Turbo Type-R

Aurium posted:

Temperature controlling peltiers presents a few interesting complications. You don't really want to thermally cycle it for longevity reasons. This pretty much excludes bang bang control with some hysteresis.

Instead you pretty much want to leave it proportionally on to your load and target temperature. So you have the traditional choice of linear or PWM. Not gonna talk about linear.

Now, the way I understand it, PWM presents some unusual extra challenges with peltiers. Naturally, peltiers just move heat when you apply power to them. So they don't move the heat very far though the junction with each PWM cycle. Since you haven't moved it very far, when the PWM cycle turns off the heat can flow back very quickly. The net result is that you end up with cooling not working near as well as it should. What you really want is a constant flow.

So yea, putting a low pass filter on it is pretty much what you want.

If you PWM at the right frequency, you won't induce thermal cycling effects: https://www.tetech.com/FAQ-Technical-Information.html#11

Aurium
Oct 10, 2010

Kire posted:

With filtering the PWM output, would it be taking the PWM from the GPIO, sending that to the gate of a transistor with a small cap to ground along the way, and that transistor controls either the power OR the ground of the Peltier?

And this only needs to work for a couple weeks, so I may just go for blunt on/off functionality if I need to. I hope the stress this will cause only damages the thing after a period longer than one month of continuous use.

Zuph posted:

If you PWM at the right frequency, you won't induce thermal cycling effects: https://www.tetech.com/FAQ-Technical-Information.html#11

Here's another peltier manufacturer that backs this up. Look at answer 41. You should just ignore what I said about filters and drive it fast enough.

Slanderer
May 6, 2007

Aurium posted:

Here's another peltier manufacturer that backs this up. Look at answer 41. You should just ignore what I said about filters and drive it fast enough.

Yeah, 1-10kHz PWM should be ok. Heck, if you can't generate that in hardware, just dial down the frequency and do it in software at like 1kHz.

Slanderer
May 6, 2007

longview posted:

The green thing might be a spark gap? Then the TO-92 is a thyristor and the circuit sort of looks like this:


That circuit has a transformer but I'm almost positive I have a similar non-adjustable board that works without a transformer on the same principle.
Ignoring the first part with the transformer which is for 3V powered, it works by RC-charging a cap up to a trigger voltage at which point the tube conducts and triggers the thyristor, that sends a pulse to the tube to light it up. The tube then discharges the capacitor in a flash and the circuit recharges.

Fake-e: or this circuit is using the pot directly to limit the charging rate (and thus the strobe rate).
To drive this from a micro you'd definitely need an optocoupler or some similar isolation system since it's not isolated from the mains. Replacing the whole circuit with a battery powered one is far safer as well.

I think the green component is just a higher-voltage capacitor (I forget if those are ceramic or not, but I have a bunch of 2kV capacitors that look like it). I assume the circuit is just charging an RC circuit of some kind until the voltage on the trigger reaches the breakdown voltage, instead of using a more controlled method (like with a neon tube). I don't really want to try to reverse engineer that circuit by sight, so I'm not gonna make any more specific guesses...

EDIT: This circuit of yours is very similar to the one I used in the past, only with a few extra components, and the pot to control the breakdown voltage for the flash.

Delta-Wye
Sep 29, 2005

Aurium posted:

So yea, putting a low pass filter on it is pretty much what you want.

I've been mulling this over and it doesn't feel right. I realize you've changed your advice for other reasons already, but if you low pass the PWM input to the switching element (FET, BJT, whatever) it will end up running in the active mode? If you low pass the PWM signal enough to remove the switching frequency, you will end up with the average. If the average is high enough to turn the switch on but not fully into saturation, it would end up burning a lot of heat.

Unless I'm missing something of course. :smith:

asdf32
May 15, 2010

I lust for childrens' deaths. Ask me about how I don't care if my kids die.

Delta-Wye posted:

I've been mulling this over and it doesn't feel right. I realize you've changed your advice for other reasons already, but if you low pass the PWM input to the switching element (FET, BJT, whatever) it will end up running in the active mode? If you low pass the PWM signal enough to remove the switching frequency, you will end up with the average. If the average is high enough to turn the switch on but not fully into saturation, it would end up burning a lot of heat.

Unless I'm missing something of course. :smith:

Yes, he corrected it but that's exactly what would happen. Running a fet in linear mode is a legit way to create a high power linear regulator, but that's not needed here. May as well switch the fet as fast as possible and maximize efficiency so long as the load can handle it. An it sounds like it can.

Aurium
Oct 10, 2010

Delta-Wye posted:

I've been mulling this over and it doesn't feel right. I realize you've changed your advice for other reasons already, but if you low pass the PWM input to the switching element (FET, BJT, whatever) it will end up running in the active mode? If you low pass the PWM signal enough to remove the switching frequency, you will end up with the average. If the average is high enough to turn the switch on but not fully into saturation, it would end up burning a lot of heat.

Unless I'm missing something of course. :smith:

You're correct. I'm thinking the best way to implement it would be to filter the output of the transistor.

The easiest way would be a high side switch and a RL (or even lc)low pass filter to keep the series resistance down.

asdf32
May 15, 2010

I lust for childrens' deaths. Ask me about how I don't care if my kids die.

Aurium posted:

You're correct. I'm thinking the best way to implement it would be to filter the output of the transistor.

The easiest way would be a high side switch and a RL (or even lc)low pass filter to keep the series resistance down.

Filtering where? A an L will just create overshoot, an R burns up heat, and a cap creates a heavy load for a fast switching FET. This is an application where you could easily do low side switching because you have a fairly simplisitic load. I might consider putting components down for some of those but at the most, populating them with really weak values. High side switching is fine but low side switching means you can use an NFET instead of P (cheaper/smaller/lower R) or skip the charge pump driver.

By the way the resource you linked earlier was good. I think it pretty much answers it. This is what it said:

quote:

Yes, and this is one of the most electrically-efficient ways to control voltage to your device—although you must observe some precautions. As long as you keep the voltage at VMax or below, you will effectively pump heat whenever the duty cycle applies voltage to your system; when the power is turned off, the heat pumping will stop. By pulse-width modulating a suitable voltage, you can easily control the extent of heat pumping by simply varying the duty cycle of the pulses. The great thing about this approach, is that it allows you to minimize power dissipation in your control circuit—especially if you use power MOSFET's for switching (a subject which goes beyond this particular question).

Significant precautions must be employed with PWM, however. First of all, the PWM should be at a high enough frequency to minimize thermal stresses to the TE devices. While we like to keep the frequency in the low killihertz (Hz) range, in many applications these days we must compromise at around 120 Hz for the sake of electromagnetic compatibility. Another important issue is the potential for generating electro-magnetic interference (EMI) in the wiring to the TE device. If you are using PWM, you may need to shield your power wiring or keep it away from any sensitive electrical signals. A stitch in time to confront these issue early, can save a lot of corrective work deeper in the design cycle.

http://www.tellurex.com/technology/peltier-faq.php (#41)

Adbot
ADBOT LOVES YOU

Aurium
Oct 10, 2010

asdf32 posted:

Filtering where? A an L will just create overshoot, an R burns up heat, and a cap creates a heavy load for a fast switching FET. This is an application where you could easily do low side switching because you have a fairly simplisitic load. I might consider putting components down for some of those but at the most, populating them with really weak values. High side switching is fine but low side switching means you can use an NFET instead of P (cheaper/smaller/lower R) or skip the charge pump driver.

By the way the resource you linked earlier was good. I think it pretty much answers it. This is what it said:


http://www.tellurex.com/technology/peltier-faq.php (#41)

Sorry, it was a segue into exploring a hypothetical. You wouldn't actually do it for this load. Hence the answer 41, don't filter earlier posts.

What I meant was for circuit topology Delta-Wye suggested, filtered PWM to control a transistor, you'd putting said transistor into its linear region. Hence Delta-Wye is correct.

There is another layout that I think would be a better way of implementing a filtered pwm signal, as it wouldn't put it the operating transistor into it's linear region. It would come with some other costs though.

I don't think you can actually do low side switching with this topology. A high side P channel vs N channel with some additional circuitry was an implementation detail that I didn't really deal with because it was a hypothetical. If you actually did this, it's absolutely something to consider.

I chose an RL because the inductor would look like a short to the dc component, and the resistor would wouldn't be in the load current's path. You could use a traditional RC filter here instead, but it seems to me that if you need an external transistor to drive the load current, you probably wouldn't want a resistor in series with the load. You could replace the resistor in the RL filter with a capacitor and get it out of parallel with the load too.

I've attached a picture of the circuit. You'll see similar layouts in class D amps where they drive the transistors with PWM signals, but the output of the amp needs to be continuous and clean, but also high current. (they typically do swap the resistor for a capacitor)

Hopefully this post is a lot clearer than the original.

Only registered members can see post attachments!

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply