The biohack.me forums were originally run on Vanilla and ran from January 2011 to July 2024. They are preserved here as a read-only archive. If you had an account on the forums and are in the archive and wish to have either your posts anonymized or removed entirely, email us and let us know.

While we are no longer running Vanilla, Patreon badges are still being awarded, and shoutout forum posts are being created, because this is done directly in the database via an automated task.

Proposed hardware components

Comments

Displaying comments 31 - 60 of 62
  1. your attiny has a hw i2c. since i2c is the same as twi, and twi is provided as part of the usi unit. chapter 15.3.4 , USI in two wire mode.
    for the southpaw we should use hw i2c anyway, it uses less clock cycles so it eats less battery. since you use the attiny85 you may wish to get a attiny44,too. those almost the same but with a lot more output pins in the QFN packing.
    if you want that thing working, feel free to send it to me and i'll write the code :)

    as for my part, i"m going to buy a function generator next week (the last part missing in my lab for years) so i can test out electrodes and wave forms etc, cause raping my soundcard for that aint too percise.
  2. oh, so it does. thanks for pointing that out - it still uses what looks like a very different method to the ATMega chips of controlling the hardware I2C, but i guess i'll just have to suck it up, read the docs, and get coding.

    i've got a few 44s on order. i thought about using a 3 to 8 decoder or something to get more effective outputs from the 85, but it's way less efficient than just using something with more pins to start with.

    and if i've still completely failed at getting them to do anything in another day or two, i'll probably be frustrated enough to send you both of them - hopefully without smashing them into tiny pieces first.

    you might find this document useful if you're doing nerve stimulation tests - it has information about what's necessary to stimulate nerves with near nerve needle electrodes, e.g. how much current and for how long.
  3. one chip would be totally fine. i still have some attiny 44 around so i could test right away. with that chip i could also do a first core components test and check out power demand, testing brown out. pretty much everything except electrode output and battery charging ( i still need my function generator for that)
    thx for the document, its a nice summary for needle like stuff which is a good kickstart.
    for reference i also have a pdf titled 

    Neural Stimulation and
    Recording Electrodes
    Stuart F. Cogan

    and one titled 

    Investigation of Electrodes as Bidirectional Human
    Machine Interface for Neuro-Technical Control of
    Prostheses

    i think they have been linked here earlier or so.
    those have more of a mathematical background for current densities, long-term tissue damage from overcurrent etc. so def. necessary for the final implant.


    to continue the original discussion about parts. i wanted to add
    -3x3mm fully featured li-ion battery management ic
    -BQ24230
    -comes with craploads of important management and protection features such as, precharge for totaly drained battery, short circuit protection, separated power path, protection for  overvoltage and overcurrent, ... optionally are temperature monitor, and 2 leds indicating a valid power source and charging status (useful to know that the induction stuff is working and the battery is full or still charging)
    -the reason why its good to have: maximum battery life, minimum user hassle, and prevents 90% of all worst case scenarios where some part would overload the battery and cause havoc.
    -3x3x1mm 16 pin QFN package
    -available from farnell and digikey for bout 6$ ppcs in single quantities 
    -needs 2 resistors and one cap to operate as desired. 
  4. i did manage to get the chips talking to each other. the main problems were the resistors between the HMC5843 and the ATtiny (no idea why the data sheet suggests them), and i was giving the I2C code the slave read/write addresses the wrong way.
  5. glad to hear it works. i planned on dropping the resistors. the hmc has internal pullups wich are just enough for our short wires and low data rate, so we save 2 parts on the later board.
  6. small update. finally got my function generator today and made a few tests with needle electrodes. had 2 needles in parallel, 5mm spacing, each 10mm deep into the skin.
    lessons learned today:
    •using the square output of a μC can be formed into a suited waveform with minimal ammout of extra parts
    •controlling intensity by variating the duty cycle is possible given the right waveform (so it is possible to change the intensity without cutting the thing out again)
    •having a current limiter can help
    •function generators internal switching between output modes is very nasty
    •average current consumtion of the output is well below 50μA (500 peak), for this geometry
    •electrode geometry matters a lot.
    •the line between good feedback and pain/discomfort is very slim.
    •do not use regular sewing needles as they seems to be coated with nickel or some other shitty material.
    • a 100Hz square wave with 5% duty cycle seems like a good start to do more research

    things i wanna try next:
    •variating geometries,
    •using a current controlled output instead of voltage based.
    •trying to design a circuit that offers better dutycycle based intensity control.  
  7. price alert!!!

    HMC5883 . the new version of the magnetometer originally sugested. they sell for less than 3€ in single quantities. they also are a tad lower power. 
    i am going for 5 of them. also added some mcp73831 battery management ic and a lipo battery...

    ... with that, and a bunch of parts i have in stock, a first non-implantable prototype can be build. great for testing all components , tweaking power demand etc.

    i will keep you updated on the progress.
  8. awesome. i've read about the 5883 in a few places, but hadn't ordered any yet. they should obviously be preferred for the final units though.

    i've been working on an external prototype as well, and should have one going in a day or two. it'll only have three electrode outputs though - i had to use the ATtiny85 instead of a 44 because the code i've got doesn't fit into 4k of flash.

    would it be wise to switch to using ATtiny88s? they support the "picoPower" thing as well, have more flash and RAM, and have way more IO pins than 44s, which don't have enough for 16 electrode outputs. the final units would be using SMD components anyway, so i don't think physical size would be an issue.

    and there's more info on what i've done so far on building a Southpaw here if anyone's interested, including some code to make examining magnetometer data easier
  9. you blew the 4k flash limit?? if a may ask a bit bluntly.. whatdid you code that ends up in that many bytes?

    switching between controllers should be fairly easy as long as they all posses the neccessary hw features. about the pico power.. there is little to worry. i intended to use the internal 128k rc clock. using that the μc eats very little power to begin with. the magnetometer eats a lot more.

    looks like you had just the same problem with getting a good response from the electrodes. tried to use a current controlled output (fet+resistor)? regulating the output with voltage only, or via resistors seems to be very tricky.
  10. haha. i thought i might have done something stupid to have the code use so much space, judging from your reaction i'd say that i must have done so.
    without using any floating point numbers, the .hex file the compiler produces is 80 lines long, but as soon as i include a float typed variable, it jumps to 206 lines. then, when code which uses atan2f to calculate the heading is added, it increases to 366 lines. i read something about using the -lm command line option to make GCC use an optimized math library, but it didn't affect the size of the code it generated for me. i'm probably doing something else wrong. i'll clean up the code i have and post it later.

    ok, that's good to know. the HMC5843 datasheet says it uses 33% less current when used in single measurement mode compared to continuous mode, and i'd assume the 5883 behaves similarly, but i couldn't see current consumption listed for different modes of operation on the 5883 datasheet. it does say that it only uses 100µa when measuring at 7.5Hz though, which is a huge improvement over the 5843.

    i haven't tried that yet, but i will look into it.
  11. oh.. well using floats is one thing. atan is something else. whatever you did with atan, in case of the southpaw everything will fit in some lookup tables. so there as no need for all-too-accurate math. very rough approximations will do. the less the better,
    where did you get the 100μA from? in my datasheet it is 640μA for 8Hz.
    i was thinking about something like.. 1 or 2 Hz, given dual supplies that should make below 150μA.
  12. yeah, there's a ton of optimizing i need to do.

    i saw it on this datasheet towards the top of page 2, under "Average Current Draw"
  13. my pack of hardware arrived today.

    what you can see is... my index finger, a regular atmega8 on one of my old pcbs. the battery wich is about 8mm thick (thicker than i wanted).. and that tiny square thing with the dots.. that is the magnetometer ic. i have.. no idea... how to solder it so far. at least none that does not involve a reflow soldering station or a burned chip.
  14. sry about not replying to you directly,. i was too hyped up with this tiny littl friend. last time i checked i had the HMC5883 datasheet, the chip seems to be the 5883L witch would match the datasheet you linked.
    the datasheet is not terribly precise about that 100μA statement. it does not specify if this number is true for single or dual supply. it would indeed be great to have it consume that little power, or even less.

    for now i have to find a way to wire it up, then i can give you precise ampere readings. i think i can manage to cerate a pcb that small, but i dunno about placement and soldering itself. guess i need to put it into my pizza oven and see if it works out.
  15. you might want to look the 110mAh battery Sparkfun sells. it's 4x15x28 mm. Sparkfun are out of stock right now, but you should be able to find a reseller pretty easily.

    i thought you could get SMD to DIP adapters that didn't require any soldering, you just plugged the chip in and they were ready to go, but i can't find any now that i'm looking for them. something like that might be worth looking for though.
  16. well a have no problems with smd stuff.. but that is LGA on top of that (BGA is bad already but LGA... well it cant get any worse other than the wafer itself). i talked to my electronics professor. there are basically 2 options. either you need to put lead on the thing, place it correctly and then heat the thing up. 
    or you try to mount the chip upside down and connect it using some kind of bonding wires. soldering wires that way might, with a very steady hand, work. i will try that method first.
    i will also prepare some boards and ring on the labs doorbell to see if there are any bored looking volks willing to push the limits a bit.

    about the battery, i originally aimed for the one you linked. followed by a small  RC helicopter battery (80mAh) in the end.. all i wanted was something to test charging. so i went with that one as it was quite cheap.
  17. @Thomas: got access to a reflow oven?
  18. hm.. if you count my pizza oven as such. sure.

    so.. i made a pcb (i was surprised that such a small thing worked out right away)

    in the process of adding some lead to the pads i broke the first chip. so i went ahead, added lead to both ,the board and the chip, tried to place it the chip and solder it on the hot plate. good thing is.. it did solder without producing any shorts, bad news is.. it only worked for half the pins and it was a bit off.

    after i broke it already i decided to mess around with it some more, cutting a hole into the pcb, putting the chip in from below and simply bridge the tiny gap between pads and pcb traces. it did not work. it might if you add a wire so it gets dragged there in place all by itself.

    so for now. my last option is to get some soldering paste, put it onto the chip using a needles tip , and then.. placing the thing on the pcb.

    this sorta is the limit of what you can do manually and it requires a lot more skills and experimenting than i want it to. the good news is, there seem to be a lot of breakout boards popping up all over the place.


    especially the ebay one is really small and single sided, a very good choice for a reasonable price.
  19. LGA is a certified bastard to deal with, but a reflow oven (well, close enough), and solder paste makes life a lot easier: most of the hassle is getting the stencil right.
  20. so. i got some soldering paste and made i new layout for a breakout board. it fits on a 16mm diameter board and is single-sided with 2 airwires.

    for the main controller i tend to go for an atmega 644V in the tqfn44 package. it comes with plenty of output pins, is still reasonable small and is easy to solder (compared to the hmc chip) .

    anyone made progress on a simple and reliable eletcrode driving circuit? 
    i would sort of prefer to have those close to the main controller. the hmc could be in its own pod (that would make 4) 
  21. i'm working on a constant current electrode driver. what i have now works for LEDs, but i don't have needles long enough to try it with electrodes. i've got some on order though.

    i'll also try to clean up the code i've got for getting useful information out of the HMC and put it up soon.
  22. i am afraid the hmc5883l has a different set of registers so we might need to rewrite that part, given your code as base.

    will try to manufacture the breakout today. the rest of the parts should arrive tomorrow.
  23. take a look at the code here: http://neurolepsy.com/southpaw/hmc/
    main.cpp is the relevant file, the other stuff is just I2C support and a makefile.

    it doesn't even touch the config registers, so there's no 43/83 incompatibility there, and changing the addresses used for the data output registers is as easy as uncommenting the line #define HMC5883 at the top of the file. that should be all that's required to use it with an 83. both chips behave very similarly - the data sheet says they even use the same I2C address. the most power efficient way of getting measurements is single measurement mode, and that's the default on both, and doesn't require any setup.

    it should be easy to adapt it to the Atmega and add more output pins than the three it uses currently. let me know if it works or not with the 83.
  24. code looks clean and lean. will test it as soon as possible. the smd capacitors arrived today so i can finally try to solder that thing :)
  25. so much about 'try to solder'. it was more like. try&fry.
    altho i managed to somewhat place it. i have no idea if all pins are connected, or if the part is still alive.
     

    long story short. do not try to solder something with 10mil pitch.
    recommendation of the day: grep the board from ebay, it is just as small and spares tons of trouble.

  26. Anyone thought about using solar cells for this? Or magnetic induction on the insides of the thighs? Or inside of the bicep and on the ribs of the same side? So when the arm moves it induces electricity which charges a battery or capacitor? These things don't use much power so I guess it would be feesable, then again I have very little knowledge about this so don't take my word for it!
  27. @ Johnnydubuf http://discuss.biohack.me/discussion/253/powering-devices-within-the-body/p1 there's a lot of information on this forum already. most common questions have been discussed and answered.
  28. Maybe if later this year these are available http://www.wired.com/design/2013/02/freescales-tiny-arm-chip/ I will get my hands on some and see how useful they could be for this project.
  29. adding to the initial list: MAX3120 as frontend for an optical interface simmilar to IrDA. has a 10nA powerdown and 120μA active. 4x5mm footprint SO8 no external components except the diodes and blocking caps. Available in single quantities for 5bucks from a number of distributors. proposing to use them with led's and PIN sensitive to red light to get good readings through the skin. reqires to produce and interpret pulses on the main μC. i'd suggest using halfduplex transmittions, frame based. with the base station continously sending an idle signal. and the implant only going active to check for the presence of an idle signal and to start a transfer.
  30. Any progress with this? Those Freescale chips are damn impressive.
    Not much of an electrinics guru, but I have access to a machine shop and can make some tiny things.
    Also up for guinea-pigging it if one is needed!
Displaying comments 31 - 60 of 62