Author Topic: Designing a custom Lightsaber PCB - code writing time....  (Read 41937 times)

0 Members and 1 Guest are viewing this topic.

Offline eosintickleear

  • Newbie
  • Posts: 5
Glad to see this posts.
I alomst reading each reply by rexxar, also Peter
They have many good suggestions and many useful links. It can study well from them

And for the sound process, SD card would be a goood choice. Easy to handle.

As I am a newly in electrical design, it is really very useful for me.
Here as I read that you have applications of PCBs, I can share one fab. which hope it can be useful for Canobi.
pcbway.com/e,

Following is the PCBs I ordered last month, 2 kinds, the blue is 2layer,1.6mm Blue sold mask. It is like the size of a coin. And the Red PCB is 4 layer, Red sold-maske. Feel good.  ;D And Erin shows me very good service. Share here for every guys.





Good luck for your design, Canobi

Eosintic
 

Offline CanobiTopic starter

  • Regular Contributor
  • *
  • Posts: 94
  • Country: gb
The SS pin is for slave configuration. You can use any pin you like for CS (except SS). Here's a snippet of code from my routine that reads an SPI EEPROM:
Code: [Select]
    digitalWrite( PIN_CS_E, HIGH );     //CS high is default state
    SPI.begin();
    SPI.setBitOrder( MSBFIRST );        //SPI config stuff
    SPI.setClockDivider( SPI_CLOCK_DIV2 );
    SPI.setDataMode( SPI_MODE0 );
    digitalWrite( PIN_CS_E, LOW );      //pull CS low to activate EEPROM
    SPI.transfer( 2 );              //select write mode
    SPI.transfer( address );     //send address
    SPI.transfer( data );               //send the data
    digitalWrite( PIN_CS_E, HIGH );     //pull CS high to disconnect and begin write process

You have to manually toggle the CS pin every time you want to connect to a slave device. You shouldn't set up SPI with
Code: [Select]
SPI.begin(10);You want to start in master mode, so you don't want any value in the parentheses.

I'm sure it was mentioned, but thanks for doing so again :)

In case you don't know:
MISO stands for Master In, Slave Out. So, Data Out on the SD card would go to MISO on the processor.
Similarly, MOSI stands for Master Out, Slave In. So your DI line goes here

Yay, something I actually know for once :D

Unlike RS232, where Tx on one device connects to Rx on the other, with SPI you connect MISO to MISO and MOSI to MOSI. This tripped me up a few times when I was first learning how to use it.

OK, so maybe not as much as I thought. Seems a bit counter intuitive, makes more sense to have labelled it the same way as RX/TX. Will need to swop the routing to those pins now.

The first image you linked is the pinout for a full-size SD card, which is why the pinout is slightly different. Be sure to use the pinout from your second image, it's actually for a microSD.

I did wonder, so I'm thinking I may need to change the values of the resistors as the schematic shows a 3v rail to the card, not 5v.


Also just to check, are PB1 and PB2 ok go to the amps line in and I can use any another digital pin as CS?



 

Offline rexxar

  • Frequent Contributor
  • **
  • Posts: 439
  • Country: us
    • Forever Tinkering
Yes, you have to use PB1 and 2 for the audio. You can use any other pin you like for the SD card's CS line. In your setup() function though, be sure to do
Code: [Select]
pinMode( SD_CS, OUTPUT );digitalWrite() is supposed to call pinMode, but I've found that it sometimes doesn't. You can get some weird behaviors if you don't correctly configure this.
 

Offline CanobiTopic starter

  • Regular Contributor
  • *
  • Posts: 94
  • Country: gb
Yes, you have to use PB1 and 2 for the audio. You can use any other pin you like for the SD card's CS line. In your setup() function though, be sure to do
Code: [Select]
pinMode( SD_CS, OUTPUT );digitalWrite() is supposed to call pinMode, but I've found that it sometimes doesn't. You can get some weird behaviors if you don't correctly configure this.

OK, got it. Thanks for confirming that :)


As a side note, I was browsing around for mono amp modules last night as it seems a waste to put a stereo amp on the bus if only one channel is being used. Oddly I only found one vendor that makes them, but luckily they're really small. I'll stick the link here in case your interested:

http://m.aliexpress.com/item/1039047060.html?productId=1039047060&productId=1039047060&productSubject=2pcs-lot-3W-mono-USB-powered-5V-D-Class-A-digital-amplifier-board-Power-supply-DC&productSubject=2pcs-lot-3W-mono-USB-powered-5V-D-Class-A-digital-amplifier-board-Power-supply-DC&tracelog=wwwdetail2mobilesitedetail
 

Offline CanobiTopic starter

  • Regular Contributor
  • *
  • Posts: 94
  • Country: gb
@rexxar: I was just going over your schematic regarding the fets and it occurred to me that I only have single colour LEDs (at the moment anyway). Do I need to use all the fets or can I omit some? If so, which ones?

One more question about PB1 and 2. The audio amp requires a live and ground per channel (not saying you didn't know this, just running through the sequence), do either of the PB lines act as ground in this case, or am I missing something (again)?

I get that each is 8bit and together make 16bit but not sure how it relates to ground for the amp module.

Part of me wanted to put one on each stereo channel and use common on the inputs, but after some more thought it didn't seem right as that would equate to 8 bit stereo on the output, not combined 16 bit.

For a mono amp logic dictates as you stated, one on each of the inputs, just can't quite wrap my brain around it, but that's how it's routed for now anyway.

Talking of mono amp modules, they're only 12 x 6.5 mm. I managed to shorten the bus veriant using the footprint for that one by quite a bit, it used to be the longest section. If I can work out the fet situation I can most likely shorten the PSU section too.

 

Offline rexxar

  • Frequent Contributor
  • **
  • Posts: 439
  • Country: us
    • Forever Tinkering
@rexxar: I was just going over your schematic regarding the fets and it occurred to me that I only have single colour LEDs (at the moment anyway). Do I need to use all the fets or can I omit some? If so, which ones?
Nah, you just need one FET per LED die. I need to control four LEDs individually, so I have four FETs to switch them. If you just have one color, then you just need one FET.

Quote
One more question about PB1 and 2. The audio amp requires a live and ground per channel (not saying you didn't know this, just running through the sequence), do either of the PB lines act as ground in this case, or am I missing something (again)?

I get that each is 8bit and together make 16bit but not sure how it relates to ground for the amp module.
Generally it's fine to just tie all the grounds together. This has some special purpose in audio circuitry that I don't know a whole lot about, but just tying all the grounds together should be fine in your case.

Quote
Part of me wanted to put one on each stereo channel and use common on the inputs, but after some more thought it didn't seem right as that would equate to 8 bit stereo on the output, not combined 16 bit.
Correct. You need to combine and filter the output from the uC before it goes into the amp. I suppose technically you could do the combination and filtering after the amp, but you'd probably get poor results.

Quote
For a mono amp logic dictates as you stated, one on each of the inputs, just can't quite wrap my brain around it, but that's how it's routed for now anyway.
Look at it like this: you can take an 8-bit byte and represent 256 unique values, right? If you take that number and convert it into a voltage, you can make a sine wave (or any wave) by outputting the correct voltage at the correct time. However, since you only have 256 values, your resolution is very limited. Your wave will be really blocky, and it will sound, well, like 8 bit. If you have 16 bits, however, you now have 65,553 unique values! With that much resolution, you can generate a pretty clean waveform that will sound nice. What the SDAudio library does is use one output to represent the lower 8 bits, and another for the higher 8 bits. If you add these together, you can get close to the full 16 bit resolution, leaving you with a nice clean audio waveform. This isn't exactly what's going on in this library, but it's close enough to give you an idea how it works.

Quote
Talking of mono amp modules, they're only 12 x 6.5 mm. I managed to shorten the bus veriant using the footprint for that one by quite a bit, it used to be the longest section. If I can work out the fet situation I can most likely shorten the PSU section too.
I really can't tell what you're doing with your board layout. :\ What's going on in the center row? The middle one is the SD card, but what's the thing on the left? Pullups? Or some sort of R/C thing? I guess the one on the right is a headphone jack?

OH. You're using a premade Arduino board, aren't you? That explains why I don't see a footprint for the ATmega.

It looks like you have some holes connected directly to the ground plane. You really want to add thermal reliefs on those. You have a huge mass of copper pulling heat away from your iron, it will be very hard to solder those pins. Same goes for the SMD parts. I'm kind of surprised your program didn't add those automatically.
 

Offline PeterFW

  • Frequent Contributor
  • **
  • Posts: 577
  • Country: de
    • Stuff that goes boom
I can no longer tell who does what, were or when and i have to admit i do not want to read the whole thread again.
But... :)

It looks like you are routing the board as you go alog, without a prototype.
That will bite you in the arse if you have not build this circuit.
If would adivse you to put everything at least on a protoboard or breadboard before routing and spending too much time on the schmematic.

At first, make shure everything works, then comes the board.
You will spend the same amount of time cutting and rewiring your first PCB if you do not build a prototype first.
This is a very simple circuit, it should not be a problem make a rats nest of wire on a proto board.
 

Offline CanobiTopic starter

  • Regular Contributor
  • *
  • Posts: 94
  • Country: gb
@rexxar: I was just going over your schematic regarding the fets and it occurred to me that I only have single colour LEDs (at the moment anyway). Do I need to use all the fets or can I omit some? If so, which ones?
Nah, you just need one FET per LED die. I need to control four LEDs individually, so I have four FETs to switch them. If you just have one color, then you just need one FET.

I thought that might be the case. The schematic shows a couple of them linked to the uC pins, which one do I go for if using just one fet?

Quote
One more question about PB1 and 2. The audio amp requires a live and ground per channel (not saying you didn't know this, just running through the sequence), do either of the PB lines act as ground in this case, or am I missing something (again)?

I get that each is 8bit and together make 16bit but not sure how it relates to ground for the amp module.
Generally it's fine to just tie all the grounds together. This has some special purpose in audio circuitry that I don't know a whole lot about, but just tying all the grounds together should be fine in your case.

Analogue circuits sound pretty complex from what I've garnered so far, one of the reasons I opted to use an amp module so I didn't have to deal with special layout considerations.

Quote
Part of me wanted to put one on each stereo channel and use common on the inputs, but after some more thought it didn't seem right as that would equate to 8 bit stereo on the output, not combined 16 bit.
Correct. You need to combine and filter the output from the uC before it goes into the amp. I suppose technically you could do the combination and filtering after the amp, but you'd probably get poor results.

If combining the output happens prior to the amp, is that done via code or componants?

Quote
For a mono amp logic dictates as you stated, one on each of the inputs, just can't quite wrap my brain around it, but that's how it's routed for now anyway.
Look at it like this: you can take an 8-bit byte and represent 256 unique values, right? If you take that number and convert it into a voltage, you can make a sine wave (or any wave) by outputting the correct voltage at the correct time. However, since you only have 256 values, your resolution is very limited. Your wave will be really blocky, and it will sound, well, like 8 bit. If you have 16 bits, however, you now have 65,553 unique values! With that much resolution, you can generate a pretty clean waveform that will sound nice. What the SDAudio library does is use one output to represent the lower 8 bits, and another for the higher 8 bits. If you add these together, you can get close to the full 16 bit resolution, leaving you with a nice clean audio waveform. This isn't exactly what's going on in this library, but it's close enough to give you an idea how it works.

Great explanation, totally get it now  :-+

Quote
Talking of mono amp modules, they're only 12 x 6.5 mm. I managed to shorten the bus veriant using the footprint for that one by quite a bit, it used to be the longest section. If I can work out the fet situation I can most likely shorten the PSU section too.
I really can't tell what you're doing with your board layout. :\ What's going on in the center row? The middle one is the SD card, but what's the thing on the left? Pullups? Or some sort of R/C thing? I guess the one on the right is a headphone jack?

One on the the left is the charge status LED board. Initially I was going to use low volt through hole LEDS so I could mount the pm directly in the hilt. They didn't work on my proto board and found that SMDs did, so my only other option is to use light pipes.

As luck would have it, one of the A/C drives we started manufacturing for Eaton at work has triple spot light pipes and early plastics were a complete disaster at the assembly phase so managed to harvest quite a few from the plastic scrap bins.

The one on the right is for the tactile momentary pushbutton switch and the two "wings" with the holes are bolt for mounting it to the hilt.

OH. You're using a premade Arduino board, aren't you? That explains why I don't see a footprint for the ATmega.

Yes, while I still have the file for an on board uC, I thought it might be be good idea to make a working proto using the arduino I already had since everything between the charger/PSU and LED are new to me.

It looks like you have some holes connected directly to the ground plane. You really want to add thermal reliefs on those. You have a huge mass of copper pulling heat away from your iron, it will be very hard to solder those pins. Same goes for the SMD parts. I'm kind of surprised your program didn't add those automatically.

Never needed them before as all the boards I've made so far have been pretty small, and mostly simple enough not to need ground planes. Only just changed to photo etch resist too, toner transfer doesn't like large ground planes, the excess ink make things shift around and smudge regardless of how careful I am.

Thanks for bringing it to my attention, advice like that is gold dust, so will be implimenting them from here on in. The devil's in the detail at the end of the day  :-+
 

Offline Tombs Balsam

  • Newbie
  • !
  • Posts: 9
Glad to see this posts.
I alomst reading each reply by rexxar, also Peter
They have many good suggestions and many useful links. It can study well from them

And for the sound process, SD card would be a goood choice. Easy to handle.

As I am a newly in electrical design, it is really very useful for me.
Here as I read that you have applications of PCBs, I can share one fab. which hope it can be useful for Canobi.
pcbway.com/e,

Following is the PCBs I ordered last month, 2 kinds, the blue is 2layer,1.6mm Blue sold mask. It is like the size of a coin. And the Red PCB is 4 layer, Red sold-maske. Feel good.  ;D And Erin shows me very good service. Share here for every guys.





Good luck for your design, Canobi

Eosintic

it is a good suggestion for me. I am just want to look for a fab in China.
I will try with www.pcbway.com/e, hope it be my good choose for my PCB.
Thanks for sharing.  ;)

Tombs
 

Offline miguelvp

  • Super Contributor
  • ***
  • Posts: 5550
  • Country: us
My  :bullshit: is pegged at 11.

https://www.eevblog.com/forum/projects/do-you-flood-your-pcbs/msg675414/#msg675414

Edit, adding quote from other thread:
Something I have wondered for a while - when, if ever, should you flood the top and bottom of your PCBs with copper?

Mike

What do you mean by this? flood  = Etching the cooper?
I think it is a good way to choose with a PCB fab, which I thick maybe better than making at home.
I just a got a good recommend of a Chinese fab, you can also have a try www.pcbway.com/e
Hope it can help you

You need one and also recommend it within minutes? Same registration date as the other poster?

There is no need to try to trick forum members, just post on the buy sell or on the pcb manufacturers section with no tricky businesses.

Glad to see this posts.
I alomst reading each reply by rexxar, also Peter
They have many good suggestions and many useful links. It can study well from them

And for the sound process, SD card would be a goood choice. Easy to handle.

As I am a newly in electrical design, it is really very useful for me.
Here as I read that you have applications of PCBs, I can share one fab. which hope it can be useful for Canobi.
pcbway.com/e,

Following is the PCBs I ordered last month, 2 kinds, the blue is 2layer,1.6mm Blue sold mask. It is like the size of a coin. And the Red PCB is 4 layer, Red sold-maske. Feel good.  ;D And Erin shows me very good service. Share here for every guys.





Good luck for your design, Canobi

Eosintic

it is a good suggestion for me. I am just want to look for a fab in China.
I will try with www.pcbway.com/e, hope it be my good choose for my PCB.
Thanks for sharing.  ;)

Tombs
« Last Edit: May 18, 2015, 03:26:54 am by miguelvp »
 

Offline Tombs Balsam

  • Newbie
  • !
  • Posts: 9
My  :bullshit: is pegged at 11.

https://www.eevblog.com/forum/projects/do-you-flood-your-pcbs/msg675414/#msg675414

Edit, adding quote from other thread:
Something I have wondered for a while - when, if ever, should you flood the top and bottom of your PCBs with copper?

Mike

What do you mean by this? flood  = Etching the cooper?
I think it is a good way to choose with a PCB fab, which I thick maybe better than making at home.
I just a got a good recommend of a Chinese fab, you can also have a try www.pcbway.com/e
Hope it can help you

You need one and also recommend it within minutes? Same registration date as the other poster?

There is no need to try to trick forum members, just post on the buy sell or on the pcb manufacturers section with no tricky businesses.

Glad to see this posts.
I alomst reading each reply by rexxar, also Peter
They have many good suggestions and many useful links. It can study well from them

And for the sound process, SD card would be a goood choice. Easy to handle.

As I am a newly in electrical design, it is really very useful for me.
Here as I read that you have applications of PCBs, I can share one fab. which hope it can be useful for Canobi.
pcbway.com/e,

Following is the PCBs I ordered last month, 2 kinds, the blue is 2layer,1.6mm Blue sold mask. It is like the size of a coin. And the Red PCB is 4 layer, Red sold-maske. Feel good.  ;D And Erin shows me very good service. Share here for every guys.





Good luck for your design, Canobi

Eosintic

it is a good suggestion for me. I am just want to look for a fab in China.
I will try with www.pcbway.com/e, hope it be my good choose for my PCB.
Thanks for sharing.  ;)

Tombs

Your analysis sounds reasonable. But it is funny in the results.
Cause I am not a fab.
 

Offline miguelvp

  • Super Contributor
  • ***
  • Posts: 5550
  • Country: us
Your analysis sounds reasonable. But it is funny in the results.
Cause I am not a fab.

Really?

https://www.eevblog.com/forum/projects/metal-core-pcb-prototyping/msg675430/?topicseen#msg675430

Anyone know of a board house that will do low quantities of aluminum core PCB at a decent price?  Don't need anything fancy, just a few single-layer ~40mmx135mm rectangles so I don't have to hand wire another couple dozen RGBW LED star boards.  I looked at a number of the low cost places but none of them seem to offer metal core as a standard option, or maybe I just missed it.

Maybe you can have a try with www.pcbway.com/e
 

Offline CanobiTopic starter

  • Regular Contributor
  • *
  • Posts: 94
  • Country: gb
Thanks for the tip, however, I'm not in need of a PCB fabrication house, I have my own PCB fabrication facilities at home which I put to good use.

 :wtf: I have agree with Miguelvp now I've had a deeper look, too many coincidences to be lagit. As he says, post on the manufacturers section  :rant: (wow, never been thread jacked before, first time for everything I suppose).
 

Offline CanobiTopic starter

  • Regular Contributor
  • *
  • Posts: 94
  • Country: gb
I can no longer tell who does what, were or when and i have to admit i do not want to read the whole thread again.
But... :)

It looks like you are routing the board as you go alog, without a prototype.
That will bite you in the arse if you have not build this circuit.
If would adivse you to put everything at least on a protoboard or breadboard before routing and spending too much time on the schmematic.

At first, make shure everything works, then comes the board.
You will spend the same amount of time cutting and rewiring your first PCB if you do not build a prototype first.
This is a very simple circuit, it should not be a problem make a rats nest of wire on a proto board.

I did make a proto board for the charger circuit, but had help translating datasheet info into real world from the techies at work.

The hurdle for me regarding breadboarding is almost every component I have in my workshop is SMD.

However, your right, I should be prototyping for the rest as well. Necessity is the mother of invention they say, and you've sparked an idea that will allow me to follow your sound advice regardless.

I've made a few bits of PCB fab equipment which I've wanted to test out including a reflow hot plate, auto PCB drill press, fume hood with HEPA filter and an exposure box. Annoyingly I haven't had anything to etch recently in order to do so, this would be the perfect excuse to knock up a plethora of discreat SMD component breakouts so I can use them on a breadboard, win win :D
 

Offline PeterFW

  • Frequent Contributor
  • **
  • Posts: 577
  • Country: de
    • Stuff that goes boom
Quote from: Canobi link=topic=46652.msg675814#msg675814
The hurdle for me regarding breadboarding is almost every component I have in my workshop is SMD.

I will take some pictures for you, i think it is easier to explain that way how you can prototype pretty quick using SMD parts *and* have a easy job of recycling them.
This is the frankensteinian thing i got sitting on my desk at the moment:



Everything is seperated into blocks, each block holds one components with the external or additional circuitry.
Every pin if available on a pin header, those pin headers are so damn cheap on ebay thay you can you throw them at a circuit with a shovel.
Then everything is put on a cheap protoboard.



My apologies of not unplugging the TQFP 144 board, it is a bitch to get out :)
Some of the SMD boards are home etched, some i had done at a fab house and some are just straight of ebay.

One board holds the USB interface, one board the Li* charger, one the Li* protection, one the power selection, one for the dc-dc converter, sd-card, real time clock and so forth.
That way each component/circuit can be tested individually and then be addet to the "bigger picture" once i know it is working.
The sub-assembly boards can easily be used in the next project since they do not hold anny aplication specific wiring.

The whole mess is wired with enameled wire on the back, once you get that down it is very fast and simple.



There are other way to do this, but since i tend to make stupid mistakes from time to time it is very, very easy to pinpoint a problem.
I just have to unpluck the board, test if and i know if it is my wiring or the component.

Of course, this is not suited for high frequency stuff but my SPI bus is routed everywere along the bottom side of that board and is working just fine at 4 Mhz clock speed.
You can even run a decent amount of power this way, the only limiting factor is the resistance of the female headers.

I got plenty of those small smd boards with various other stuff in my parts bin. Different dc-dc converters, sensors, displays, buttons, processors and so forth.

You just have to keep track of the wiring, i use just a pice of paper and a pencil.
Since each component is just a "block" you do not need to scribble a real shematic.
At the end you transscribe that into a real schematic, i just cut and paste each sub components into the final one and wire them up.
 

Offline CanobiTopic starter

  • Regular Contributor
  • *
  • Posts: 94
  • Country: gb
Quote from: Canobi link=topic=46652.msg675814#msg675814
The hurdle for me regarding breadboarding is almost every component I have in my workshop is SMD.

I will take some pictures for you, i think it is easier to explain that way how you can prototype pretty quick using SMD parts *and* have a easy job of recycling them.
This is the frankensteinian thing i got sitting on my desk at the moment:



Everything is seperated into blocks, each block holds one components with the external or additional circuitry.
Every pin if available on a pin header, those pin headers are so damn cheap on ebay thay you can you throw them at a circuit with a shovel.
Then everything is put on a cheap protoboard.



My apologies of not unplugging the TQFP 144 board, it is a bitch to get out :)
Some of the SMD boards are home etched, some i had done at a fab house and some are just straight of ebay.

One board holds the USB interface, one board the Li* charger, one the Li* protection, one the power selection, one for the dc-dc converter, sd-card, real time clock and so forth.
That way each component/circuit can be tested individually and then be addet to the "bigger picture" once i know it is working.
The sub-assembly boards can easily be used in the next project since they do not hold anny aplication specific wiring.

The whole mess is wired with enameled wire on the back, once you get that down it is very fast and simple.



There are other way to do this, but since i tend to make stupid mistakes from time to time it is very, very easy to pinpoint a problem.
I just have to unpluck the board, test if and i know if it is my wiring or the component.

Of course, this is not suited for high frequency stuff but my SPI bus is routed everywere along the bottom side of that board and is working just fine at 4 Mhz clock speed.
You can even run a decent amount of power this way, the only limiting factor is the resistance of the female headers.

I got plenty of those small smd boards with various other stuff in my parts bin. Different dc-dc converters, sensors, displays, buttons, processors and so forth.

You just have to keep track of the wiring, i use just a pice of paper and a pencil.
Since each component is just a "block" you do not need to scribble a real shematic.
At the end you transscribe that into a real schematic, i just cut and paste each sub components into the final one and wire them up.

Now that's the kind of prototyping I can get behind  :-+

When you said birds nest of wires, I was picturing something like this:
 

Offline Tombs Balsam

  • Newbie
  • !
  • Posts: 9
Your analysis sounds reasonable. But it is funny in the results.
Cause I am not a fab.

Really?

https://www.eevblog.com/forum/projects/metal-core-pcb-prototyping/msg675430/?topicseen#msg675430

Anyone know of a board house that will do low quantities of aluminum core PCB at a decent price?  Don't need anything fancy, just a few single-layer ~40mmx135mm rectangles so I don't have to hand wire another couple dozen RGBW LED star boards.  I looked at a number of the low cost places but none of them seem to offer metal core as a standard option, or maybe I just missed it.

Maybe you can have a try with www.pcbway.com/e

Again that I am not a PCB fab, just a PCB customer.
Please do not like a "police" , thanks!
 

Offline CanobiTopic starter

  • Regular Contributor
  • *
  • Posts: 94
  • Country: gb
So I took a closer look at the mono amp and noticed there's a CS pin. Is that "chip select" for some kind of sleep mode perhaps?

 

Offline Richard Crowley

  • Super Contributor
  • ***
  • Posts: 4317
  • Country: us
  • KJ7YLK
If you knew what chip it is using, you could look it up in the published data sheet.
Do they provide any documentation at all?

Could it be "GS" (gain select?)

There have been many 1-channel (monaural) chip amps from all the way back to the LM386 and before.
For that matter the venerable LM386 is a long-time favorite of hobbyists and now available in SO package SMD.
 

Offline CanobiTopic starter

  • Regular Contributor
  • *
  • Posts: 94
  • Country: gb
If you knew what chip it is using, you could look it up in the published data sheet.
Do they provide any documentation at all?

Could it be "GS" (gain select?)

There have been many 1-channel (monaural) chip amps from all the way back to the LM386 and before.
For that matter the venerable LM386 is a long-time favorite of hobbyists and now available in SO package SMD.

Unfortunately I couldn't find any documentation on the site and there's no markings on the chip that I can see in the provided pic (it is from Aliexpress though).

Definitely looks like a C not a G which would make more sense given that it's an amp.

Thanks for the LM386 suggestion, will look into that one as I want to keep things as small as poss.
 

Offline rexxar

  • Frequent Contributor
  • **
  • Posts: 439
  • Country: us
    • Forever Tinkering
I've been looking around to see if there's another amp similar to yours with a CS pin. The only references I can come up with have the input decoupling capacitor labeled as CS. Is CS connected to a different pin than +5v?

I'm willing to bet money that the chip you bought is a knockoff of some other branded device (which is why it has no markings). Given how popular it is, it's not too unlikely that it's actually an LM386 clone. I say pull up the datasheet and compare the pinouts. The 386 has a separate bypass pin, so maybe someone labeled it CS instead?
 

Offline CanobiTopic starter

  • Regular Contributor
  • *
  • Posts: 94
  • Country: gb
I've been looking around to see if there's another amp similar to yours with a CS pin. The only references I can come up with have the input decoupling capacitor labeled as CS. Is CS connected to a different pin than +5v?

Yeh CS is a separate pin by the looks.

I'm willing to bet money that the chip you bought is a knockoff of some other branded device (which is why it has no markings). Given how popular it is, it's not too unlikely that it's actually an LM386 clone. I say pull up the datasheet and compare the pinouts. The 386 has a separate bypass pin, so maybe someone labeled it CS instead?

I haven't actually got it yet, though that module is the likeliest contender. I do have a micro stereo amp, though the mono is much much smaller again. Documents aren't available for the module from the site, though I did download the data sheet for the LM386.

It looks simple enough and it only needs a few extra componants too which is a bonus, though unlike the other ICs I have so far, there wasn't a PCB layout suggestion in the datasheet I found.

Haven't tackled analogue before, can I get away with it on a single sided pcb?



So far I've reworked the control bus layout to include the direct rail from the battery to LED (for the transistor it's live from battery to collector, drain to LED, Base to uC right?).

I also shuffled some of the SD card connector pins on the control bus for better track routing arrangement, then redid the sd card board to match them up. Didn't need much doing as it happens, the change only effected two tracks overall.


Added the 2w SMD resistor footing which I'd forgot to include (duh), and labeled the FTDI pins for easy identification.

It helped to reread the thread a few times, lots of overlooked gems  have been garnered. One thing I couldn't find any details on though was the actual pushbutton arrangement and what pins its connected to.



Regarding rail splits which I'm not used to either, do it need a diode going to the 5v rail so it doesn't feed into the 3.7v rail?

Taking the most common dropout voltage as worst case if I do (about 1.2v), that would mean the boost regulator would only get around 2.5v, is that going to be enough to drive it at 5v?
 

Offline Richard Crowley

  • Super Contributor
  • ***
  • Posts: 4317
  • Country: us
  • KJ7YLK
It looks simple enough and it only needs a few extra componants too which is a bonus, though unlike the other ICs I have so far, there wasn't a PCB layout suggestion in the datasheet I found.
Haven't tackled analogue before, can I get away with it on a single sided pcb?
Those things are very simple and forgiving. Sure you can use a single-side PCB. They were introduced decades before SMD technology was developed. It is probably one of the simplest parts of your project. Don't sweat it.
 

Offline CanobiTopic starter

  • Regular Contributor
  • *
  • Posts: 94
  • Country: gb
It looks simple enough and it only needs a few extra componants too which is a bonus, though unlike the other ICs I have so far, there wasn't a PCB layout suggestion in the datasheet I found.
Haven't tackled analogue before, can I get away with it on a single sided pcb?
Those things are very simple and forgiving. Sure you can use a single-side PCB. They were introduced decades before SMD technology was developed. It is probably one of the simplest parts of your project. Don't sweat it.

Sweet, thanks Richard :)


I found the post regarding the buttons pin connection, pin 32 (I'm assuming the other goes to ground right?)
 

Offline CanobiTopic starter

  • Regular Contributor
  • *
  • Posts: 94
  • Country: gb
After Peter mentioned miss wiring, I thought I'd go over the pro mini specs again to reacquaint myself with it (confidence is a good thing, but it can overstep the mark if left unchecked, guess what..?). Well so much of it starting to make more sense and I realised I'd made a minor mistake regarding choice of power input line.


Kind of thinking aloud here but there are 3 power line inputs that I can see on the pro mini: 2x Vcc and RAW. If I understand correctly what's said on the Sparkfun website, RAW is a line in to the on board regulator, so anything from 3.4v up to 12v can be used while both Vcc lines are 3v3 only.

Now, I'll have 5v and 3.7v rails once I've added the boost regulator to the PSU module. Max rating for the 3v3 lines is 3v6, Li-Po cell can max at 4v2. I'm guessing that using the lip direct rail won't work with RAW as the dropout would effect operation once the cell falls below optimal Vf.

Regulating the 3v7 rail for using the 3v3 line would suffer the same problem, and take up space/time.

That leaves the 5v rail to RAW in as the most logical choice then I think.

One of the 3v3 Vcc lines looks to be for the FTDI pins. I'm assuming it's power comes from the FTDI basic breakout board when connected so don't need to worry about connecting it from elsewhere.

At some point I need to add an MMA8452Q module to the control bus. Unfortunately, it's a 3v3 tolerant device which will also need regulated power from the PSU module. I could make another rail from the 5v to a regulator for the accelerometer. There's still some unused pins on the PSU header connector.

Just out of interest, anyone know if there are any dedicated PCB to PCB interconnectors out there?

Headers are OK to a point but from a durability point was thinking about trying to find something a little more secure to attache them together with. Kind of like lockable/latching ribbon cable connectors (though right angle mount and without the ribbon). 
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf