PAW2 - DigiPot

A place to document your own projects.

PAW2 - DigiPot

Postby matseng » Sun Dec 16, 2012 12:01 pm

As mentioned in an earlier post I'll try to do one small PCB project every week and then send for PCB's of it every Monday.

I've started planning for the second PCB A WEEK project -this time it will be a bit more advanced than the previous project but hopefully it will be finished before the deadline next Sunday.

The basic idea is a digital potentiometer with a 7-segment display that shows the current value. The "potentiometer" is a Rotary Encoder connected to a microcontroller [TBD] that will read the signals from it and convert it to a value that is displayed on the 7-segment displays.

Files can be found at Github.

The value will also be sent via i2c/spi/serial/usb [TBD] to the host and possibly also be output as an analogue voltage.

The board also will have six LEDs for status indications.

The board is planned to either be operated in an autonomous mode where the display is updated by the board itself or in a host mode where the host is telling the board what to display.

DigiPot-pcb.png
First draft of the DigiPot
User avatar
matseng
Hero Member
Hero Member
 
Posts: 876
Joined: Sat Oct 15, 2011 12:29 pm
Location: Kuala Lumpur, Malaysia

Re: PAW2 - DigiPot

Postby dolabra » Sun Dec 16, 2012 12:19 pm

this sounds interesting. is it a digital pot, or is it an i2c encoder?
dolabra
Full Member
Full Member
 
Posts: 236
Joined: Tue Sep 06, 2011 6:45 pm

Re: PAW2 - DigiPot

Postby matseng » Sun Dec 16, 2012 12:25 pm

A "Rotary Encoder" aka "Quadrature Encoder" is sending pulses to the microcontroller that will determine how the user is turnin the knob and calculating a current value for it.

This value will be digitally sent to the host via i2c or another serial protocol. At the same time an analogue voltage will be generated and be presented at a output.

Possibly also the value could be sent to a digital potentiometer chip like a MCP4551 as well to set a resistive value.

All of this is on a planning stage, and I need to finalize this before Sunday, but even if the software is not ready by then it's good to have a lot of hardware options on the board - not all of it needs to be populated or implemented.
User avatar
matseng
Hero Member
Hero Member
 
Posts: 876
Joined: Sat Oct 15, 2011 12:29 pm
Location: Kuala Lumpur, Malaysia

Re: PAW2 - DigiPot

Postby matseng » Mon Dec 17, 2012 2:52 am

Added microcontroller and support parts for the 7-segments. Did a bit of premature routing - best practices says that don't even think about routing anything before the schematics is done - but I usually cheat and start routing much earlier ;-)

DigiPot-pcb-back.png
Some parts added and premature routing ;-)


I selected a atmega8/168/328 since I have plenty of them already and they have enough i/o for this project. I also choose to use a ISPtouch connector for as the programming interface. http://dangerousprototypes.com/?p=62605

Currently I'm thinking about what I'll use as the contacts for power and communications. I want to have the contacts at the bottom of the PCB and also not having any ugly pins sticking out on the top. So I'll most likely use some SMD contacts.

Standard SMD right angle headers might be a solution - but they are kinda expensive and hard to find. Maybe I should just stick with thru hole versions and accepts the uglyness. Any ideas and/or comments about this?

Image
{Image from Sparkfun}
User avatar
matseng
Hero Member
Hero Member
 
Posts: 876
Joined: Sat Oct 15, 2011 12:29 pm
Location: Kuala Lumpur, Malaysia

Re: PAW2 - DigiPot

Postby dolabra » Mon Dec 17, 2012 10:34 am

solder normal headers flat, sticking off the side of the board? like this http://dangerousprototypes.com/2011/11/ ... out-board/
dolabra
Full Member
Full Member
 
Posts: 236
Joined: Tue Sep 06, 2011 6:45 pm

Re: PAW2 - DigiPot

Postby matseng » Mon Dec 17, 2012 11:28 am

I did that for the debug/PDI port on my KimCard, but it's too ugly and hackish for something that might be used as a "real product"...
User avatar
matseng
Hero Member
Hero Member
 
Posts: 876
Joined: Sat Oct 15, 2011 12:29 pm
Location: Kuala Lumpur, Malaysia

Re: PAW2 - DigiPot

Postby Sjaak » Mon Dec 17, 2012 1:18 pm

Or get a regular PTH .1" header with long legs on both sides. then bend one side in a vice like on the picture.

Still any header other then the standard are much expensiver (and hard to find), so you might end up buying those smds ones :D
User avatar
Sjaak
Fellow
Fellow
 
Posts: 3039
Joined: Sun Jan 03, 2010 2:45 pm
Location: Hiero

Re: PAW2 - DigiPot

Postby ducksauz » Mon Dec 24, 2012 1:07 pm

I notice you've got SMD parts on both sides. I know that's done on mass produced boards, but how would you handle assemble on a small scale? Would you paste, place and bake the back side with the MCU and then hand solder components on the front?
User avatar
ducksauz
Newbie
Newbie
 
Posts: 12
Joined: Wed Sep 12, 2012 8:45 am

Re: PAW2 - DigiPot

Postby matseng » Thu Dec 27, 2012 2:43 am

ducksauz: I usually handsolder both sides :-) But if I would oven reflow this I probably would do as you said. Reflow the backside and then handsolder the displays at the front - possibly with a hotair gun there.
User avatar
matseng
Hero Member
Hero Member
 
Posts: 876
Joined: Sat Oct 15, 2011 12:29 pm
Location: Kuala Lumpur, Malaysia

Re: PAW2 - DigiPot

Postby matseng » Thu Dec 27, 2012 2:46 am

Uh... Finally sent the files to Seeedtudio. The xmas and other stuff occupied my mind too much to finalize it in time. Boooh & hoo for me :-)

DigiPot-v1-front-700.jpg
Frontside of the board sent to Seeed


DigiPot-v1-back-700.jpg
Backside of the board sent to Seeed. All connectors are squeezed into t.he middle to they are hidden by the knob
User avatar
matseng
Hero Member
Hero Member
 
Posts: 876
Joined: Sat Oct 15, 2011 12:29 pm
Location: Kuala Lumpur, Malaysia

Re: PAW2 - DigiPot

Postby dolabra » Fri Jan 04, 2013 11:07 pm

There is more to it than I expected --- what features did you end up with?
dolabra
Full Member
Full Member
 
Posts: 236
Joined: Tue Sep 06, 2011 6:45 pm

Re: PAW2 - DigiPot

Postby matseng » Sat Jan 05, 2013 11:27 am

There's really not that much of functionality:
  • Three digits display with movable decimal point.
  • Three status leds.
  • Quadrature encoder with button-functionality.
  • Communicate with host via i2c/serial-ttl.
  • Multiple units can be chained.
  • The value can be output as an analogue voltage with 12 bit resolution.

It looks like a lot of parts but that probably just an illusion :-)

Starting from top there's 4 n-fet transistors for muxing the cathodes of the displays and leds. Then there are 8 anode resisors.
The atmega with C3/C4/C5 decoupling caps.

The crystal with C1/C2 load caps is followed by R10/C7/C6 that is a filter for the supply to the mcp4821 12 bit dac.

Below the atmega there are some jumper for selecting if the units is to communicate with serial uart or i2c.

The two 4 pin headers can be used to chain multiple units either by i2c as a bus, or a daisy-chain with serial, if serial the last unit in the chain must be looped.

R9/R11/R12 is pullups for i2c and reset.

The 2-pin header is analogue voltage out and is filtered by C8.

The 5 pads on the bottom is the programming header.
User avatar
matseng
Hero Member
Hero Member
 
Posts: 876
Joined: Sat Oct 15, 2011 12:29 pm
Location: Kuala Lumpur, Malaysia

Re: PAW2 - DigiPot

Postby matseng » Wed Jan 16, 2013 8:31 am

The DigiPot boards are here....

DigiPot.jpg


So tomorrow I'll do some soldering, and some quick test firmware to see if they work at all or is a total failure before sending a few to my sponsors....

There was some silk & soldermask mistakes at the bottom, but nothing serious.
User avatar
matseng
Hero Member
Hero Member
 
Posts: 876
Joined: Sat Oct 15, 2011 12:29 pm
Location: Kuala Lumpur, Malaysia

Re: PAW2 - DigiPot

Postby matseng » Wed Jan 16, 2013 12:39 pm

I soldered up one of them tonight. It turned out that it definitely was a mistake to cluster all connectors under the quadrature encoder. Soldering them was very hard and the leads on both the pin headers as well as the encoder must be cut flush to the pcb before soldering, and it was a very tight fit for the tip of the iron to reach down to the pcb.

This PCB needs revising before anyone would like to solder more than one or two of them.

I haven't done any tests with firmware yet, so there might be other problems as well.

And yes, the 6-pin header at the bottom is only there for loading & debugging the firmware...

Digipot-soldered-top.jpg
The knob should be a bit wider....


DigiPot-soldered-back.jpg
The pin headers was really hard to solder...
User avatar
matseng
Hero Member
Hero Member
 
Posts: 876
Joined: Sat Oct 15, 2011 12:29 pm
Location: Kuala Lumpur, Malaysia

Re: PAW2 - DigiPot

Postby danirebollo » Thu Jan 17, 2013 5:41 pm

where do you ordered the plates, and price? I make PCB in my house very accurate (TQFP chips) but if there whould be some cheap alternative...
danirebollo
Newbie
Newbie
 
Posts: 4
Joined: Thu Jan 17, 2013 5:37 pm

Next

Return to Project logs