Vref from Vin? Maxed out ADC inputs

I’m using the Photon to control 8 relays (D0 through D7) and read voltage output from 8 current sensors (A0 through A7) measuring AC current (mains). I’m in a bit of a pickle. I need to have a reference voltage reading in order to calculate power properly, but I’m all out of ADC pins :stuck_out_tongue:

I have a 250V AC to 5V 2A switching power supply that is powering the circuit. I could potentially get a Vref of the AC line from the power supply since it’s already regulating the voltage between 4.9 and 5.1V.

Any thoughts on lack of ADC input or a way to expand? I don’t know if I can get a reading on Vin?

I realize this is vague and I’m happy to provide more details. Thanks in advance!

@jarrednicholls, have you looked at the ControlEverything boards?

Yes I have. There’s inspiration there, but I was interested in some hacky ways around having to bring in another IC to expand analog and do I2C comms. But I’m thinking that’s what I’ll have to do ultimately. I am using the same ACS712 current sensor that they use on one of their sensor boards. I of course am doing sensors and relays all together.

In terms of using the board themselves instead of develop my own: the fact that they’re outrageously priced (3x more than they should be) makes that a show stopper.

@jarrednicholls, you could redesign your relay control and ADC functions to use I2C instead. You could use an MCP2317 16-bit I/O expander for relay controls and a suitable multi-channel I2C ADC like the 8-channel LTC2309, the AD7291 or the MAX11616/7 chips. That will keep costs down and give you plenty of flexibility.

@jarrednicholls I have several of their current monitoring boards and felt that the prices were very reasonable. If you want to make a lot of boards you may be able to do it cheaper. But for one or two off boards I could not begin to design, make the boards, source the parts, stock the parts, assemble the boards, calibrate the sensors and write the software.

@carbuthn Yes you’re totally right; at the onesy twosy they’re pretty practical. I’m thinking ahead to wholesale (thousands) and obviously want to be able to code against hardware that I can design and source myself. I guess my point was: if my build was even half the cost of theirs, it’s still too high, and thus they may be using too expensive of parts…and I don’t want to base a design on the notion that those parts will be there.

I’m just going to dig into their parts deeper and decide if there’s a better alternative. I’m even considering ESP8266 + Microchip PIC18F46K22 (lower resolution ADC, but wayyy cheaper than all of this) instead of Particle Photon et al. Photon is such a nice experience though :slight_smile:

Good luck with the project, if you come up with something at a better price they should sell.

By the way, I’m not sure if ControlEverything’s current sensor boards really provides over I2C the precise RMS amperage based on a reference AC voltage…does it? Is it just going to give me the same ADC readings I’d get directly from the sensor, only over I2C instead of an ADC pin?

I would need to hook mine back up and test the results, @IOTrav may be able to answer the question for you.

Hey everyone,

We have designed a new current monitoring board with 6 current sensor inputs and a reference AC voltage input. We have plans on a 32 channel current monitoring board with 2 reference AC voltage inputs as well suitable for monitoring an entire circuit breaker panel. The current monitoring boards and this new board actually have an Atmel processor on them which monitors the sensors and does averaging to give an accurate current reading in mA. Current readings out of the sensors fluctuate quite a bit so you have to average several readings at a time to get an accurate reading. Also getting an accurate current reading when there are inductive loads present on the circuit is NOT child’s play let me tell you!

The new controller with AC voltage monitoring will actually return the reading in RMS so you do not have to do anything. This is part of the reason why our current monitorings board are a little expensive. There was quite a bit of firmware development in that Atmel processor to make it something anyone can use. We could sell it as more of a raw/dumbed down device but felt for most users this would a good choice.

I would also like to add that we can discount units on very high volume quantities. We can also do custom engineering/design work for users who want to have a device manufactured. We do all SMT and through hole manufacturing of the units in house. We source many parts from China(have an employee there permanently), but all semi conductors are sourced from reputable vendors. We do not source semi conductors from China directly due to the high amount of counterfeiting, we have been burned there before. That also contributes some to our prices.

5 Likes

@IOTrav That’s awesome, thanks for that info. Yes I would like to speak to you guys directly on wholesale pricing and custom development. What is the ETA on the 6 current sensor board?

I’m definitely more interested in ACS712 due to the form factor (reduced size) and at 20A, and at 8 channels. The accuracy is decent but probably not as good as the larger hall-effect sensors.

1 Like

Hi @jarrednicholls

Are you looking to monitor AC or DC current? I assume AC correct?

The off board current sensors are by far and away my favorite for monitoring AC current. They are easier to install/use and actually do a much better job if there are any inductive loads on the circuit.

I know you probably cannot say too much about your application but can you provide any insight at all on what you are trying to accomplish? Would help in recommending the best hardware for the job.

@IOTrav At the hardware end, basically real-time current monitoring. Nothing more than that in essence. Accuracy is important, and inductive loads and handling common “gotchas” with typical appliances on mains power is also important.

Hi @jarrednicholls

In that case I would highly recommend the off board current sensors. Especially if this device will be user installed in the end.

Thanks @IOTrav! I agree, I think they are the best case for sure.

What type of sensors are the on-board sensors (i.e. part number)?

That depends on the sensor. We offer boards with different current ranges. What is the max current you are looking to monitor?

Haha, how silly of me. I mentioned 20A earlier but didn’t explicitly carry that through to my question. I’m curious about the on board 20A ones.

Hey @jarrednicholls

Sorry for the late reply. It was a busy weekend(Brother in law wedding).

We use the DLCT27C10 sensor on the 20 amp current monitoring boards. It’s a Chinese part number and does not come up on google anywhere. Our source rep in China found them for us and they do work quite well.

@IOTrav You mentioned your CE boards have an AC voltage reference on them. Are they doing a potential transformer and bridge rectifier or a difference amplifier?