• Electrical Engineering V2
    5,003 replies, posted
Think this board is nearly ready for primetime! [img]http://i.imgur.com/7SEFGsH.png[/img] The crystal is huge, whoops :v: I've added a crystal + caps, an infrared LED, an infrared receiver (which draws like a bloody milliamp, so its VCC actually goes to an IO pin so I can switch it on and off), a connector for the buzzer (actually a solder jumper footprint), a cap on the LCD header, more and better clamp diodes, and 22ohm resistors on the logic analyzer lines. Need to do some more simulation, I'll let it sit for at least a few days before I go sending anything off.
[QUOTE=r0b0tsquid;45513650]Think this board is nearly ready for primetime! [img]http://i.imgur.com/7SEFGsH.png[/img] The crystal is huge, whoops :v: I've added a crystal + caps, an infrared LED, an infrared receiver (which draws like a bloody milliamp, so its VCC actually goes to an IO pin so I can switch it on and off), a connector for the buzzer (actually a solder jumper footprint), a cap on the LCD header, more and better clamp diodes, and 22ohm resistors on the logic analyzer lines. Need to do some more simulation, I'll let it sit for at least a few days before I go sending anything off.[/QUOTE] So you said you were going to charge the battery via the ICSP jack, how are you going to do that without a charge controller (unless you like flames)?
[QUOTE=ddrl46;45513772]So you said you were going to charge the battery via the ICSP jack, how are you going to do that without a charge controller (unless you like flames)?[/QUOTE] I changed my mind about that, the battery's going to have a JST on it plugged onto the header bottom-right. I'll disconnect that when I plug the programmer in, and charge the battery separately, it shouldn't need charging very often. [editline]blah[/editline] Oh actually, ICSP will be 5 volts won't it? That's too much for the screen, even if some people say it's 5V tolerant. If I connect ICSP -> battery charger IC -> VCC then it can charge the battery and provide ~4V to the board at the same time! That would be handy.
[QUOTE=r0b0tsquid;45513791]I changed my mind about that, the battery's going to have a JST on it plugged onto the header bottom-right. I'll disconnect that when I plug the programmer in, and charge the battery separately, it shouldn't need charging very often. [editline]blah[/editline] Oh actually, ICSP will be 5 volts won't it? That's too much for the screen, even if some people say it's 5V tolerant. If I connect ICSP -> battery charger IC -> VCC then it can charge the battery and provide ~4V to the board at the same time! That would be handy.[/QUOTE] Yes, most ICSP programmers put out 5V.
Okay, so I can use the lithium charger to drop that voltage for powering off the ICSP as well? That should be safe, right? Also, something I meant to ask you guys about - I have two clamp diodes in parallel. I know this is usually a bad idea, because of the negative tempco, but these diodes are only meant to conduct in exceptional conditions (they're fuse-blowers really, should only conduct very briefly), so they shouldn't be getting hot most of the time, so should this be okay? [editline]27th July 2014[/editline] Considering changing to side-mount 4mm plugs so that leads go in through the side of the case. Why are they so expensive?!
Designing an ECG frontend on a breadboard. [t]http://u.cubeupload.com/Chryseus/2pYNzw.jpg[/t] Not so easy :v:
[QUOTE=r0b0tsquid;45513928]Okay, so I can use the lithium charger to drop that voltage for powering off the ICSP as well? That should be safe, right? Also, something I meant to ask you guys about - I have two clamp diodes in parallel. I know this is usually a bad idea, because of the negative tempco, but these diodes are only meant to conduct in exceptional conditions (they're fuse-blowers really, should only conduct very briefly), so they shouldn't be getting hot most of the time, so should this be okay? [editline]27th July 2014[/editline] Considering changing to side-mount 4mm plugs so that leads go in through the side of the case. Why are they so expensive?![/QUOTE] You have to make sure your ICSP box also has a buffer on the output that takes the voltage it measures on the Vcc line so it doesn't try to communicate with your microcontroller at 5v.
Okay, lets try ebay again. Need two volt meters in the square style, ranged 0-150v. Only this time instead of 72 x 72mm I need the smaller 53 x 53mm meters. Found a buyer with the meter I want. Photo shows meters with identical case features and the scaling seems about right compared ot the small ammeters I didn't really intend to buy, only he lists it as being a 72 x 72mm meter. Here we go again.... Lets try another session of Russian Roulette. I can't get burned again, right?
Does anyone know of a part like the [url]http://www.linear.com/product/LT3652[/url] but instead of a 5V-40V VIN, more like 0V-12V VIN. I could chain a buck boost converter with a LiPo charger, but then I'd need another buck boost converter on the output. My current idea is to do something like the Adafruit solar charger which uses the MCP73871 and just have a buck boost converter after since I pretty much require 3.3V, but a more integrated solution would be nice.
[QUOTE=ddrl46;45514940]You have to make sure your ICSP box also has a buffer on the output that takes the voltage it measures on the Vcc line so it doesn't try to communicate with your microcontroller at 5v.[/QUOTE] I was just going to put some resistors on MISO MOSI SCK RST :v: [editline]27th July 2014[/editline] [QUOTE=pentium;45515180]Okay, lets try ebay again. Need two volt meters in the square style, ranged 0-150v. Only this time instead of 72 x 72mm I need the smaller 53 x 53mm meters. Found a buyer with the meter I want. Photo shows meters with identical case features and the scaling seems about right compared ot the small ammeters I didn't really intend to buy, only he lists it as being a 72 x 72mm meter. Here we go again.... Lets try another session of Russian Roulette. I can't get burned again, right?[/QUOTE] 72 Chinese mm = 53 US mm, it's because you use Imperial
[QUOTE=r0b0tsquid;45515588] 72 Chinese mm = 53 US mm, it's because you use Imperial[/QUOTE] [img]http://facepunch.com/fp/flags/ca.png[/img]
Here's a useful book about instrumentation amplifiers: [url]http://www.analog.com/static/imported-files/design_handbooks/5812756674312778737Complete_In_Amp.pdf[/url]
Oh my god wow. 500 page data sheets can be a bit overwhelming, but it's amazing what you can actually do with a humble AVR. I should be able to get accurate frequency measurements up to 4MHz, or half of my processor clock, by routing a signal from the logic analyzer header straight to the AVR's internal 16 bit counter input (CTR1). The only thing that's annoying is that the T1 input is synchronized to the CPU clock, otherwise I could measure frequencies much higher than 8MHz without any issues! I could just put an external frequency divider/counter on the board but I think one of my goals here is to push an AVR as far as I can :v: [editline]blah[/editline] Also, apparently you can clock the ADC up to 2MHz (~150kSa/s) and still get about 8 ENOB accuracy. That's verging on the realms of usefulness for audio stuff. Current state of the board for anyone following: [IMG]http://i.imgur.com/ei3Mmgg.png[/IMG] [t]http://i.imgur.com/J8i0sgZ.png[/t] There's a lithium charger top-right with a solder jumper to select the charge current at 100mA or 280mA. I've put an LED on top which is on while the battery is charging and switches off when it's done - neat feature of the charging IC! Put series resistors on the SPI and RST lines at the ICSP jack (lazy man's level conversion...) and put a decoupling cap on AREF, after a fair bit of reading I've decided I really don't want to connect AREF to AVCC externally :v: Please yell at me for all the stupid things that I'm doing!
[QUOTE=r0b0tsquid;45522533]Oh my god wow. 500 page data sheets can be a bit overwhelming, but it's amazing what you can actually do with a humble AVR. I should be able to get accurate frequency measurements up to 4MHz, or half of my processor clock, by routing a signal from the logic analyzer header straight to the AVR's internal 16 bit counter input (CTR1). The only thing that's annoying is that the T1 input is synchronized to the CPU clock, otherwise I could measure frequencies much higher than 8MHz without any issues! I could just put an external frequency divider/counter on the board but I think one of my goals here is to push an AVR as far as I can :v: [editline]blah[/editline] Also, apparently you can clock the ADC up to 2MHz (~150kSa/s) and still get about 8 ENOB accuracy. That's verging on the realms of usefulness for audio stuff. Current state of the board for anyone following: [IMG]http://i.imgur.com/ei3Mmgg.png[/IMG] [t]http://i.imgur.com/J8i0sgZ.png[/t] There's a lithium charger top-right with a solder jumper to select the charge current at 100mA or 280mA. I've put an LED on top which is on while the battery is charging and switches off when it's done - neat feature of the charging IC! Put series resistors on the SPI and RST lines at the ICSP jack (lazy man's level conversion...) and put a decoupling cap on AREF, after a fair bit of reading I've decided I really don't want to connect AREF to AVCC externally :v: Please yell at me for all the stupid things that I'm doing![/QUOTE] Disable the tValues and bValues layers in EAGLE, there is no need for that on a PCB.
If you're using a 5V ICSP you'd need a level shifter on the MISO, MOSI and SCK lines, it's apparently possible for the atmega32 to tolerate 5V although it's way outside of the maximum specified of VCC + 0.7V, I suspect that's what your doing with the 100 ohm resistors but it would be better to use something like a 74HC4050 to do the job.
[QUOTE=Chryseus;45522873]If you're using a 5V ICSP you'd need a level shifter on the MISO, MOSI and SCK lines, it's apparently possible for the atmega32 to tolerate 5V although it's way outside of the maximum specified of VCC + 0.7V, I suspect that's what your doing with the 100 ohm resistors but it would be better to use something like a 74HC4050 to do the job.[/QUOTE] If you go above VCC + 0.7V, the excess voltage drops over the protection diodes, which might fry them.
[QUOTE=DrDevil;45522969]If you go above VCC + 0.7V, the excess voltage drops over the protection diodes, which might fry them.[/QUOTE] Quite unlikely with a series resistor, the only real negative to doing it this way is possible distortion of the serial data. I would increase the resistors to 1k though.
[QUOTE=Chryseus;45523079]Quite unlikely with a series resistor, the only real negative to doing it this way is possible distortion of the serial data. I would increase the resistors to 1k though.[/QUOTE] I think their maximum current is mentioned in the datasheet, so it should be an easy calculation.
[t]http://u.cubeupload.com/Chryseus/qDWjOt.png[/t] ECG design is coming along rather well, I can finally make out the positive and negative peak of the QR wave but the rest is hidden in 50Hz and 100Hz noise, going to try a higher order filter and feed back the inverted common mode noise into myself which should clean it up a bit. Might get a better instrumentation amp as well since the INA126P has a somewhat poor CMRR and current noise compared to something like the AD620, it's really fucking expensive though at £7 each. Once it works I'll do a PCB for it.
Hello folks! I have purchased two solar panels that are 7.5 watts from my local store for 50 bucks a piece (they were regular 100 dollars a piece so i gots me a dealio!) I also have one of those portable battery chargers for mobile phones. (5200 mAh) I have a couple questions regarding this! 1. Would it be possible to somehow run a raspberry pi Model B off of this while still maintaining enough battery power to last a night and with ~8 hours of sunlight during the day? I'm not 100% sure what the calculations required are in order to find this out. 2. The solar panels have a USB output. Would it be possible to connect the positive leads from each of them together and the grounds from them together (hence in parallel) and keep the same 5 volts but increase the amperage, and then connect the output from the solar cells in parallel to the portable battery pack in order to charge it? Would I have to worry about things like voltage drops as the sun goes down? I'm kind of new to this topic of solar power, so anything anyone can provide would be cool! Thanks!
[QUOTE=RoflKawpter;45530111]Hello folks! I have purchased two solar panels that are 7.5 watts from my local store for 50 bucks a piece (they were regular 100 dollars a piece so i gots me a dealio!) I also have one of those portable battery chargers for mobile phones. (5200 mAh) I have a couple questions regarding this! 1. Would it be possible to somehow run a raspberry pi Model B off of this while still maintaining enough battery power to last a night and with ~8 hours of sunlight during the day? I'm not 100% sure what the calculations required are in order to find this out. 2. The solar panels have a USB output. Would it be possible to connect the positive leads from each of them together and the grounds from them together (hence in parallel) and keep the same 5 volts but increase the amperage, and then connect the output from the solar cells in parallel to the portable battery pack in order to charge it? Would I have to worry about things like voltage drops as the sun goes down? I'm kind of new to this topic of solar power, so anything anyone can provide would be cool! Thanks![/QUOTE] The calculations you need are power = energy / time and (as a result) time = energy / power. Assuming you manage to run both solar panels at full capacity for 8 hours (which is quite optimistic), you'll get 8 * 2 * 7.5 = 120 joules of energy. A model B takes ~750mA of current at 5V, which is 3.75 watts (a model B+ takes only about 600mA!). Over the course of 24 hours this adds up to 90 joules of energy. So the answer is yes, [I]just[/I], if you can manage a 75% in-out efficiency for panel to battery to RPi (which is pretty high efficiency actually). We could do with a few more specs for the panels really, like voltage and maximum power point etc. Useful links: [URL]http://en.wikipedia.org/wiki/Electric_power[/URL] [URL]http://en.wikipedia.org/wiki/Power_(physics)[/URL] [editline]blah[/editline] My bad, 700mA is apparently the recommended supply current capacity for the RPi B, it should draw no more than about 400mA if you're not doing any graphics (you haven't mentioned a display). In that case yes, it's definitely doable, provided the weather is sunny.
Here is what I'm getting out of my ECG at the moment: [img]http://i.cubeupload.com/efkYjE.png[/img] It's mostly hidden by the 50Hz and 100Hz noise, a higher order filter should hopefully deal with it.
[QUOTE=RoflKawpter;45530111]Hello folks! I have purchased two solar panels that are 7.5 watts from my local store for 50 bucks a piece (they were regular 100 dollars a piece so i gots me a dealio!) I also have one of those portable battery chargers for mobile phones. (5200 mAh) I have a couple questions regarding this! 1. Would it be possible to somehow run a raspberry pi Model B off of this while still maintaining enough battery power to last a night and with ~8 hours of sunlight during the day? I'm not 100% sure what the calculations required are in order to find this out. 2. The solar panels have a USB output. Would it be possible to connect the positive leads from each of them together and the grounds from them together (hence in parallel) and keep the same 5 volts but increase the amperage, and then connect the output from the solar cells in parallel to the portable battery pack in order to charge it? Would I have to worry about things like voltage drops as the sun goes down? I'm kind of new to this topic of solar power, so anything anyone can provide would be cool! Thanks![/QUOTE] I also recommend you look into [URL="http://en.wikipedia.org/wiki/Maximum_power_point_tracking"]MPPT[/URL].
[QUOTE=Chryseus;45534106]Here is what I'm getting out of my ECG at the moment: [img]http://i.cubeupload.com/efkYjE.png[/img] It's mostly hidden by the 50Hz and 100Hz noise, a higher order filter should hopefully deal with it.[/QUOTE] Why don't you use 2 notch filters?
[QUOTE=DrDevil;45535520]Why don't you use 2 notch filters?[/QUOTE] I've already got one doing the 50Hz, however the stop band is very narrow so it needs some tuning, the main filter also has a very gentle roll-off at -20dB per decade which I think is the main problem, I only really need a bandwidth of 0.05Hz to 20Hz for a reasonable result. It might make sense in this case to use an IC filter of a high order rather than make one myself.
[QUOTE=Chryseus;45535610]I've already got one doing the 50Hz, however the stop band is very narrow so it needs some tuning, the main filter also has a very gentle roll-off at -20dB per decade which I think is the main problem, I only really need a bandwidth of 0.05Hz to 20Hz for a reasonable result. It might make sense in this case to use an IC filter of a high order rather than make one myself.[/QUOTE] One thing you could do is use a digital filter to remove the noise if you digitalize the signal at any point.
[QUOTE=DrDevil;45536233]One thing you could do is use a digital filter to remove the noise if you digitalize the signal at any point.[/QUOTE] It might be even better this way because you know, analog filter might destroy useful data which you can't recover where as in digital, you just write another filter.
[QUOTE=Fourier;45537630]It might be even better this way because you know, analog filter might destroy useful data which you can't recover where as in digital, you just write another filter.[/QUOTE] That probably would be the best method, all the signal processing can be done inside a DSP, but I can't be bothered with that so I'm just going to build the filters, also things like DSPs tend to consume quite a bit of power which makes it useless for my application, I probably will include an optional on board low power MCU with a built in ADC so you can send the signal to a PC for more processing or store it. Dunno what I'm going to do about the communication, it will have to be completely isolated for obvious reasons. I'm going to try a 8th order sallen key filter with a 0.2dB chebyshev response, that should hopefully do the job, 50Hz will be around -80dB down using 4 op-amps.
I finally etched, drilled, and soldered a circuit board only to discover the schematic I'd printed had the resistor going to the wrong IC pin. Oh well, back to kinko to get more things laser printed. Does anyone else have experience with DIY pcb manufacturing? I've been able to manage ~32 mil as the smallest but I've read online some people are getting down to 10mil traces.
[QUOTE=Dolton;45538829]I finally etched, drilled, and soldered a circuit board only to discover the schematic I'd printed had the resistor going to the wrong IC pin. Oh well, back to kinko to get more things laser printed. Does anyone else have experience with DIY pcb manufacturing? I've been able to manage ~32 mil as the smallest but I've read online some people are getting down to 10mil traces.[/QUOTE] I assume you're using toner transfer, it's all about the paper and the heating duration, the best paper in my experience is really cheap magazine paper that is glossy but slightly rough, I suggest trying multiple different papers and seeing what works best. As for heating time I use a hot iron on the maximum setting, put a sheet of normal paper over the magazine paper and leave the iron on top for about 1 minute, longer for larger boards, after that I soak it in hot water before gently rubbing the paper off. A laminator may also be used for similar or better results, although these often need modification to operate at higher temperatures. Also if you are getting it printed for you then they may be using toner saving, you want the maximum amount of toner for best results.
Sorry, you need to Log In to post a reply to this thread.