Teaching Feeders To Speak RS-485!

  Рет қаралды 22,253

Stephen Hawes

Stephen Hawes

Күн бұрын

Пікірлер: 203
@fpvcoder9200
@fpvcoder9200 4 жыл бұрын
You can use dip switches. Probably the easiest and quickest.
@hoppelx
@hoppelx 4 жыл бұрын
but... LEDs....
@TheRadProd
@TheRadProd 4 жыл бұрын
I had the same idea!
@jdwg5
@jdwg5 4 жыл бұрын
That's exactly what I was thinking!
@ushiocheng
@ushiocheng 4 жыл бұрын
Also can use solder joints (those solder pads that is intentionally close so you can bridge it use a drop of solder) ~no cost, reliable, etc.
@iakanoe
@iakanoe 4 жыл бұрын
I immediately thought of that
@mikeselectricstuff
@mikeselectricstuff 4 жыл бұрын
Don't over-think the protocol - all you need to tell it is to feed and how many units of 2mm ( 0402s and smaller have 2 parts per index). This makes decoding trivial, and you don't need to worry about frame synchronisation. One thing to bear in mind is that all the other feeders will see any reply bytes as it's a shared bus. I'd suggest , where always has bit 7 clear and , always has bit 7 set. this makes decoding trivial with no need fo framing timeouts. would be a special value for status returns, so other feeders don't respond, and return values always have bit 7 set. Probably easiest to always return a status byte to simplify things. You don't generally need to know when the feed has completed, so you can return status immediately rather than waiting for the feed to finish, but you probably also want a null command that returns a status telling you if it's still moving, e.g. for manual indexing & setup.
@badesalz0815
@badesalz0815 4 жыл бұрын
Or, as an alternative, just use Modbus RTU with some opensource implementation? Sure, lots of processing overhead, but speed should not be an issue in this case. Could be an easy way out?
@petermuller608
@petermuller608 4 жыл бұрын
Why wouldn't you need to know when the feed is completed? You can pick up the part only after the feed is done
@simonbaxter8001
@simonbaxter8001 3 жыл бұрын
@@petermuller608 Totally agree. In a control system you need to know when the command has been 'actioned', not just when it has been 'received'.
@Kawka1122
@Kawka1122 2 жыл бұрын
@@petermuller608 it can know it by use of SCIENCE!
@canadianavenger
@canadianavenger 4 жыл бұрын
You almost got the RS485 signalling explanation correct. The voltages are never the same, it is a differential signal. If you measure across the two outputs, one line is always positive and the other is always negative, you will never read 0 across the two outputs unless the driver is disabled. To communicate, they just swap their relative states depending on if it's a 1 or a 0 being sent, effectively creating an AC signal.
@shaunmoneil
@shaunmoneil 4 жыл бұрын
That's what I came here for! Mark is a>b, space is a
@blakecarpenter9069
@blakecarpenter9069 4 жыл бұрын
Don't worry too much about resistor strapping. It is a time honored method. Use 1% resistors. They are not a big cost adder at all. On your ADC reading - do a 256 x oversample average and between that and 1% resistors - there is no issue there for 32 channels. Dip Switches are also pretty prevalent out there if a bit kludgy and IO intensive. More IO = more wire = more connections that will fail. Bottom line is you already have a working method that can be improved in software and with 1% resistors so why reinvent the wheel :) Nice work as usual.
@dannyarnold9823
@dannyarnold9823 4 жыл бұрын
I second that 1% is the easiest answer but you would be best to add temperature compensation by adding a reference thermometer.
@petermuller608
@petermuller608 4 жыл бұрын
But they either add a huge number of different components to your bom or you need quite a lot of space to be able to combine resistors
@jirkasvitil2762
@jirkasvitil2762 3 жыл бұрын
@@dannyarnold9823 i don't think that this will have any significant effect on voltage divider. Keep in mind that he is creating voltage divider and temperature is affecting both resistors. Only thing important is the difference in resistance between the resistors not the acctual value
@asronome
@asronome 3 жыл бұрын
You could use the chaining as the addressing system: each feeder passes the message on to the next but decrements the ID by 1. If it receives ID 0 it feeds. That way you don't have to set addresses at all, they are just based on the order they are chained in
@martylawson1638
@martylawson1638 4 жыл бұрын
For auto-ID you can run a wire "north" and "south" to the adjacent feeders with the feeders on the end looped back to the controller. To ID the controller holds one of it's North ID pin high. One feeder will see it's South pin go high, that is feeder 0 and it sends a serial message that says "I'm feeder 0" before pulling it's North pin high which triggers the next feeder to say "I'm feeder 1" and so on. When the controller see's it's south pin go high, every feeder has reported in. This does require dummy jumpers in every empty slot. Alternatively, you can get hexadecimal rotary switches that will give you a 4-bit binary number depending on rotation. 2 of them gives an easy to set 256 entry address space.
@bouni8506
@bouni8506 4 жыл бұрын
Use DS2411 (OneWire ID chip) ! They are in a SOT-23 package, they are cheep and you need just one pin of the connector to get the their ID
@petermuller608
@petermuller608 4 жыл бұрын
Those are _really_ expensive since they are used for DRM. An EEPROM would me much cheaper. He could even add an MCU to each slot (not just feeder) and it would still be cheaper :D
@electronerd
@electronerd 3 жыл бұрын
@@petermuller608 Not *that* expensive, $1.32 in single quantities at Mouser
@petermuller608
@petermuller608 3 жыл бұрын
@@electronerd that's quite expensive ;) eeproms cost USD ~0,1 and ARM MCUs cost USD ~0,9, also in single quantities. Nevertheless you are not wrong. You won't have hundreds of feeders so the price difference does not matter that much in the end
@electronerd
@electronerd 3 жыл бұрын
@@petermuller608 Yeah I guess it depends a lot on how many you're building whether $1 is a lot or a little
@RussellNelson
@RussellNelson 2 жыл бұрын
@@electronerd Yes, they are expensive AND nice because they have the globally unique ID you need.
@Graham_Wideman
@Graham_Wideman 4 жыл бұрын
Along with identifying which slot is occupied by which feeder, it would be good to have a way to associate an id to each feeder, and the component type to the feeder. That way, when you load up feeders they don't need to go into the same slots as previously. You would even be able to PnP boards with more different components than you have feeder slots for, that require swapping feeders in and out, without worrying about accidentally loading the wrong components into the wrong slot. You might even create a separate single-slot "prep station" with your "floor" connector and a barcode reader to read the barcode off the component reel, and program that info into the feeder.
@lucianchapar
@lucianchapar 4 жыл бұрын
Would DIP switches be useful for setting the feeder identity?
@ibraheemrodrigues861
@ibraheemrodrigues861 4 жыл бұрын
I second this, I've seen it used alot on devices that need to be addressed like this. Also seems to be the simplest solution - no need for extra LEDs etc, just one new component connected to a few IO pins. Alternatively just have some jumper pads that you bridge with solder to represent the bits.
@juliankandlhofer7553
@juliankandlhofer7553 4 жыл бұрын
thats what i was thinking if you have enugh io ports available. a 4 pin dip switch for 16 adresses shoud probably be plenty and would make it possible to see what id the different feeders have.
@stephen_hawes
@stephen_hawes 4 жыл бұрын
OOH that's way simpler than clicking through addresses. Thanks for the idea!
@azyfloof
@azyfloof 4 жыл бұрын
@@stephen_hawes You can even get 4 bit switches which are like tiny pots, and you dial in a hex value :D they have the same footprint and pinout as a 4 bit dip switch
@JLK89
@JLK89 4 жыл бұрын
@@azyfloof I've done this as well. I actually connected resistors to the 4 'bits' of the hex selector switch so it gives you 16 analog levels. In this case though, I would just give each feeder (or each bay) a tiny d-flip-flop and string those together so you can digitally select the bays.
@olivervoss3196
@olivervoss3196 4 жыл бұрын
Literally every time I get a notification that you uploaded a new video, I drop everything I'm doing rn and watch your video with the same enthusiasm as you bring to the game Thank you so much for being as you are and enlightening my day ^^
@bjarkeistruppedersen8213
@bjarkeistruppedersen8213 4 жыл бұрын
May I suggest two small 7 segment displays on the feeder to show which position it has detected it is inserted into. Would be handy both for troubleshooting and for locating a specific feeder.
@UntrackedEndorphins
@UntrackedEndorphins 4 жыл бұрын
Hey I have a few comments to help you on the next revision, I worked on something similar where I used RS485 for communication and needed addressing as well. For the addresses I used a 5 dip switch and read it as a binary (1, 2, 4, 8, 16) input, which gave me 32 addresses and worked great. Another thing is RS485 needs termination resistors, so at the end (and sometimes beginning) of the chain it's recommendable to put a 120 ohm resistor in parallel to A & B. Putting a resistor on each RS485 transceiver will usually overload the circuit causing errors, so it is not recommended.
@LucasHartmann
@LucasHartmann 4 жыл бұрын
With no changes on feeder or motherboard, but an extra wire on the daisy chain: Have one resistor connected to the left slot and a pull up, feeder analog pin to the center. Ground the "left" resistor on the first slot. The lowest analog voltage is first slot. Make the identified analog pin output ground, then the second slot will have the lowest voltage. Repeat.
@crazor01
@crazor01 4 жыл бұрын
Great idea!
@ikocheratcr
@ikocheratcr 4 жыл бұрын
Very good idea. Makes all modules the same, and no changes in the current feeder.
@claudiu7909
@claudiu7909 4 жыл бұрын
I think reading the id from the connector board instead of setting the individual address of the feeder is the better approach. Less hassle when inserting new feeders or changing them. As other people said, you can use 1% resistors and they should be precise enough. Also, I just had an idea. You could also place a capacitors on some boards. Have a voltage divider and a capacitor to GND. If you pull the line low and than measure the voltage, you should see the voltage raising fast (if no cap) or slow (with cap). This way you can identify the board that have a cap and those that don't. If you use the presence of the cap as part of the address, you can get away with only 16 voltage dividers.
@davidosterberg
@davidosterberg 4 жыл бұрын
Can’t believe you “only” have 16k subscribers. Don’t get me wrong 16k is a lot of people. But I think you deserve so much more. Oh well, it will come.
@PolarisLP
@PolarisLP 4 жыл бұрын
If you want to reduce the ID stuff to just 1 pin you could send a square wave signal to the first board e.g. 100khz and device it by 2 on every boatd. The feeder can easily measure that and detect its position. You can use a simple D Flip Flop to devide by 2.
@martylawson1638
@martylawson1638 4 жыл бұрын
Nice, this is simple enough to put on the connector board in place of the resistor divider. There are some tiny single gate SOT-6 logic chips that would be perfect for this. Digikey 296-9851-1-ND or 1727-6019-1-ND for example.
@ikocheratcr
@ikocheratcr 4 жыл бұрын
This frequency stuff will not fly. If the first node receives a 100kHz signal, and output a divided by 2 one (50kHz), then the last node will get a 100kHz/(2^31) signal, ie 0.0465 Hz, Identification will take too much time ~21s. This idea could work for
@martylawson1638
@martylawson1638 4 жыл бұрын
@@ikocheratcr Good point. The chips I linked would be happy with a signal well into the MHz range, but you're still waiting for 2^31 cycles. which will be a several minute period for the last feeder. A 3/4 or 4/5 divider would help a lot, but also balloon the circuit complexity. Could do two chains of 16 using frequencies that divide distinctly. ( i.e. 66KHz and 100KHz) Wonder how simple a pulse eating circuit can be made? (i.e. send out 32 pulses, and each feeder gets one less pulse as the boards eat the first pulse they see)
@TehTub
@TehTub 4 жыл бұрын
Not gonna lie. Watching you progress through this project is awesome. Keep it up.
@RussellNelson
@RussellNelson 2 жыл бұрын
This is a year and a half ago, but the easiest way to enumerate devices in a chain is to have them echo the RS-485 signal down the line. When they receive the first command ("Identify Yourself"), they send something back to the controller, and mark themselves as #1. When they receive the next command, if it's not addressed to #1, just echo it to the next device in the chain.
@RomanShteringarts
@RomanShteringarts 4 жыл бұрын
Maybe it'll be a good idea to use shift register (74hc165d for example) or counter, to identify feeder placing. It will take 3 pins of feeder controller to talk to shift register, and you have 8 bits of its parallel input pins to make the position code.
@savagesarethebest7251
@savagesarethebest7251 3 жыл бұрын
That is a really good and cheap idea, just push a bunch of ID down the line and have each feeder read the local shift register and then they know in what order they are placed.
@randycarter2001
@randycarter2001 4 жыл бұрын
My plan was to put a $3, 0.91" OLED display on the feeder. 4 push buttons and the feeder now has a UI. Much more functionality for setting variables like sprocket holes per part, fine tuning the stop position, setting address etc.
@petermuller608
@petermuller608 4 жыл бұрын
That does add quite a lot of complexity to the feeder. If you need to configure it I would use EEPROM on the feeder. You already have SWD anyway
@randycarter2001
@randycarter2001 4 жыл бұрын
@@petermuller608 Having a UI for setting up the feeder allows setting parameters on the fly without having a separate PC. All you need is a spare power source, no programing adapter, no programing software, no 2nd PC, etc. Just put the tape in hit a few buttons and you're done.
@bytesizedengineering
@bytesizedengineering 4 жыл бұрын
Looking awesome! Great job Stephen!
@gestaltlabart
@gestaltlabart 4 жыл бұрын
identify via shifting ... each feeder gets a data in and a data-out port, you put in a bunch of signals, every feeder drops one impulse and chains the others trough, -> count of signals is id. and consider modbus rtu as protocol
@DEADB33F
@DEADB33F 4 жыл бұрын
That doesn't work if not all consecutive slots are occupied though.
@scottmaltby3224
@scottmaltby3224 4 жыл бұрын
Reminds me of old analog CCTV PTZ Dome cameras. They use RS485 for control and had a small 5 or 8 way Dipswitch block so you could set the address on each camera. Combination of the dipswitches could set the ID from 1- 255
@RussellNelson
@RussellNelson 2 жыл бұрын
Do. Not. Use. DIP. Switches. To. Set. An. Id.
@CandyGramForMongo_
@CandyGramForMongo_ 4 жыл бұрын
So you have implemented 60’s digital communication. I love it!
@uint16_t
@uint16_t 4 жыл бұрын
Love your enthusiasm and cheerful excitement!! Also your video got great production and educational value.
@wesleymays1931
@wesleymays1931 3 жыл бұрын
The reason for the fifth pin on the feeder floor makes sense now: An ID for each feeder
@Stinktierchen
@Stinktierchen 3 жыл бұрын
I love doing stuff myself too... this project looks like you have never left this room for ages to accomplish that task.. daaammn Respect
@juliankandlhofer7553
@juliankandlhofer7553 4 жыл бұрын
I've just recently come across your channel and I have to say that I'm really excited about what you are doing. I would use dip switches either on the feeder floor or on the feeders themselves. much more reliable than using an analog voltage. also makes it much easier to see and adjust the adresses if needed. Some suggestions for the communication protocol: * add a protocol version. that way you could have multiple versions of the feeders installed without having to change the firmware on the motherboard every time. the feeder could send a little hello message with its version number so that the motherboard can detect what features it supports if you expand that in the future. * maybe add a confirmation response once the feeder is done moving the tape so that the pnp doesn't try to pick up a part if the feeder isn't done moving yet. love what you do. keep it up 👍👍
@RussellNelson
@RussellNelson 2 жыл бұрын
No dip switches. Never.
@juliankandlhofer7553
@juliankandlhofer7553 2 жыл бұрын
@@RussellNelson why? Genuinely curious
@RussellNelson
@RussellNelson 2 жыл бұрын
@@juliankandlhofer7553 First, because they are a pain to set. If they aren't a pain to set, then they're easy to change. Second, because you only need to make one misteak once and you've lost whenever you might have saved by using DIP switches rather than a programmatic id scheme which will *always* set a unique id. For example, he has a sensor on the wheel, right? So when you get everything connected, just go down the row spinning the wheel a bit. OR have a bit of software which goes through the BOM and tells you to twiddle the wheel a bit for each part. Then the system not only has put a unique id on each feeder, but it also knows which part is in which feeder.
@OM222O
@OM222O 4 жыл бұрын
I might be late to this but simplest solution would be using a shift register. If you have lets say 32 feeders, you need a 32 bit shif register that has a single active bit. You start at position 1, send a command over RS-485 containing the ID which is 1 here. The feeder that sees the active bit, takes up that ID. Then you shift the active bit to position 2 and then you send the ID (2) over serial again. Let me know if the description is not clear or if you want to get in touch to discuss this.
@Roobotics
@Roobotics 4 жыл бұрын
If you stay with analog ID's, something interesting you could do, is stack all the feeders in series somehow with a termination point, then if they all use the same resistance it would ratio out automagically. Using 3 feeders as an example, it would stack three 10k resistances in series, then divide that out across the voltage range for ADC stuff. Adding a feeder and setting the termination points would change the ratio. Some more thought needs to be put into this, but I think it has some merit in not requiring any manual address fiddling. Else the dip switch idea is pretty solid.
@makingwithsteve
@makingwithsteve 4 жыл бұрын
Have to say that watching your videos makes me want to learn electronics. I have no idea how to do any of what you've done in this pick and place series but good lord is your enthusiasm addictive and motivating. Keep up the good work!
@vtrandal
@vtrandal 4 жыл бұрын
Absolutely awesome. Anything you can do to fully automate the feeder-motherboard setup will pay dividends. Otherwise, the setup will become labor intensive with many feeds to configure for large BOMs.
@kenjewell3889
@kenjewell3889 4 жыл бұрын
You should consider Modbus RTU
@ogurezzz
@ogurezzz 4 жыл бұрын
And again... SPI DaisyChain will always give you exact feeder positions based on number of bit. ;) Also it is possible to make firmware to know what max number of feeders you made for your PnP (scalable design)
@twilmer34
@twilmer34 4 жыл бұрын
You can use computer vision and the built in eeprom of the atmega. To intially program have only one feeder or one new feeder connected. Program the address as a "broadcast" to the one which is not programmed. Read in a qr code from the feeder label. Keep all in a text file and read in the qr codes with computer vision when the feeder are installed
@AnthonyClay
@AnthonyClay 4 жыл бұрын
FYI, encoding the position into the slot itself is (imo) always the most elegant solution. Makes the feeders themselves cheaper, meaning you can have more of them. Not having to program a slot manually means less room for human error, which is a primary goal (or should be) of any automation/machine design.
@russwilliams8274
@russwilliams8274 4 жыл бұрын
Auto-configuring is definitely the way to go... it completely excludes an entire class of position-doesn't-match-ID errors, which are probably more likely to occur than misidentification via the resistors. You can still display the detected ID on the feeder, because more LEDs = more awesomeness.
@DEADB33F
@DEADB33F 4 жыл бұрын
If the edge connector were double-sided then you'd have five extra pins which could carry the slot address allowing 32 slots (technically 64, as you also have one spare pin on the other side as well). I do like the idea of not having to set the slot address on the feeder itself though. Having the feeder know where it is automatically is infinitely 'cooler'. --- Even if using resistors & voltage dividers won't allow for 32 feeders it should still work for a smaller number of feeders no problems.... If you have enough IO on your mainboard then I guess you could have multiple RS485 interfaces, then each bank of feeders would connect to a different interface (eg. 16 feeders on each side of the machine, each bank talking to the mainboard on a separate RS485 bus).
@fredo514
@fredo514 4 жыл бұрын
Straps (pull-ups and down, you can use a 3 pad footprint to save space) are the easiest way, you need only 5 for 32 addresses. Or Dip switch if you want it to be configurable. You can add a shift register to save pins on the micro. 1-wire eeproms are also easy. Outside of the box: you could have self locate by sensing their neighbours. A single GPIO per side is enough. The right-most feeder could identify that it’s touching the edge through his right pin. It would then advertise its position (1 in this case) and then set its left pin. The next feeder would sense the change on his right pin and know that it’s next and advertise its position (2), and so on. Of course this is assuming that all feeders are touching. I don’t know if it’s a viable idea, but it’s neat.
@RussellNelson
@RussellNelson 2 жыл бұрын
The second paragraph yes, the first paragraph no.
@goodi2k7
@goodi2k7 4 жыл бұрын
How it's usually done in the industry is that every feeder has a unique ID. That way you can plug it into any slot in the pick and place and the machine can figure out from which slot to get the correct part. Sometimes there is even all necessary information about the part stored on the feeder itself so you can just use the same feeder on different machines without any additional setup.
@NavinF
@NavinF 4 жыл бұрын
Those machines likely have a separate serial connection from the controller to each feeder. He does not. All his feeder IO pins are electrically in parallel. That's why he needs the feeder to know what slot it's in
@nathanielbrough990
@nathanielbrough990 4 жыл бұрын
You could use the 96bit unique id that is directly programmed into every stm32. Means no extra hardware.
@richardlighthouse5328
@richardlighthouse5328 4 жыл бұрын
the board that the feeders connect to could have hard-wired 5 bit ID that goes through the connector to the stm32
@niclash
@niclash 4 жыл бұрын
I am doing this (well 8bits in my case), and using PCIexpress connectors mounted on a bus to simplify manufacturing. Then the feeder is responsible to "know" what component is mounted, so that OpenPnp can query all RS-485 addresses for "what component is in this position?"
@AJMansfield1
@AJMansfield1 4 жыл бұрын
Also, instead of setting the addresses, you could just use some type of universally-unique ID system - the STM32 you're using probably has a unique ID burned into one of the system registers somewhere.
@phirenz
@phirenz 4 жыл бұрын
We don't really care about the ID of the feeder. We want to know which slot it's plugged into so the pickup head can physically locate it.
@jimamos8960
@jimamos8960 4 жыл бұрын
Late to view this... more great work, Stephen! After reading all the commentary I'm leaning where most others are leaning with the DIP-switch-based ID scheme. Unsure where you upper-end would be with address limits, but minimum 5-bit me thinks. The "daisy-chained-relative" voltage suggestion with the additional bus wire was also a slick potential solution. Looking forward to your next update!!
@macbirdie
@macbirdie 3 жыл бұрын
Lead instrument's notes in the background music synced perfectly with the LEDs lighting up at 8:42. 🤯
@alexandrubabaian8364
@alexandrubabaian8364 4 жыл бұрын
Nice project. The thing with assigning IDs can be done in a little different way. You can assing ID's from the master node. You can send on a bus messages like "If you don't have an ID yet, then your ID is 1. Save it in nonvolatile memory." Slave responds "OK, done. I have ID 1" Then master sends the next message "If you don't have an ID, then your ID is 2. Save it in nonvolatile memory" Anyhow you will install the feeders sequentially and there is no time when you install at the same time 2 non initialized feeders. Therefore each feeder will get the next address assigned by master. If you don't like to rely on power on reset as a condition to read the ID, then you can assign the next ID's based on the sensors combination. For example "Whoeven on the bus has the button 1 pressed - save ID 1 ". In such a way you would just have to install all feeders and then go once on each feeder and press "button 1" to assign it the next address generated by master. This solution would allow you quite easyly to add new nodes even dynamically.
@Chrisknot94
@Chrisknot94 4 жыл бұрын
I'm wondering... could the downwardfacing camera be used to detect an LED on a feeder? Like a fiducial? Because if that worked it would open doors for all kinds of fun stuff: Have your feeders all next to each other on an extrusion, use some kinds of pogo pins or springloaded sth to connect the feeders to a pcb next to the extrusion. we need a starting point: a position where always a feeder is placed. The feeders' leds light up and send their id over the bus, camera recognizes the one below it and can correct for misalignment, the feeder sends its information (tape width maybe set by a resistorvalue or dip switch) and the camera knows how much further to move to be on top of the next feeder. All the other unidentified feeders light up and send their ids over the bus one after the other until the one currently under the camera lights up. Camera corrects for misalignment and repeat. If one reel runs out, pop in a new feeder with new tape in it's place, have the cam correct it for misalignment with the led and off you go! As for bus ID and communication I'd say look at i2c: If I remember correctly a device pulls a line low just before it uses it to send data, eliminizing collisions. Maybe that's sth you can copy: mainboard sends a broadcast, feeders wait a randomized fraction of a second before one of them pulls that line down and responds, MB ack, then repeat until all the feeders have made themselves known. That's pretty much how dhcp works and successfully for years now
@zodak9999b
@zodak9999b 4 жыл бұрын
In my projects that need it, I mostly use a few 2-pin headers to set addressing.
@blazehenot2536
@blazehenot2536 4 жыл бұрын
You could use a potentiometer on the feeder floor so you can tune for in accuracy while still allowing quick swap functionality
@NoelAbdilla
@NoelAbdilla 4 жыл бұрын
Nice job man, love the build and vids. As many people said I would go for the DIP switches which act as a bit represent. So 4 DIPs will give you a total of 16 combinations, 5 -> 32 etc. May I suggest one last thing to take into consideration, in the software you said you write 2F to make feeder 2 go forward, I would try and make it 02F, that way if you'll have over 9 feeders you'll be ready and set to go.
@RussellNelson
@RussellNelson 2 жыл бұрын
Do not use DIP switches to set the ID. The first time you set two devices to the same ID, you will curse your decision and everyone who suggested it to you.
@shivam000
@shivam000 4 жыл бұрын
my excitement is also same when something works the way you expect it to be.
@quitoso88
@quitoso88 4 жыл бұрын
I did a project with NFC eprom/sram chip you can flash settings with your mobile phone. It's not cheap because you also need antena or pcb antena space. But it can store quite alot of settings. The NFC transponder + Molex antena was close to 3.5€. It could fit this project.
@etmax1
@etmax1 4 жыл бұрын
You can buy lovely little rotary DIP switches that let you adjust the setting with a screwdriver. They come in 8/10 and 16 position so with 2 x 10 position you can do 99 feeders RELIABLY. Also you should have an optical detector that detects the hole in the tape if a part is missing.
@ushiocheng
@ushiocheng 4 жыл бұрын
just add solder joints (those solder pads that is intentionally close so you can bridge it use a drop of solder) to the connector PCB, which means 1. you just need to label the connector board to not mess things up and 2. the mainboard can automatically recognize which slot the feeder is in now. Also, another idea is to make the feeder send out a "info" package so that the mainboard does not only know which slot it is in but also knows what component is in it. "info": {"slot": 0xA, "componentID":"0BA09974-A295-48E6-88AA-E55757EFE139"} and you can connect this uid with a component and its info in a database or something and when you change what component is in a feeder, you can make some small contraption for it, that should be quick, maybe feeder can receive a RS-485 package telling it to change its component id
@atc1441
@atc1441 4 жыл бұрын
At 4:25 you solder an 0 and an 10k resistor in, isnt the 10k resistor only drawing power in that aragement and not very usefull? As it will be allways fully pull low?
@justaddjeff1988
@justaddjeff1988 2 жыл бұрын
Gold star for using RS485.
@dominikwurster2220
@dominikwurster2220 4 жыл бұрын
It would be great if the feeders has fixed id´s. The feeders ID is labeled on this feeder with an QR-Code or DataMatrix-Code. If you add a new SMD-Reel on this feeder you scan first the feeders ID and second the value-code of the reel. In this moment the SMD-Part/Reel get married with this feeder by the software. Now it doesn´t matters on what position the feeder is pluged in. Now the software automatically knows on what position is located the right part. This of course assumes that the positions of the feeders can still be recognized. It doesn't matter whether this is done with a voltage divider or a 1-wire chip etc. So you could use a second feeder with e.g. 1k resistor before the first feeder runs empty with the 1k resistors ;) This way, mix-ups of components during assembly can also be minimized ;)
@matthewsimmons6831
@matthewsimmons6831 4 жыл бұрын
A long time ago I worked on an SMT line, using mydata and Yamaha pick and place machines. Our Yamaha's were 'old' and each program fixed the BOM components to set feeder locations. The mydata had feeders with barcode and an ID chip. An operator could register a suitable combo of component and feeder, put it anywhere on the machine and it would pick it from there. Setup was a breeze since the stockroom barcode every reel, and two scans (even when machine was running) and the pair is registered. Others have mentioned that you could use either 1wire type protocols, or some thing that affects the chain so each slot behaves different. If number of contacts doesn't matter (the gold fingers) just have a few for a set of low or high bits, and bridge pads with solder. Or could manually set machine with triplet of component 1 is on feeder 2 at location xy.
@taftse
@taftse 4 жыл бұрын
Is there a chip similar to the sw2812b chips used in the addressable LED pixels that could be used to automatically detect how far along the string it is ?
@jht9242
@jht9242 4 жыл бұрын
For the ID system. You could have jumper pads, one for +5V, one for GND, and one for connecting to the circuit. then manually hardcode the id in binary using solder bridges. You could make an array of 5*3 pads to enter the id, and you'd have a cheap easy to use, and most importantly digital identification system.
@RussellNelson
@RussellNelson 2 жыл бұрын
No. This is worse than DIP switches, which are already worse than everything else.
@diggraph
@diggraph 4 жыл бұрын
Hi Stephen, What is the Digikey part number of the 5 pin spring connectors you use? The look useful.
@bigjj135
@bigjj135 4 жыл бұрын
I worry about the number of insertions the edge connector will survive... Commercial ones are often only rated for a few hundred insertions. I did a lot of research on this topic and I switched to pogo pins.
@AlexMadinger
@AlexMadinger 4 жыл бұрын
Great frickn work!!
@natman151
@natman151 4 жыл бұрын
Have a line of unpopulated pads on the board connected to IO pins like you would a dipswitch. Then solder in zero ohm link resistors to encode the ID of each one onto the PCB. It's cheap
@ChunkySteveo
@ChunkySteveo 4 жыл бұрын
Awesome video as always Stephen!! +1 for the dip switches method, although using high quality resistors sounds cool too.
@RussellNelson
@RussellNelson 2 жыл бұрын
Never DIP switches. The first time you accidentally set two to the same value, you will curse your decision.
@ChunkySteveo
@ChunkySteveo 2 жыл бұрын
@@RussellNelson you need to catch up with his videos Russell! I think they have moved on to EEPROM memory chips and boards you can program with some button presses. Pretty cool stuff!!
@RussellNelson
@RussellNelson 2 жыл бұрын
@@ChunkySteveo I started with the video where he's showing the passive feeders that users have created. Even better!!
@ChunkySteveo
@ChunkySteveo 2 жыл бұрын
@@RussellNelson ahh yes! Those look amazing with the nozzle and the spool sprockets!!
@GJToken
@GJToken 4 жыл бұрын
As far as led readout, a simple single figure 8 segmet display (on the feeder itself) could easily readout 1 through 9 with maybe a pad for a second if you plan on doing more than that
@louisdavies5367
@louisdavies5367 4 жыл бұрын
Nice work as ever! I'd stick with the resistors, maybe do some tolerance analysis on the worst case you could get from adjacent resistor dividers. I think you would be surprised especially with 1% resistors! I think you will easily be able to stick with it for 32 slots as I believe you have 12 or more ADC bits right? So at least 4096 numbers representing voltages. 4096/32=128 different numbers to mean 1 slot! Also as suggested maybe add a capacitor either at the divider or at the input of your ADC (or both) to increase the voltage stability :)
@NavinF
@NavinF 4 жыл бұрын
You're limited by the resistor's thermal coefficient, not the ADC resolution. A warm resistor will appear to be be 1 slot higher. (I assume he has taken this into account)
@MrBlakBunny
@MrBlakBunny 4 жыл бұрын
I would look at placing dip switches on the fingers themselves, but then would have to look at a controller on the finger mounting...and then it just becomes complicated
@ogurezzz
@ogurezzz 4 жыл бұрын
Did you think aboud IDC connectors (f and m) for your bus boards? No wires are needed.
@TheShorterboy
@TheShorterboy 4 жыл бұрын
whats the part number of the spring connector
@smartieoncomputer
@smartieoncomputer 4 жыл бұрын
Each feeder's controller may have a unique ID programmed when manufactured. Could you use that to uniquely address a feeder? That way, no need for dip switches. Then you'd only need to enumerate all possible addresses or program a mechanism that allows for the readers to report their ID when they power up? This way, if you move a feeder from say, slot 1 to slot 4, the PnP would know that the feeder has moved and thus, where the SMT parts are now located. As for identifying which slot the feeder is on, each feeder bed could have a simple logic circuit that for each pulse from the PnP, will enable a signal on the first feeder bed, then the next pulse will enable signal on the next feeder bed in the chain, etc... This process can be paired with a command to the feeder to check if that slot is active, and report back which slot it's in. As for that little bit of logic. look at a Johnson Counter digital logic design, it's simply daisy chained flip-flops.
@joflo5950
@joflo5950 4 жыл бұрын
Hey Stephen, I love this project! It gave me an idea for one of my own, where I'd like to use the same kind of connectors using those spring loaded contacts you used. However, I was unable to find them. Where did you get them?
@andreaswagner468
@andreaswagner468 4 жыл бұрын
STAY with the analog voltage that's good enough BUT add a cap like 100nF in parallel to block noise
@TrevorPeac0ck
@TrevorPeac0ck 4 жыл бұрын
There are unique id chips, eeproms, combined ID/eeprom chips. They come in I2C and 1-wire (eg Microchip 24AA02UID or AT21CS11) You could use those, and have a programming "feeder" that you insert in sequence to identify each slot to the controller. It could either write the eeprom, or report the ID to the controller, which remembers each slots unique ID in a lookup table. Not super elegant though If you can add a 5th wire to your JST jumpers, and add the smallest possible micro to each slot "floor". you could come up with a 1-wire programming solution. inspired by the way WS2811B uses its input/output pins: * each "floor" has an output pin connected to an input pin on the next slot. The first slot gets its input from the controller, the last slot is left disconnected * each "floor" has a 1 wire digital pin that outputs to the feeder * On startup the controller sends a "1" packet to the "in" of the first slot "floor". The first slot remembers its position as 1. * The first slot adds 1 to its ID and sends it to slot 2 * The second slot remembers its id as 2, then adds one and sends that to the 3rd slot.. and so on * Once initialized, each slot sends its ID packet to the feeder a few times a second. When the feeder starts up, it listens for its ID from the slot floor board That solution requires the smallest/cheapest 6/8 pin micro you can get (6-pin attiny4 ?), with 1 input and 2 output pins (or maybe 1 output pin, you might be able to use the same pin out to the feeder and out to the next slot) I also wonder if its worth considering adding a boot-loader to the feeders so they can be bulk re-programmed with new firmware over RS485. Not worth worrying about for the slot "floor" boards, the code is simple enough you shouldn't have to change it.
@yasirhassan8557
@yasirhassan8557 4 жыл бұрын
4:02 best way for ID will be 64kB eeprom, where you can add additional parameters other then ID also. DIP switches are also good but bulky.
@RussellNelson
@RussellNelson 2 жыл бұрын
DIP switches are not good. They are bad.
@jasonpettiaux6952
@jasonpettiaux6952 3 жыл бұрын
If they are connected to each other anyway, couldn't you let the order of the feeders define the address of the piece in software in the set-up when you switch it on ? Like the first action is that they communicate the position starting at 0 (from the controller) and ending at the last bit forwarding their address +1 to the next feeder.
@staticinteger
@staticinteger 4 жыл бұрын
So epic! This is coming along nicely!!!
@jonathanfulcher602
@jonathanfulcher602 4 жыл бұрын
Why not use voltage drop to your advantage have the first feeder hooked up to 5V and run a single extra cable to each feeder floor and have a resistor inline. The last feeder hookes up to GND an then you have a presice and equal voltage drop on each feeder.
@erfanmahmud3041
@erfanmahmud3041 4 жыл бұрын
I am following you from a long time. You are really an enthusiastic guy. want to see the last of your PNP. looking forward to that.
@jasongoldenberg973
@jasongoldenberg973 4 жыл бұрын
Yes dip switches or two rotary selection wheels
@AaronHuslage
@AaronHuslage 4 жыл бұрын
Why would you need to change the ID of the slot?
@mastermoarman
@mastermoarman 4 жыл бұрын
how about adding dipswitches to the feeder or the connector?
@devilclarke
@devilclarke 4 жыл бұрын
When I need uid's I tend to us ds18b20 temp sensors with there silicone id
@xxportalxx.
@xxportalxx. 4 жыл бұрын
I'm not sure changing the id system is necessary, just make the divisions wide enough to accept the resistors tolerance. Not to mention since there's only a handful of fixed slots it's easy enough to verify your resistors values manually if need be, but that shouldn't even be necessary if you set the ranges appropriately.
@iliya-malecki
@iliya-malecki 4 жыл бұрын
An idea!!!! Considering you probably will change out feeders way, way more frequently than the feeder floors (ideally you dont change them out at all), i think you can just program the floors to hold the addresses. EEPROM would be obviously an overkill, but setting manually some logic gates with buttons would do the trick
@hansdietrich83
@hansdietrich83 4 жыл бұрын
Don't forget to make the pc spit out an error if no feeder is in the slot or is not responding
@DanBowkley
@DanBowkley 4 жыл бұрын
Five tiny little switches on the feeder which interface with five tiny holes (or places where a hole would be) on the mount. Or five spring fingers vs five possibly grounded pads. It's digital, practically bulletproof, and stupid simple. For that matter, five slot photodetectors vs five holes.
@RussellNelson
@RussellNelson 2 жыл бұрын
The first time you set the switches incorrectly, you will learn that you have made a mistake. Auto-config or go home.
@DanBowkley
@DanBowkley 2 жыл бұрын
@@RussellNelson The switches would be set by the holes in the frame. Basically the feeder learns its address by braille.
@RussellNelson
@RussellNelson 2 жыл бұрын
@@DanBowkley Oh! Yes, you are correct, this would work very well. Or ... have a 2D barcode on the feeder which gets read by the camera. Same idea.
@jamess1787
@jamess1787 4 жыл бұрын
What are you running on your laptop? DWM? Rat Poison? I'm intrigued Uncle Bob!
@OddlyIncredible
@OddlyIncredible 4 жыл бұрын
Somehow I missed this video - subbed and belled so that shouldn't be a thing any more - so I'm late to the party, but I would use the feeder's other PCB with another five fingers and selectively power or ground them slot-side to provide an ID. That would make 32 slots (or more by adding more fingers) trivial to implement at the cost of requiring the backside PCB actually do something aside from acting as a structural component. Connecting the feeder's two PCBs could be handled with a short interconnect cable and matching socket.
@hammersamatom8055
@hammersamatom8055 4 жыл бұрын
Probably sounds really dumb, by why not have the STM32 assigned the values as the feeders are plugged in? The feeder would send a pattern, which would tell the STM32 a new unassigned device was connected, and then it would send an ID back. Have the feeder store the ID somewhere permanent, and operate off of that. The other devices with an already assigned ID would then ignore the STM32's ID assignment operation. I know there are problems with this, but it seems like a decent idea to do dynamic assignment. Nothing says you can't write something to override the ID the STM32 provides.
@ShaneBurrell1
@ShaneBurrell1 4 жыл бұрын
If you want the position on the machine to do the ID, the easy way is to use 2 pins on the MCU on the feeder and a 4017 on the rail. Basically a pulse counter. The feeder MCU does pulse count against the 4017 Johnson Counter to get its id. The only limit would be how many 4017's you want to string together.
@crazor01
@crazor01 4 жыл бұрын
Could you elaborate on that? I'm not familiar with the 4017, but by looking at the datasheet, it wasn't immediately clear on what you're trying to do here...
@ShaneBurrell1
@ShaneBurrell1 4 жыл бұрын
@@crazor01 If you wanted the rail position to determine the ID using a 4017 at the rail would allow 2 pins to communicate with the feeder as to what ID it should be. The 4017 can be configured as a pulse counter. You use two pins on the MCU, one as input one as output. One pin tries to drive the pin high the other checks to see if it went high. The 4017 bumps the count up and can be statically configured via resistors. This method is used a lot with keyboards, keypads, etc to keep the pin count down on the MCU.
@crazor01
@crazor01 4 жыл бұрын
@@ShaneBurrell1 Ah okay I get it now. Nice idea!
@dermothannan9594
@dermothannan9594 4 жыл бұрын
Really enjoy the channel, content and enthusiasm. Great project. I appreciate resistance maybe non-ideal.. but what about a digital pot.. MCP41010.
@Vitonok
@Vitonok 3 жыл бұрын
Why you shouldn’t put another microcontroller to each tiny feeder board to store its id? 😆
@noahcarver1707
@noahcarver1707 4 жыл бұрын
was one of those a 0 ohm resistor!? why!?
@jirkasvitil2762
@jirkasvitil2762 3 жыл бұрын
Easiest are jumpers. Important is number of bits you wanna use. I think microcontroller is big overkill
@jenskuhn7275
@jenskuhn7275 2 жыл бұрын
Hello how hot is the plug you have ?
@BrodieFairhall
@BrodieFairhall 4 жыл бұрын
Almost every industrial device I've encountered that uses RS-485 for comms uses dip switches for addressing, I'm not sure how many feeders you'd like to limit it to, but I've seen RS-485 runs with up to 255 drops so having 8 switches wouldn't be too crazy.
@RussellNelson
@RussellNelson 2 жыл бұрын
Yes, and DIP switches suck for this purpose. We have better ways of addressing devices.
@BlaiseBarrette
@BlaiseBarrette 4 жыл бұрын
Have you looked at grbl_esp32? Wouldn’t it be the better choice than Marlin?
@DJ-Sellout
@DJ-Sellout 4 жыл бұрын
The feeder knows where it is
@akhileshkumar8753
@akhileshkumar8753 4 жыл бұрын
Awesome work ☺️👌 All best buddy 🤩🎉🎉🎉
@AJB2K3
@AJB2K3 4 жыл бұрын
4096? Dang you got enough adc values to handle error variance unlike some device with only 1024 adc values.
Custom PnP Controller: The Final Chapter
14:54
Stephen Hawes
Рет қаралды 41 М.
Detecting Circuit Boards with Sound!
13:39
Stephen Hawes
Рет қаралды 17 М.
Леон киллер и Оля Полякова 😹
00:42
Канал Смеха
Рет қаралды 4,7 МЛН
IL'HAN - Qalqam | Official Music Video
03:17
Ilhan Ihsanov
Рет қаралды 700 М.
Vacuum Sensors Are My Nemesis
12:45
Stephen Hawes
Рет қаралды 19 М.
The Return of the Feeder
13:55
Stephen Hawes
Рет қаралды 19 М.
PnP Feeder Addressing: 1-Wire to the Rescue!
16:57
Stephen Hawes
Рет қаралды 54 М.
These Are a Game Changer for PCB Production
14:42
Stephen Hawes
Рет қаралды 117 М.
Open Source Makes Better Designs - Index PnP - Mobo REV03
10:49
Stephen Hawes
Рет қаралды 27 М.
Running Multi-Feeder Jobs!
10:29
Stephen Hawes
Рет қаралды 27 М.
The Index Gets Proper Belt Tensioning!
14:56
Stephen Hawes
Рет қаралды 19 М.
Building a Conveyor for the Pick and Place!
13:14
Stephen Hawes
Рет қаралды 31 М.
The Index Pick and Place Can Build Itself
10:51
Stephen Hawes
Рет қаралды 128 М.
Леон киллер и Оля Полякова 😹
00:42
Канал Смеха
Рет қаралды 4,7 МЛН