[QUOTE=Chryseus;45900175]Who cares as long as it's cheap.[/QUOTE]
This is factually accurate (and consistent with the attitudes of a lot of big companies) but so out of touch with reality that it makes my stomach turn. Working in a factory is not fun.
How's your ECG coming along man?
My dad's friend told me his sub was working fine once a year ago and suddenly started to make a humming noise. When I would plug it in, it made a really loud (I'm almost certain it's 60hz hum) buzzing sound. When I turned the switch to a different position the noise would become much more quiet. Playing sound through it only mixed in with the hum and made weird distortion sounds.
I opened it up and looked at the amp plate. I noticed the two filter caps (they were the shitty no name type) had bulged at the top. I'm suspecting those as the main offender for the noise. I noticed slight burning of the glue around the caps by a few surrounding components. The model is a mirage omni s8, and lots of people seem to have the humming problem. Do any of you think it's the caps or something else that is causing distortion and hum?
[QUOTE=Sombrero;45906873]My dad's friend told me his sub was working fine once a year ago and suddenly started to make a humming noise. When I would plug it in, it made a really loud (I'm almost certain it's 60hz hum) buzzing sound. When I turned the switch to a different position the noise would become much more quiet. Playing sound through it only mixed in with the hum and made weird distortion sounds.
I opened it up and looked at the amp plate. I noticed the two filter caps (they were the shitty no name type) had bulged at the top. I'm suspecting those as the main offender for the noise. I noticed slight burning of the glue around the caps by a few surrounding components. The model is a mirage omni s8, and lots of people seem to have the humming problem. Do any of you think it's the caps or something else that is causing distortion and hum?[/QUOTE]
The caps definitely need replacing for a start. It sounds like they've been damaged by the heat of the surrounding components.
If by filter caps you mean the output filter caps on the power supply then they could definitely be the culprit, as your power supply would then have huge ripple at double the line frequency, which would end up on your output.
[IMG_THUMB]http://i.imgur.com/6fE7ehR.jpg[/IMG_THUMB]
Got the display working, the 27V part isn't fantastic but works and avoids any niche parts. Driving the filament with a square wave AC current to remove any colour gradient.
[QUOTE=r0b0tsquid;45906411]How's your ECG coming along man?[/QUOTE]
I'm considering replacing the front end with a purpose designed chip, or perhaps directly in to an ADC (after amplification) and let the computer deal with it, analog filtering isn't really giving me that great results.
[QUOTE=Chryseus;45907956]I'm considering replacing the front end with a purpose designed chip, or perhaps directly in to an ADC (after amplification) and let the computer deal with it, analog filtering isn't really giving me that great results.[/QUOTE]
Ahh okay. Digital feels like a cop-out but it's the best way sometimes!
Out of interest, how good a result could you expect to get if you used one of those USB scopes for acquisition and then just wrote the signals processing side?
Nowhere near as fun but...
[QUOTE=r0b0tsquid;45908017]Ahh okay. Digital feels like a cop-out but it's the best way sometimes![/QUOTE]
Yeah when it comes to filters you can't really beat digital, at least at lower frequencies, analog is still the only option at RF unless you down convert it first.
[QUOTE=r0b0tsquid;45908017]Out of interest, how good a result could you expect to get if you used one of those USB scopes for acquisition and then just wrote the signals processing side?[/QUOTE]
The result would probably be quite decent depending on the noise floor of the scope, you'll of course still need the analog front end to amplify the signal and reject as much noise as possible, also you'd have to do something about isolation.
A really good quality one would use a low noise 24 bit audio ADC which is perfect for the job.
[img]http://i.imgur.com/2X1IZyt.jpg[/img]
Little Resonant powersupply i made c:
Working on the -big one- Managed to draw 1 1/2 ft arcs from it and its only a half bridge. at full go, i would expect to draw out.. perhaps 3 or 4ft hot arcs maybe even! :)
[editline]6th September 2014[/editline]
[media]http://www.youtube.com/watch?v=92rUj7XKlxQ[/media]
OOOOOH BOY that was fun.... towards the end is the best bit.
[QUOTE=Chryseus;45908674]Yeah when it comes to filters you can't really beat digital, at least at lower frequencies, analog is still the only option at RF unless you down convert it first.
The result would probably be quite decent depending on the noise floor of the scope, you'll of course still need the analog front end to amplify the signal and reject as much noise as possible, also you'd have to do something about isolation.
A really good quality one would use a low noise 24 bit audio ADC which is perfect for the job.[/QUOTE]
Oh okay, I guess ECG is low-frequency and super-low noise, whereas those little scopes are willing to compromise on noise in order to whack the frequency up? But cool! That does look like a really fun project.
The EEVblog guy did an ECG teardown that I found quite interesting.
[editline]6th September 2014[/editline]
People who have used AVR GCC inline assembly before, have you ever come across this error?
[code]In function 'int main()':
warning: asm operand 0 probably doesn't match constraints
error: impossible constraint in 'asm'[/code]
Googling for it gives some pretty cryptic results, there's a bug report on the AVR GCC site which a developer has closed as "not a bug", followed by a long argument in the comments.
I get the problem with this code:
[code]uint8_t logic_data[256];
volatile uint8_t* logic_ptr = logic_data;
volatile uint16_t logic_count = 0x100;
asm volatile (
":toptoptop"
"in r16, PINB \n\t" // 1 cycle
"swap r16 \n\t" // 1 cycle
"sbiw Y, 1 \n\t" // 2 cycles
"andi r16, 0xf0 \n\t" // 1 cycle
"mov r18, __SREG__ \n\t" // 1 cycle
"andi r18, 0x02 \n\t" // 1 cycle (mask off Z bit)
"nop \n\t"
"in r17, PINB \n\t" // 1 cycle
"andi r17, 0x0f \n\t" // 1 cycle
"or r16, r17" // 1 cycle
"st X+, r16 \n\t" // 2 cycles
"tst r18" // 1 cycle
"brne toptoptop" // 2 cycles
::
"I" ((uint8_t)PINB),
"x" (logic_ptr),
"y" (logic_count)
: "r16", "r17", "r18"
);
[/code]
It's for sampling the four-bit logic header on the multimeter - I need to use assembly in order to get predictable timing, so that I can sample at a steady 1MSa/s.
[editline]7th September 2014[/editline]
Never mind, inline assembly is more trouble than it's worth. I looked up the C calling convention for AVRs and just wrote an assembly function in a separate file.
[QUOTE=Amiga OS;45910554]Microsoft sent me a Galileo board last week, before I wipe Windows off the thing and stick a full Debian image on there, are there any starter Arduino projects that are absolutely worth doing?[/QUOTE]
I will give you my million idea. Please make it real.
Make a multi-functional clock, which has (normally) a wake up song, and (RGB) wake up light.
There is the magic. The clock also has HTTP server, which serves rich HTML client (app).
In this HTML app you would be able to configure the device. You can almost program it, but keep it simple.. you can configure wake up time with wake up light (and all advanced stuff like RGB gradient).
This clock would have WiFi capabilities (ofcourse). For wake up song you can upload your MP3 files (which also stays later on for choosing). Because clock has internet, you can also choose your own Youtube music (or some other streaming service)
You can also make then the RGB led react to the Youtube video.
Oh and lets not forget native app for iOS and Android, for simple configuration.
Btw, this lamp has only wake up light and sound and clock display. It costs 99$.
[IMG]http://images.philips.com/is/image/PhilipsConsumer/HF3470_60-RTP-global-001?wid=960&hei=500&fit=fit&$jpgsmall$[/IMG]
If you add simple mini PC with Wifi, and sold it for 70$, it would be fucking gold rush.
(Yeah I am obsessed with wake up lamps, don't know why)
Why not just use a Raspberry Pi for $40? Those Galileo's are $75 bucks.
First logic data captured by the meter:
[IMG]http://i.imgur.com/livEyQV.png[/IMG]
Screens [I]still[/I] haven't arrived, so I had to go bit-banged serial -> PC logic analyser -> CSV export -> Python script -> Excel in order to display it.
The code is pretty tight:
[code].global logic_acquire_fast
; parameters: uint8_t* address, uint16_t count
logic_acquire_fast:
mov XH, r25 ; X points to the current position in the data array
mov XL, r24
mov ZH, r23 ; Z counts the remaining samples
mov ZL, r22
sbiw ZL, 2 ; test is at end of loop, so decrement the count by 2 since always executes
andi ZL, 0xfe ; Z must be even, because we subtract two and test for zero.
in r18, DDRB
andi r18, 0xf0
out DDRB, r18 ; Set logic pins to input
logic_loop:
in r18, PINB
swap r18
andi r18, 0xf0 ; read in from the port, swap to top and mask off bottom (3cyc)
sbiw ZL, 2 ; decrement count by 2 (2cyc)
in r20, SREG
andi r20, 0x02 ; read status register and mask for the Z bit (2cyc)
nop ; nop to bring to a round 8 cycles
in r19, PINB
andi r19, 0x0f
or r18, r19 ; read, mask and combine the input into r18 (3cyc)
st X+, r18 ; store the result in the output buffer and postincrement (2cyc)
tst r20 ; check for our zero flag from earlier (1cyc)
breq logic_loop ; branch to top of loop (2cyc) if our saved flag is zero, i.e. Z was not set
ret
[/code]
I have exactly 8 CPU cycles per sample, in which to read it in, pack it into a byte (I store 2 4-bit samples in a byte to increase buffer length), increment the data pointer and write to the buffer, decrement the 16bit counter, test it and branch back to the top. Not enough time! I unrolled the loop by 2 and perform the decrement and test with the first sample, save the status register, and then branch on that after the second sample. That gives me the extra cycle I need at the end to smoosh the samples together.
Assembly is lots of fun.
[editline]blah[/editline]
Horizontal axis is in microseconds.
[QUOTE=Cakebatyr;45912185]Why not just use a Raspberry Pi for $40? Those Galileo's are $75 bucks.[/QUOTE]
I imagine Galileo is a bit more powerful.
[QUOTE=Fourier;45914639]I imagine Galileo is a bit more powerful.[/QUOTE]
Possibly but still way overpowered for a simple wake up light no?
[QUOTE=ddrl46;45915496]Possibly but still way overpowered for a simple wake up light no?[/QUOTE]
Quite a bit yes, but he has Galileo and asked what to with it and I just have him an idea :).
Or he could make NSAClock, with integrated video camera with motion sensor and integrated microphone for recording :).
Well..... Thats ruined my day...... I do believe i just killed my x-ray transformer.... :c
[editline]7th September 2014[/editline]
I think... it might have survived, taking it apart there was a lot of smoke from the transformer oil and the terminals for power input have melted.... but i think it might have survived....
[QUOTE=nuttyboffin;45915866]Well..... Thats ruined my day...... I do believe i just killed my x-ray transformer.... :c
[editline]7th September 2014[/editline]
I think... it might have survived, taking it apart there was a lot of smoke from the transformer oil and the terminals for power input have melted.... but i think it might have survived....[/QUOTE]
[media]http://www.youtube.com/watch?v=Wn_iz8z2AGw[/media]
[QUOTE=Amiga OS;45910554]Microsoft sent me a Galileo board last week, before I wipe Windows off the thing and stick a full Debian image on there, are there any starter Arduino projects that are absolutely worth doing?[/QUOTE]
If you do make anything cool, could you post it at [URL="http://www.reddit.com/r/Galileo/"]/r/Galileo/[/URL]?
I'm trying to set it up as a good place for resources/projects, because the intel forums suck bigtime. It's hard to get going though.
Anyone want to know what happens when you clock an AVR's ADC at 4MHz and then try to look at a 10kHz sine wave?
[IMG]http://i.imgur.com/OOZxslz.png[/IMG]
That's what happens. :v:
[editline]8th September 2014[/editline]
2MHz is a [I]little[/I] better, that gives me a sample rate of 140kSa/s though which is not quite enough... I'm only aiming for it to be useful for audio stuff really.
How's your filtering on AVCC? What's your prescaler on the ADC? Has ADC Noise Reduction Mode worked for you? What about calibrating the ADC offset in code with a stable reference, or is your 5v or 3v3 source is stable enough?
Nonlinearity is quite common at the lower voltages on the ADC range, which might also have something to do with slight capacitance on that pin. Good luck!
(Always a useful [URL="http://www.djerickson.com/arduino/"]source[/URL])
[QUOTE=LoneWolf_Recon;45923816][b]What's your prescaler on the ADC?[/b] [/QUOTE]
ck/2
It's running at 4MHz, with a stated maximum of 200kHz if you want the full stated precision. errrr :v:
Apparently you only get about 6 ENOB at 4MHz (I'm unsure whether that's with noise reduction mode) and that wave only actually takes up about 1/4 of the ADC scale, I've just scaled it up. So it's not too terrible!
I'm avoiding noise reduction mode for now because speed is of the essence here (having the CPU sleeping while the ADC is working would cut my sample rate by 30%), otherwise I would be driving the ADC at a sane speed like I do for the rest of the acquisition.
The ADC is particularly slow to work with in assembly because the ADC registers are above the upper limit of the OUT opcode (which only has 6 bits of IO addressing reserved in the instruction), so you need to use the ST instruction, which takes 2 cycles on its own, plus setting the data byte and the address.
Here is the (horrible) code:
[code].global oscilloscope_fast
; parameters: uint8_t* address, uint16_t count
oscilloscope_fast:
mov XH, r25 ; X points to the current position in the data array
mov XL, r24
mov ZH, r23 ; Z counts the remaining samples
mov ZL, r22
sbiw ZL, 1
push YL
push YH
ldi YH, 0x00
ldi YL, ADMUX
ldi r18, (0x60 | VIN_V)
st Y, r18 ; AREF = VCC, left adjust result, mux = VIN_V
ldi YL, ADCSRB
ldi r18, 0x00
st Y, r18
ldi YL, ADCSRA
ldi r18, 0xc0
st Y, r18 ; ADC enabled, ck/2, start first conversion
ldi r19, 20
osc_fast_delay_loop:
dec r19
brne osc_fast_delay_loop
oscilloscope_fast_loop:
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop ; nop x17
ldi YL, ADCSRA
st Y, r18 ; start the next conversion (3 cyc)
ldi YL, ADCH
ld r19, Y ; result read happens here (3cyc)
st X+, r19 ; store the result in the data array (2cyc)
sbiw ZL, 1 ; decrement remaining count (2cyc)
brne oscilloscope_fast_loop ; jump back to start (2cyc)
pop YH
pop YL
ret[/code]
Thank you very much!
Gotcha, yeah Noise Reduction mode is kinda wonky when waking the CPU. I'm curious if you could use those spare NOP cycles for something else, maybe have another ADC with the same ADC module or another module and then average their result. Or have a simple smoothing/anti-aliasing function of the previous data point with the current one.
Or it could be your clock source itself, if you're using the internal RC oscillator it's fairly prone to temperature variation.
But you're probably using a crystal like your multimeter, whoops :v:
[QUOTE=LoneWolf_Recon;45926163]Gotcha, yeah Noise Reduction mode is kinda wonky when waking the CPU. I'm curious if you could use those spare NOP cycles for something else, maybe have another ADC with the same ADC module or another module and then average their result. Or have a simple smoothing/anti-aliasing function of the previous data point with the current one.
Or it could be your clock source itself, if you're using the internal RC oscillator it's fairly prone to temperature variation.
But you're probably using a crystal like your multimeter, whoops :v:[/QUOTE]
This [i]is[/i] the multimeter! :)
My desk at work:
[T]http://i.imgur.com/lOSkCy4.jpg[/T]
A bit messy but hey, I'm working :P
Inside the waffletray
[T]http://i.imgur.com/VtnFgiZ.jpg[/T]
Are those Atmel AVR chips? And what do you do specifically, board assembly?
[QUOTE=LoneWolf_Recon;45927944]Are those Atmel AVR chips? And what do you do specifically, board assembly?[/QUOTE]
I belive that they are AVRs.
Dassa whole lotta Atmel.
Can't make out the text perfectly but it looks like it says ATMEGA 128?
Why do you have a vacuum cleaner mounted to your desk ?
Soldering fumes?
Sorry, you need to Log In to post a reply to this thread.